blob: 9b30edfb685cccd43c97ed0d77b4198204f931f1 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Mark Dickinsonb87f0d02009-12-31 21:25:02 +00002# From configure.in Revision: 76821 .
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
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001884# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001885if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001886 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001887 case $enableval in
1888 yes)
1889 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1890 ;;
1891 esac
1892 case $enableval in
1893 no)
1894 UNIVERSALSDK=
1895 enable_universalsdk=
1896 ;;
1897 *)
1898 UNIVERSALSDK=$enableval
1899 ;;
1900 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001901
Thomas Wouters477c8d52006-05-27 19:21:47 +00001902else
1903
1904 UNIVERSALSDK=
1905 enable_universalsdk=
1906
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001907fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001908
1909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001910
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001911
1912
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001913UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001914{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1915echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001916
1917# Check whether --with-universal-archs was given.
1918if test "${with_universal_archs+set}" = set; then
1919 withval=$with_universal_archs;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001920 { echo "$as_me:$LINENO: result: $withval" >&5
1921echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001922 UNIVERSAL_ARCHS="$withval"
1923
1924else
1925
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001926 { echo "$as_me:$LINENO: result: 32-bit" >&5
1927echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001928
1929fi
1930
1931
1932
1933
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001934
1935# Check whether --with-framework-name was given.
1936if test "${with_framework_name+set}" = set; then
1937 withval=$with_framework_name;
1938 PYTHONFRAMEWORK=${withval}
1939 PYTHONFRAMEWORKDIR=${withval}.framework
1940 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1941
1942else
1943
1944 PYTHONFRAMEWORK=Python
1945 PYTHONFRAMEWORKDIR=Python.framework
1946 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1947
1948fi
1949
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001950# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001951if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001952 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001953 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001954 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001955 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001956 esac
1957 case $enableval in
1958 no)
1959 PYTHONFRAMEWORK=
1960 PYTHONFRAMEWORKDIR=no-framework
1961 PYTHONFRAMEWORKPREFIX=
1962 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001963 FRAMEWORKINSTALLFIRST=
1964 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001965 FRAMEWORKALTINSTALLFIRST=
1966 FRAMEWORKALTINSTALLLAST=
1967 if test "x${prefix}" = "xNONE"; then
1968 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1969 else
1970 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1971 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001972 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001973 ;;
1974 *)
1975 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001976 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001977 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001978 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001979 if test "$UNIVERSAL_ARCHS" = "all"
1980 then
1981 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00001982 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001983 else
Ronald Oussorene3918352009-03-30 18:00:28 +00001984 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001985 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1986 fi
1987
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001988 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 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001994
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001995 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00001996 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001997 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001999 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002000
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002001 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2002
2003 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2004
Jack Jansene578a632001-08-15 01:27:14 +00002005 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002006
Guido van Rossum563e7081996-09-10 18:20:48 +00002007else
Martin v. Löwis11437992002-04-12 09:54:03 +00002008
Jack Jansene578a632001-08-15 01:27:14 +00002009 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002010 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002011 PYTHONFRAMEWORKPREFIX=
2012 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002013 FRAMEWORKINSTALLFIRST=
2014 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002015 FRAMEWORKALTINSTALLFIRST=
2016 FRAMEWORKALTINSTALLLAST=
2017 if test "x${prefix}" = "xNONE" ; then
2018 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2019 else
2020 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2021 fi
Jack Jansene578a632001-08-15 01:27:14 +00002022 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002023
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002024 if test "$UNIVERSAL_ARCHS" = "all"
2025 then
2026 FRAMEWORKINSTALLLAST=update4wayuniversal
2027 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2028 fi
2029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002030fi
2031
Thomas Wouters477c8d52006-05-27 19:21:47 +00002032
2033
Michael W. Hudson54241132001-12-07 15:38:26 +00002034
2035
2036
2037
Jack Jansene578a632001-08-15 01:27:14 +00002038
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002039
2040
2041
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002042
Jack Jansene578a632001-08-15 01:27:14 +00002043##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002044## AC_HELP_STRING(--with-dyld,
2045## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002046##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002047# Set name for machine-dependent library files
2048
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002049{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2050echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002051if test -z "$MACHDEP"
2052then
Guido van Rossum563e7081996-09-10 18:20:48 +00002053 ac_sys_system=`uname -s`
Benjamin Petersona8332062009-09-11 22:36:27 +00002054 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002055 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002056 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002057 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002058 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002059 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002060 ac_md_system=`echo $ac_sys_system |
2061 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2062 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002063 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002064 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002065
Guido van Rossum07397971997-04-29 21:49:50 +00002066 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002067 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002068 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002069 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002070 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002071 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002072 esac
2073fi
Guido van Rossum91922671997-10-09 20:24:13 +00002074
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002075# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2076# disable features if it is defined, without any means to access these
2077# features as extensions. For these systems, we skip the definition of
2078# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2079# some feature, make sure there is no alternative way to access this
2080# feature. Also, when using wildcards, make sure you have verified the
2081# need for not defining _XOPEN_SOURCE on all systems matching the
2082# wildcard, and that the wildcard does not include future systems
2083# (which may remove their limitations).
2084case $ac_sys_system/$ac_sys_release in
2085 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2086 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002087 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002088 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002089 define_xopen_source=no
2090 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2091 # also defined. This can be overridden by defining _BSD_SOURCE
2092 # As this has a different meaning on Linux, only define it on OpenBSD
2093
2094cat >>confdefs.h <<\_ACEOF
2095#define _BSD_SOURCE 1
2096_ACEOF
2097
2098 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002099 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2100 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2101 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002102 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 +00002103 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002104 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2105 # of union __?sigval. Reported by Stuart Bishop.
2106 SunOS/5.6)
2107 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002108 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2109 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002110 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002111 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002112 define_xopen_source=no;;
2113 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002114 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002115 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002116 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002117 # On FreeBSD 4, the math functions C89 does not cover are never defined
2118 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2119 FreeBSD/4.*)
2120 define_xopen_source=no;;
2121 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2122 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2123 # identifies itself as Darwin/7.*
2124 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2125 # disables platform specific features beyond repair.
2126 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2127 # has no effect, don't bother defining them
2128 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002129 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002130 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2131 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2132 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002133 AIX/4)
2134 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002135 AIX/5)
2136 if test `uname -r` -eq 1; then
2137 define_xopen_source=no
2138 fi
2139 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002140 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2141 # defining NI_NUMERICHOST.
2142 QNX/6.3.2)
2143 define_xopen_source=no
2144 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002145
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002146esac
2147
2148if test $define_xopen_source = yes
2149then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002150 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2151 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002152 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2153 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002154 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002155 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002156
2157cat >>confdefs.h <<\_ACEOF
2158#define _XOPEN_SOURCE 500
2159_ACEOF
2160
2161 ;;
2162 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002163
2164cat >>confdefs.h <<\_ACEOF
2165#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002166_ACEOF
2167
Skip Montanarof0d5f792004-08-15 14:08:23 +00002168 ;;
2169 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002170
2171 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2172 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2173 # several APIs are not declared. Since this is also needed in some
2174 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002175 # except for Solaris 10, where it must not be defined,
2176 # as it implies XPG4.2
2177 case $ac_sys_system/$ac_sys_release in
2178 SunOS/5.10)
2179 ;;
2180 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002181
2182cat >>confdefs.h <<\_ACEOF
2183#define _XOPEN_SOURCE_EXTENDED 1
2184_ACEOF
2185
Martin v. Löwis7dece662005-11-26 11:38:24 +00002186 ;;
2187 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002188
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002189
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002190cat >>confdefs.h <<\_ACEOF
2191#define _POSIX_C_SOURCE 200112L
2192_ACEOF
2193
2194
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002195fi
2196
Guido van Rossum91922671997-10-09 20:24:13 +00002197#
2198# SGI compilers allow the specification of the both the ABI and the
2199# ISA on the command line. Depending on the values of these switches,
2200# different and often incompatable code will be generated.
2201#
2202# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2203# thus supply support for various ABI/ISA combinations. The MACHDEP
2204# variable is also adjusted.
2205#
2206
2207if test ! -z "$SGI_ABI"
2208then
2209 CC="cc $SGI_ABI"
2210 LDFLAGS="$SGI_ABI $LDFLAGS"
2211 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2212fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002213{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2214echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002215
Jack Jansen6b08a402004-06-03 12:41:45 +00002216# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2217# it may influence the way we can build extensions, so distutils
2218# needs to check it
2219
Thomas Wouters477c8d52006-05-27 19:21:47 +00002220
Jack Jansen6b08a402004-06-03 12:41:45 +00002221CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002222EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002223
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002224{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2225echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002226ac_sys_machine=`uname -m`
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002227{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2228echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002229
Guido van Rossum627b2d71993-12-24 10:39:16 +00002230# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002231
2232# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2233# for debug/optimization stuff. BASECFLAGS is for flags that are required
2234# just to get things to compile and link. Users are free to override OPT
2235# when running configure or make. The build should not break if they do.
2236# BASECFLAGS should generally not be messed with, however.
2237
2238# XXX shouldn't some/most/all of this code be merged with the stuff later
2239# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002240{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2241echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002242
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002243# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002244if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002245 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002246 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002247 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002248 without_gcc=yes;;
2249 yes) CC=gcc
2250 without_gcc=no;;
2251 *) CC=$withval
2252 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002253 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002254else
Martin v. Löwis11437992002-04-12 09:54:03 +00002255
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002256 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002257 AIX*) CC=cc_r
2258 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002259 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002260 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002261fi
2262
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002263{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2264echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002265
Guido van Rossum8b131c51995-03-09 14:10:13 +00002266# If the user switches compilers, we can't believe the cache
2267if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2268then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002269 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002270(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002271echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002272(it is also a good idea to do 'make clean' before compiling)" >&2;}
2273 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002274fi
2275
Martin v. Löwis11437992002-04-12 09:54:03 +00002276ac_ext=c
2277ac_cpp='$CPP $CPPFLAGS'
2278ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2279ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2280ac_compiler_gnu=$ac_cv_c_compiler_gnu
2281if test -n "$ac_tool_prefix"; then
2282 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2283set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002284{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2285echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002286if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002287 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002288else
2289 if test -n "$CC"; then
2290 ac_cv_prog_CC="$CC" # Let the user override the test.
2291else
Martin v. Löwis11437992002-04-12 09:54:03 +00002292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2293for as_dir in $PATH
2294do
2295 IFS=$as_save_IFS
2296 test -z "$as_dir" && as_dir=.
2297 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002298 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 +00002299 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002300 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002301 break 2
2302 fi
2303done
2304done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002305IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002306
Jack Jansendd19cf82001-12-06 22:36:17 +00002307fi
2308fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002309CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002310if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002311 { echo "$as_me:$LINENO: result: $CC" >&5
2312echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002313else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002314 { echo "$as_me:$LINENO: result: no" >&5
2315echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002316fi
2317
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002318
Martin v. Löwis11437992002-04-12 09:54:03 +00002319fi
2320if test -z "$ac_cv_prog_CC"; then
2321 ac_ct_CC=$CC
2322 # Extract the first word of "gcc", so it can be a program name with args.
2323set dummy gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002324{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2325echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002326if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002327 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002328else
2329 if test -n "$ac_ct_CC"; then
2330 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2331else
2332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2333for as_dir in $PATH
2334do
2335 IFS=$as_save_IFS
2336 test -z "$as_dir" && as_dir=.
2337 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338 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 +00002339 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002340 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002341 break 2
2342 fi
2343done
2344done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002345IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002346
2347fi
2348fi
2349ac_ct_CC=$ac_cv_prog_ac_ct_CC
2350if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002351 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2352echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002353else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002354 { echo "$as_me:$LINENO: result: no" >&5
2355echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002356fi
2357
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002358 if test "x$ac_ct_CC" = x; then
2359 CC=""
2360 else
2361 case $cross_compiling:$ac_tool_warned in
2362yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002363{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2364whose name does not start with the host triplet. If you think this
2365configuration is useful to you, please write to autoconf@gnu.org." >&5
2366echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2367whose name does not start with the host triplet. If you think this
2368configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369ac_tool_warned=yes ;;
2370esac
2371 CC=$ac_ct_CC
2372 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002373else
2374 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002375fi
2376
Jack Jansendd19cf82001-12-06 22:36:17 +00002377if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378 if test -n "$ac_tool_prefix"; then
2379 # 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 +00002380set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002381{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2382echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002383if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002384 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002385else
2386 if test -n "$CC"; then
2387 ac_cv_prog_CC="$CC" # Let the user override the test.
2388else
Martin v. Löwis11437992002-04-12 09:54:03 +00002389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2390for as_dir in $PATH
2391do
2392 IFS=$as_save_IFS
2393 test -z "$as_dir" && as_dir=.
2394 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002395 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 +00002396 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002397 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002398 break 2
2399 fi
2400done
2401done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002402IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002403
2404fi
2405fi
2406CC=$ac_cv_prog_CC
2407if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002408 { echo "$as_me:$LINENO: result: $CC" >&5
2409echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002410else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002411 { echo "$as_me:$LINENO: result: no" >&5
2412echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002413fi
2414
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002415
Martin v. Löwis11437992002-04-12 09:54:03 +00002416 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002417fi
2418if test -z "$CC"; then
2419 # Extract the first word of "cc", so it can be a program name with args.
2420set dummy cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002421{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2422echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002423if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002424 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002425else
2426 if test -n "$CC"; then
2427 ac_cv_prog_CC="$CC" # Let the user override the test.
2428else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002429 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2431for as_dir in $PATH
2432do
2433 IFS=$as_save_IFS
2434 test -z "$as_dir" && as_dir=.
2435 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002436 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 +00002437 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2438 ac_prog_rejected=yes
2439 continue
2440 fi
2441 ac_cv_prog_CC="cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002442 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002443 break 2
2444 fi
2445done
2446done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002448
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002449if test $ac_prog_rejected = yes; then
2450 # We found a bogon in the path, so make sure we never use it.
2451 set dummy $ac_cv_prog_CC
2452 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002453 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002454 # We chose a different compiler from the bogus one.
2455 # However, it has the same basename, so the bogon will be chosen
2456 # first if we set CC to just the basename; use the full file name.
2457 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002458 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002459 fi
2460fi
2461fi
2462fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002463CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002464if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002465 { echo "$as_me:$LINENO: result: $CC" >&5
2466echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002467else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002468 { echo "$as_me:$LINENO: result: no" >&5
2469echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002470fi
2471
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472
Martin v. Löwis11437992002-04-12 09:54:03 +00002473fi
2474if test -z "$CC"; then
2475 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 do
2478 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2479set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002480{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2481echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002482if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002483 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002484else
2485 if test -n "$CC"; then
2486 ac_cv_prog_CC="$CC" # Let the user override the test.
2487else
Martin v. Löwis11437992002-04-12 09:54:03 +00002488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2489for as_dir in $PATH
2490do
2491 IFS=$as_save_IFS
2492 test -z "$as_dir" && as_dir=.
2493 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 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 +00002495 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002496 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002497 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002498 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002499done
2500done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002502
2503fi
2504fi
2505CC=$ac_cv_prog_CC
2506if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002507 { echo "$as_me:$LINENO: result: $CC" >&5
2508echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002509else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002510 { echo "$as_me:$LINENO: result: no" >&5
2511echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002512fi
2513
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 test -n "$CC" && break
2516 done
2517fi
2518if test -z "$CC"; then
2519 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002521do
2522 # Extract the first word of "$ac_prog", so it can be a program name with args.
2523set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002524{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2525echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002526if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002527 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002528else
2529 if test -n "$ac_ct_CC"; then
2530 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2531else
2532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2533for as_dir in $PATH
2534do
2535 IFS=$as_save_IFS
2536 test -z "$as_dir" && as_dir=.
2537 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 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 +00002539 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002540 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 break 2
2542 fi
2543done
2544done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547fi
2548fi
2549ac_ct_CC=$ac_cv_prog_ac_ct_CC
2550if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002551 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2552echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002553else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002554 { echo "$as_me:$LINENO: result: no" >&5
2555echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002556fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559 test -n "$ac_ct_CC" && break
2560done
Michael W. Hudson54241132001-12-07 15:38:26 +00002561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 if test "x$ac_ct_CC" = x; then
2563 CC=""
2564 else
2565 case $cross_compiling:$ac_tool_warned in
2566yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002567{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2568whose name does not start with the host triplet. If you think this
2569configuration is useful to you, please write to autoconf@gnu.org." >&5
2570echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2571whose name does not start with the host triplet. If you think this
2572configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573ac_tool_warned=yes ;;
2574esac
2575 CC=$ac_ct_CC
2576 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002577fi
2578
2579fi
2580
2581
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002582test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002583See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002584echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002585See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002586 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002587
2588# Provide some information about the compiler.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002589echo "$as_me:$LINENO: checking for C compiler version" >&5
2590ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591{ (ac_try="$ac_compiler --version >&5"
2592case "(($ac_try" in
2593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2594 *) ac_try_echo=$ac_try;;
2595esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601{ (ac_try="$ac_compiler -v >&5"
2602case "(($ac_try" in
2603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2604 *) ac_try_echo=$ac_try;;
2605esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002611{ (ac_try="$ac_compiler -V >&5"
2612case "(($ac_try" in
2613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2614 *) ac_try_echo=$ac_try;;
2615esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002617 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 (exit $ac_status); }
2621
2622cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002623/* confdefs.h. */
2624_ACEOF
2625cat confdefs.h >>conftest.$ac_ext
2626cat >>conftest.$ac_ext <<_ACEOF
2627/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002628
Martin v. Löwis11437992002-04-12 09:54:03 +00002629int
2630main ()
2631{
2632
2633 ;
2634 return 0;
2635}
2636_ACEOF
2637ac_clean_files_save=$ac_clean_files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002638ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002639# Try to create an executable without -o first, disregard a.out.
2640# It will help us diagnose broken compilers, and finding out an intuition
2641# of exeext.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002642{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2643echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2644ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2645#
2646# List of possible output files, starting from the most likely.
2647# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2648# only as a last resort. b.out is created by i960 compilers.
2649ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2650#
2651# The IRIX 6 linker writes into existing files which may not be
2652# executable, retaining their permissions. Remove them first so a
2653# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002654ac_rmfiles=
2655for ac_file in $ac_files
2656do
2657 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002658 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002659 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2660 esac
2661done
2662rm -f $ac_rmfiles
2663
2664if { (ac_try="$ac_link_default"
2665case "(($ac_try" in
2666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2667 *) ac_try_echo=$ac_try;;
2668esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002674 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2675# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2676# in a Makefile. We should not override ac_cv_exeext if it was cached,
2677# so that the user can short-circuit this test for compilers unknown to
2678# Autoconf.
2679for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002680do
2681 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002682 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002683 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002684 ;;
2685 [ab].out )
2686 # We found the default executable, but exeext='' is most
2687 # certainly right.
2688 break;;
2689 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002690 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2691 then :; else
2692 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2693 fi
2694 # We set ac_cv_exeext here because the later test for it is not
2695 # safe: cross compilers may not add the suffix if given an `-o'
2696 # argument, so we may need to know it at that point already.
2697 # Even if this section looks crufty: it has the advantage of
2698 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002699 break;;
2700 * )
2701 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 esac
2703done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002704test "$ac_cv_exeext" = no && ac_cv_exeext=
2705
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002706else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002707 ac_file=''
2708fi
2709
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002710{ echo "$as_me:$LINENO: result: $ac_file" >&5
2711echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002712if test -z "$ac_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002714sed 's/^/| /' conftest.$ac_ext >&5
2715
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002716{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002717See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002718echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002719See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002720 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002721fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002722
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002723ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002725# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002726# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002727{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2728echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002729# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2730# If not cross compiling, check that we can run a simple program.
2731if test "$cross_compiling" != yes; then
2732 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002733 { (case "(($ac_try" in
2734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2735 *) ac_try_echo=$ac_try;;
2736esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002738 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 (exit $ac_status); }; }; then
2742 cross_compiling=no
2743 else
2744 if test "$cross_compiling" = maybe; then
2745 cross_compiling=yes
2746 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002747 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002748If you meant to cross compile, use \`--host'.
2749See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002750echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002751If you meant to cross compile, use \`--host'.
2752See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002753 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002754 fi
2755 fi
2756fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002757{ echo "$as_me:$LINENO: result: yes" >&5
2758echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002759
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002760rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002761ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002762# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002763# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002764{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2765echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2766{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2767echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002768
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002769{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2770echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002771if { (ac_try="$ac_link"
2772case "(($ac_try" in
2773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2774 *) ac_try_echo=$ac_try;;
2775esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002777 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002778 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002780 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002781 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2782# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2783# work properly (i.e., refer to `conftest.exe'), while it won't with
2784# `rm'.
2785for ac_file in conftest.exe conftest conftest.*; do
2786 test -f "$ac_file" || continue
2787 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002788 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002789 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2790 break;;
2791 * ) break;;
2792 esac
2793done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002794else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002795 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002796See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002797echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002798See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002799 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002800fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002801
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002802rm -f conftest$ac_cv_exeext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002803{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2804echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002805
2806rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002807EXEEXT=$ac_cv_exeext
2808ac_exeext=$EXEEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002809{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2810echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002811if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002812 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002813else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002814 cat >conftest.$ac_ext <<_ACEOF
2815/* confdefs.h. */
2816_ACEOF
2817cat confdefs.h >>conftest.$ac_ext
2818cat >>conftest.$ac_ext <<_ACEOF
2819/* end confdefs.h. */
2820
2821int
2822main ()
2823{
2824
2825 ;
2826 return 0;
2827}
2828_ACEOF
2829rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002830if { (ac_try="$ac_compile"
2831case "(($ac_try" in
2832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2833 *) ac_try_echo=$ac_try;;
2834esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002836 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002837 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002839 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002840 for ac_file in conftest.o conftest.obj conftest.*; do
2841 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002842 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002843 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002844 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2845 break;;
2846 esac
2847done
2848else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002850sed 's/^/| /' conftest.$ac_ext >&5
2851
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002852{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002853See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002854echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002855See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002856 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002857fi
2858
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002859rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002860fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002861{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2862echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002863OBJEXT=$ac_cv_objext
2864ac_objext=$OBJEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002865{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2866echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002867if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002868 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002869else
2870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002871/* confdefs.h. */
2872_ACEOF
2873cat confdefs.h >>conftest.$ac_ext
2874cat >>conftest.$ac_ext <<_ACEOF
2875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002876
Martin v. Löwis11437992002-04-12 09:54:03 +00002877int
2878main ()
2879{
2880#ifndef __GNUC__
2881 choke me
2882#endif
2883
2884 ;
2885 return 0;
2886}
2887_ACEOF
2888rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002889if { (ac_try="$ac_compile"
2890case "(($ac_try" in
2891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2892 *) ac_try_echo=$ac_try;;
2893esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002895 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002897 grep -v '^ *+' conftest.er1 >conftest.err
2898 rm -f conftest.er1
2899 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002901 (exit $ac_status); } && {
2902 test -z "$ac_c_werror_flag" ||
2903 test ! -s conftest.err
2904 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002905 ac_compiler_gnu=yes
2906else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002908sed 's/^/| /' conftest.$ac_ext >&5
2909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002910 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002912
2913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002914ac_cv_c_compiler_gnu=$ac_compiler_gnu
2915
2916fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002917{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2918echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2919GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002920ac_test_CFLAGS=${CFLAGS+set}
2921ac_save_CFLAGS=$CFLAGS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002922{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2923echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002924if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002925 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002926else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002927 ac_save_c_werror_flag=$ac_c_werror_flag
2928 ac_c_werror_flag=yes
2929 ac_cv_prog_cc_g=no
2930 CFLAGS="-g"
2931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002932/* confdefs.h. */
2933_ACEOF
2934cat confdefs.h >>conftest.$ac_ext
2935cat >>conftest.$ac_ext <<_ACEOF
2936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002937
Martin v. Löwis11437992002-04-12 09:54:03 +00002938int
2939main ()
2940{
2941
2942 ;
2943 return 0;
2944}
2945_ACEOF
2946rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002947if { (ac_try="$ac_compile"
2948case "(($ac_try" in
2949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2950 *) ac_try_echo=$ac_try;;
2951esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002955 grep -v '^ *+' conftest.er1 >conftest.err
2956 rm -f conftest.er1
2957 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002959 (exit $ac_status); } && {
2960 test -z "$ac_c_werror_flag" ||
2961 test ! -s conftest.err
2962 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002963 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002964else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002966sed 's/^/| /' conftest.$ac_ext >&5
2967
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002968 CFLAGS=""
2969 cat >conftest.$ac_ext <<_ACEOF
2970/* confdefs.h. */
2971_ACEOF
2972cat confdefs.h >>conftest.$ac_ext
2973cat >>conftest.$ac_ext <<_ACEOF
2974/* end confdefs.h. */
2975
2976int
2977main ()
2978{
2979
2980 ;
2981 return 0;
2982}
2983_ACEOF
2984rm -f conftest.$ac_objext
2985if { (ac_try="$ac_compile"
2986case "(($ac_try" in
2987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2988 *) ac_try_echo=$ac_try;;
2989esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002991 (eval "$ac_compile") 2>conftest.er1
2992 ac_status=$?
2993 grep -v '^ *+' conftest.er1 >conftest.err
2994 rm -f conftest.er1
2995 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002997 (exit $ac_status); } && {
2998 test -z "$ac_c_werror_flag" ||
2999 test ! -s conftest.err
3000 } && test -s conftest.$ac_objext; then
3001 :
3002else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003003 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003004sed 's/^/| /' conftest.$ac_ext >&5
3005
3006 ac_c_werror_flag=$ac_save_c_werror_flag
3007 CFLAGS="-g"
3008 cat >conftest.$ac_ext <<_ACEOF
3009/* confdefs.h. */
3010_ACEOF
3011cat confdefs.h >>conftest.$ac_ext
3012cat >>conftest.$ac_ext <<_ACEOF
3013/* end confdefs.h. */
3014
3015int
3016main ()
3017{
3018
3019 ;
3020 return 0;
3021}
3022_ACEOF
3023rm -f conftest.$ac_objext
3024if { (ac_try="$ac_compile"
3025case "(($ac_try" in
3026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3027 *) ac_try_echo=$ac_try;;
3028esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003030 (eval "$ac_compile") 2>conftest.er1
3031 ac_status=$?
3032 grep -v '^ *+' conftest.er1 >conftest.err
3033 rm -f conftest.er1
3034 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003036 (exit $ac_status); } && {
3037 test -z "$ac_c_werror_flag" ||
3038 test ! -s conftest.err
3039 } && test -s conftest.$ac_objext; then
3040 ac_cv_prog_cc_g=yes
3041else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003042 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003043sed 's/^/| /' conftest.$ac_ext >&5
3044
3045
Guido van Rossum627b2d71993-12-24 10:39:16 +00003046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003047
3048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003050
3051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3052fi
3053
3054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3055 ac_c_werror_flag=$ac_save_c_werror_flag
3056fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003057{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3058echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003059if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003060 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003061elif test $ac_cv_prog_cc_g = yes; then
3062 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003063 CFLAGS="-g -O2"
3064 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003065 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003066 fi
3067else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003068 if test "$GCC" = yes; then
3069 CFLAGS="-O2"
3070 else
3071 CFLAGS=
3072 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003073fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003074{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3075echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003076if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003077 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003078else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003079 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003080ac_save_CC=$CC
3081cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003082/* confdefs.h. */
3083_ACEOF
3084cat confdefs.h >>conftest.$ac_ext
3085cat >>conftest.$ac_ext <<_ACEOF
3086/* end confdefs.h. */
3087#include <stdarg.h>
3088#include <stdio.h>
3089#include <sys/types.h>
3090#include <sys/stat.h>
3091/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3092struct buf { int x; };
3093FILE * (*rcsopen) (struct buf *, struct stat *, int);
3094static char *e (p, i)
3095 char **p;
3096 int i;
3097{
3098 return p[i];
3099}
3100static char *f (char * (*g) (char **, int), char **p, ...)
3101{
3102 char *s;
3103 va_list v;
3104 va_start (v,p);
3105 s = g (p, va_arg (v,int));
3106 va_end (v);
3107 return s;
3108}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003109
3110/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3111 function prototypes and stuff, but not '\xHH' hex character constants.
3112 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003113 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003114 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3115 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003116 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003117int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3118
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003119/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3120 inside strings and character constants. */
3121#define FOO(x) 'x'
3122int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3123
Skip Montanaro6dead952003-09-25 14:50:04 +00003124int test (int i, double x);
3125struct s1 {int (*f) (int a);};
3126struct s2 {int (*f) (double a);};
3127int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3128int argc;
3129char **argv;
3130int
3131main ()
3132{
3133return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3134 ;
3135 return 0;
3136}
3137_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003138for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3139 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003140do
3141 CC="$ac_save_CC $ac_arg"
3142 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003143if { (ac_try="$ac_compile"
3144case "(($ac_try" in
3145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3146 *) ac_try_echo=$ac_try;;
3147esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003151 grep -v '^ *+' conftest.er1 >conftest.err
3152 rm -f conftest.er1
3153 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003155 (exit $ac_status); } && {
3156 test -z "$ac_c_werror_flag" ||
3157 test ! -s conftest.err
3158 } && test -s conftest.$ac_objext; then
3159 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003160else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003162sed 's/^/| /' conftest.$ac_ext >&5
3163
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164
Skip Montanaro6dead952003-09-25 14:50:04 +00003165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003166
3167rm -f core conftest.err conftest.$ac_objext
3168 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003169done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003170rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003171CC=$ac_save_CC
3172
3173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003174# AC_CACHE_VAL
3175case "x$ac_cv_prog_cc_c89" in
3176 x)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003177 { echo "$as_me:$LINENO: result: none needed" >&5
3178echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179 xno)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003180 { echo "$as_me:$LINENO: result: unsupported" >&5
3181echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003182 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003183 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003184 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3185echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003186esac
3187
Skip Montanaro6dead952003-09-25 14:50:04 +00003188
Martin v. Löwis11437992002-04-12 09:54:03 +00003189ac_ext=c
3190ac_cpp='$CPP $CPPFLAGS'
3191ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3192ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3193ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003194
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003195
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003196
3197
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003198{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3199echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003202if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003204
3205 case $withval in
3206 no) with_cxx_main=no
3207 MAINCC='$(CC)';;
3208 yes) with_cxx_main=yes
3209 MAINCC='$(CXX)';;
3210 *) with_cxx_main=yes
3211 MAINCC=$withval
3212 if test -z "$CXX"
3213 then
3214 CXX=$withval
3215 fi;;
3216 esac
3217else
3218
3219 with_cxx_main=no
3220 MAINCC='$(CC)'
3221
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003222fi
3223
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003224{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3225echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003226
3227preset_cxx="$CXX"
3228if test -z "$CXX"
3229then
3230 case "$CC" in
3231 gcc) # Extract the first word of "g++", so it can be a program name with args.
3232set dummy g++; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003233{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3234echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003235if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003236 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003237else
3238 case $CXX in
3239 [\\/]* | ?:[\\/]*)
3240 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3241 ;;
3242 *)
3243 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3244for as_dir in notfound
3245do
3246 IFS=$as_save_IFS
3247 test -z "$as_dir" && as_dir=.
3248 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003249 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 +00003250 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003251 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003252 break 2
3253 fi
3254done
3255done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003256IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003257
3258 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3259 ;;
3260esac
3261fi
3262CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003263if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003264 { echo "$as_me:$LINENO: result: $CXX" >&5
3265echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003266else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003267 { echo "$as_me:$LINENO: result: no" >&5
3268echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003270
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003271 ;;
3272 cc) # Extract the first word of "c++", so it can be a program name with args.
3273set dummy c++; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003274{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3275echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003276if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003277 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003278else
3279 case $CXX in
3280 [\\/]* | ?:[\\/]*)
3281 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3282 ;;
3283 *)
3284 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3285for as_dir in notfound
3286do
3287 IFS=$as_save_IFS
3288 test -z "$as_dir" && as_dir=.
3289 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003290 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 +00003291 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003292 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003293 break 2
3294 fi
3295done
3296done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003297IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003298
3299 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3300 ;;
3301esac
3302fi
3303CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003304if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003305 { echo "$as_me:$LINENO: result: $CXX" >&5
3306echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003307else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003308 { echo "$as_me:$LINENO: result: no" >&5
3309echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003311
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003312 ;;
3313 esac
3314 if test "$CXX" = "notfound"
3315 then
3316 CXX=""
3317 fi
3318fi
3319if test -z "$CXX"
3320then
3321 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3322do
3323 # Extract the first word of "$ac_prog", so it can be a program name with args.
3324set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003325{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3326echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003327if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003328 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003329else
3330 if test -n "$CXX"; then
3331 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3332else
3333as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3334for as_dir in $PATH
3335do
3336 IFS=$as_save_IFS
3337 test -z "$as_dir" && as_dir=.
3338 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003339 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 +00003340 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003341 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003342 break 2
3343 fi
3344done
3345done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003346IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003347
3348fi
3349fi
3350CXX=$ac_cv_prog_CXX
3351if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003352 { echo "$as_me:$LINENO: result: $CXX" >&5
3353echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003354else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003355 { echo "$as_me:$LINENO: result: no" >&5
3356echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003357fi
3358
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003359
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003360 test -n "$CXX" && break
3361done
3362test -n "$CXX" || CXX="notfound"
3363
3364 if test "$CXX" = "notfound"
3365 then
3366 CXX=""
3367 fi
3368fi
3369if test "$preset_cxx" != "$CXX"
3370then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003371 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003372
3373 By default, distutils will build C++ extension modules with \"$CXX\".
3374 If this is not intended, then set CXX on the configure command line.
3375 " >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003376echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003377
3378 By default, distutils will build C++ extension modules with \"$CXX\".
3379 If this is not intended, then set CXX on the configure command line.
3380 " >&2;}
3381fi
3382
3383
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003384# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003385
3386ac_ext=c
3387ac_cpp='$CPP $CPPFLAGS'
3388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3390ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003391{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3392echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003393# On Suns, sometimes $CPP names a directory.
3394if test -n "$CPP" && test -d "$CPP"; then
3395 CPP=
3396fi
3397if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003398 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003399 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003400else
Martin v. Löwis11437992002-04-12 09:54:03 +00003401 # Double quotes because CPP needs to be expanded
3402 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3403 do
3404 ac_preproc_ok=false
3405for ac_c_preproc_warn_flag in '' yes
3406do
3407 # Use a header file that comes with gcc, so configuring glibc
3408 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003409 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3410 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003411 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003412 # not just through cpp. "Syntax error" is here to catch this case.
3413 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003414/* confdefs.h. */
3415_ACEOF
3416cat confdefs.h >>conftest.$ac_ext
3417cat >>conftest.$ac_ext <<_ACEOF
3418/* end confdefs.h. */
3419#ifdef __STDC__
3420# include <limits.h>
3421#else
3422# include <assert.h>
3423#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003424 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003425_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003426if { (ac_try="$ac_cpp conftest.$ac_ext"
3427case "(($ac_try" in
3428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3429 *) ac_try_echo=$ac_try;;
3430esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003432 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003434 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003435 rm -f conftest.er1
3436 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003438 (exit $ac_status); } >/dev/null && {
3439 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3440 test ! -s conftest.err
3441 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003442 :
3443else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003445sed 's/^/| /' conftest.$ac_ext >&5
3446
Martin v. Löwis11437992002-04-12 09:54:03 +00003447 # Broken: fails on valid input.
3448continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003450
Martin v. Löwis11437992002-04-12 09:54:03 +00003451rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003454 # can be detected and how.
3455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003456/* confdefs.h. */
3457_ACEOF
3458cat confdefs.h >>conftest.$ac_ext
3459cat >>conftest.$ac_ext <<_ACEOF
3460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003461#include <ac_nonexistent.h>
3462_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003463if { (ac_try="$ac_cpp conftest.$ac_ext"
3464case "(($ac_try" in
3465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3466 *) ac_try_echo=$ac_try;;
3467esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003469 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003471 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003472 rm -f conftest.er1
3473 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003475 (exit $ac_status); } >/dev/null && {
3476 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3477 test ! -s conftest.err
3478 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003479 # Broken: success on invalid input.
3480continue
3481else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003483sed 's/^/| /' conftest.$ac_ext >&5
3484
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 # Passes both tests.
3486ac_preproc_ok=:
3487break
3488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003489
Martin v. Löwis11437992002-04-12 09:54:03 +00003490rm -f conftest.err conftest.$ac_ext
3491
3492done
3493# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3494rm -f conftest.err conftest.$ac_ext
3495if $ac_preproc_ok; then
3496 break
3497fi
3498
3499 done
3500 ac_cv_prog_CPP=$CPP
3501
3502fi
3503 CPP=$ac_cv_prog_CPP
3504else
3505 ac_cv_prog_CPP=$CPP
3506fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003507{ echo "$as_me:$LINENO: result: $CPP" >&5
3508echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003509ac_preproc_ok=false
3510for ac_c_preproc_warn_flag in '' yes
3511do
3512 # Use a header file that comes with gcc, so configuring glibc
3513 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003514 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3515 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003516 # On the NeXT, cc -E runs the code through the compiler's parser,
3517 # not just through cpp. "Syntax error" is here to catch this case.
3518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003519/* confdefs.h. */
3520_ACEOF
3521cat confdefs.h >>conftest.$ac_ext
3522cat >>conftest.$ac_ext <<_ACEOF
3523/* end confdefs.h. */
3524#ifdef __STDC__
3525# include <limits.h>
3526#else
3527# include <assert.h>
3528#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003529 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003530_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531if { (ac_try="$ac_cpp conftest.$ac_ext"
3532case "(($ac_try" in
3533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3534 *) ac_try_echo=$ac_try;;
3535esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003537 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003539 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003540 rm -f conftest.er1
3541 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543 (exit $ac_status); } >/dev/null && {
3544 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3545 test ! -s conftest.err
3546 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003547 :
3548else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003550sed 's/^/| /' conftest.$ac_ext >&5
3551
Martin v. Löwis11437992002-04-12 09:54:03 +00003552 # Broken: fails on valid input.
3553continue
3554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003555
Martin v. Löwis11437992002-04-12 09:54:03 +00003556rm -f conftest.err conftest.$ac_ext
3557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003559 # can be detected and how.
3560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003561/* confdefs.h. */
3562_ACEOF
3563cat confdefs.h >>conftest.$ac_ext
3564cat >>conftest.$ac_ext <<_ACEOF
3565/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003566#include <ac_nonexistent.h>
3567_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568if { (ac_try="$ac_cpp conftest.$ac_ext"
3569case "(($ac_try" in
3570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3571 *) ac_try_echo=$ac_try;;
3572esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003576 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003577 rm -f conftest.er1
3578 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003580 (exit $ac_status); } >/dev/null && {
3581 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3582 test ! -s conftest.err
3583 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003584 # Broken: success on invalid input.
3585continue
3586else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003588sed 's/^/| /' conftest.$ac_ext >&5
3589
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 # Passes both tests.
3591ac_preproc_ok=:
3592break
3593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003594
Martin v. Löwis11437992002-04-12 09:54:03 +00003595rm -f conftest.err conftest.$ac_ext
3596
3597done
3598# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3599rm -f conftest.err conftest.$ac_ext
3600if $ac_preproc_ok; then
3601 :
3602else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003603 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003604See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003605echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003606See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003607 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003608fi
3609
3610ac_ext=c
3611ac_cpp='$CPP $CPPFLAGS'
3612ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3613ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3614ac_compiler_gnu=$ac_cv_c_compiler_gnu
3615
3616
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003617{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3618echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003620 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003621else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003622 # Extract the first word of "grep ggrep" to use in msg output
3623if test -z "$GREP"; then
3624set dummy grep ggrep; ac_prog_name=$2
3625if test "${ac_cv_path_GREP+set}" = set; then
3626 echo $ECHO_N "(cached) $ECHO_C" >&6
3627else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628 ac_path_GREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003629# Loop through the user's path and test for each of PROGNAME-LIST
3630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3632do
3633 IFS=$as_save_IFS
3634 test -z "$as_dir" && as_dir=.
3635 for ac_prog in grep ggrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003636 for ac_exec_ext in '' $ac_executable_extensions; do
3637 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3638 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3639 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003640 # Check for GNU $ac_path_GREP
3641case `"$ac_path_GREP" --version 2>&1` in
3642*GNU*)
3643 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3644*)
3645 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003646 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003647 while :
3648 do
3649 cat "conftest.in" "conftest.in" >"conftest.tmp"
3650 mv "conftest.tmp" "conftest.in"
3651 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003652 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3654 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3655 ac_count=`expr $ac_count + 1`
3656 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3657 # Best one so far, save it but keep looking for a better one
3658 ac_cv_path_GREP="$ac_path_GREP"
3659 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003660 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661 # 10*(2^10) chars as input seems more than enough
3662 test $ac_count -gt 10 && break
3663 done
3664 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3665esac
3666
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003667
3668 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669 done
3670done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003671
3672done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003673IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003674
3675
3676fi
3677
3678GREP="$ac_cv_path_GREP"
3679if test -z "$GREP"; then
3680 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3681echo "$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 +00003682 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003683fi
3684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685else
3686 ac_cv_path_GREP=$GREP
3687fi
3688
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003689
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003691{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3692echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693 GREP="$ac_cv_path_GREP"
3694
3695
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003696{ echo "$as_me:$LINENO: checking for egrep" >&5
3697echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003699 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003700else
3701 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3702 then ac_cv_path_EGREP="$GREP -E"
3703 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003704 # Extract the first word of "egrep" to use in msg output
3705if test -z "$EGREP"; then
3706set dummy egrep; ac_prog_name=$2
3707if test "${ac_cv_path_EGREP+set}" = set; then
3708 echo $ECHO_N "(cached) $ECHO_C" >&6
3709else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003710 ac_path_EGREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003711# Loop through the user's path and test for each of PROGNAME-LIST
3712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003713for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3714do
3715 IFS=$as_save_IFS
3716 test -z "$as_dir" && as_dir=.
3717 for ac_prog in egrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003718 for ac_exec_ext in '' $ac_executable_extensions; do
3719 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3720 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3721 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003722 # Check for GNU $ac_path_EGREP
3723case `"$ac_path_EGREP" --version 2>&1` in
3724*GNU*)
3725 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3726*)
3727 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003728 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729 while :
3730 do
3731 cat "conftest.in" "conftest.in" >"conftest.tmp"
3732 mv "conftest.tmp" "conftest.in"
3733 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003734 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3736 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3737 ac_count=`expr $ac_count + 1`
3738 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3739 # Best one so far, save it but keep looking for a better one
3740 ac_cv_path_EGREP="$ac_path_EGREP"
3741 ac_path_EGREP_max=$ac_count
3742 fi
3743 # 10*(2^10) chars as input seems more than enough
3744 test $ac_count -gt 10 && break
3745 done
3746 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3747esac
3748
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003749
3750 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751 done
3752done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003753
3754done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003755IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003756
3757
3758fi
3759
3760EGREP="$ac_cv_path_EGREP"
3761if test -z "$EGREP"; then
3762 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3763echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003764 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003765fi
3766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767else
3768 ac_cv_path_EGREP=$EGREP
3769fi
3770
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003771
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003772 fi
3773fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003774{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3775echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003777
3778
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003779
3780{ echo "$as_me:$LINENO: checking for AIX" >&5
3781echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3782cat >conftest.$ac_ext <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00003783/* confdefs.h. */
3784_ACEOF
3785cat confdefs.h >>conftest.$ac_ext
3786cat >>conftest.$ac_ext <<_ACEOF
3787/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003788#ifdef _AIX
3789 yes
Benjamin Petersona8332062009-09-11 22:36:27 +00003790#endif
3791
Benjamin Petersona8332062009-09-11 22:36:27 +00003792_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003793if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3794 $EGREP "yes" >/dev/null 2>&1; then
3795 { echo "$as_me:$LINENO: result: yes" >&5
3796echo "${ECHO_T}yes" >&6; }
Benjamin Petersona8332062009-09-11 22:36:27 +00003797cat >>confdefs.h <<\_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00003798#define _ALL_SOURCE 1
3799_ACEOF
3800
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003801else
3802 { echo "$as_me:$LINENO: result: no" >&5
3803echo "${ECHO_T}no" >&6; }
3804fi
Mark Dickinson875ada42009-11-28 12:52:39 +00003805rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00003806
3807
3808
3809# Check for unsupported systems
3810case $ac_sys_system/$ac_sys_release in
3811atheos*|Linux*/1*)
3812 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3813 echo See README for details.
3814 exit 1;;
3815esac
3816
3817
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003818{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3819echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003820
3821# Check whether --with-suffix was given.
3822if test "${with_suffix+set}" = set; then
3823 withval=$with_suffix;
3824 case $withval in
3825 no) EXEEXT=;;
3826 yes) EXEEXT=.exe;;
3827 *) EXEEXT=$withval;;
3828 esac
3829fi
3830
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003831{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3832echo "${ECHO_T}$EXEEXT" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003833
3834# Test whether we're running on a non-case-sensitive system, in which
3835# case we give a warning if no ext is given
3836
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003837{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3838echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003839if test ! -d CaseSensitiveTestDir; then
3840mkdir CaseSensitiveTestDir
3841fi
3842
3843if test -d casesensitivetestdir
3844then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003845 { echo "$as_me:$LINENO: result: yes" >&5
3846echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003847 BUILDEXEEXT=.exe
3848else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003849 { echo "$as_me:$LINENO: result: no" >&5
3850echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003851 BUILDEXEEXT=$EXEEXT
3852fi
3853rmdir CaseSensitiveTestDir
3854
3855case $MACHDEP in
3856bsdos*)
3857 case $CC in
3858 gcc) CC="$CC -D_HAVE_BSDI";;
3859 esac;;
3860esac
3861
3862case $ac_sys_system in
3863hp*|HP*)
3864 case $CC in
3865 cc|*/cc) CC="$CC -Ae";;
3866 esac;;
Antoine Pitrou20327222009-05-24 20:39:11 +00003867SunOS*)
3868 # Some functions have a prototype only with that define, e.g. confstr
3869
3870cat >>confdefs.h <<\_ACEOF
3871#define __EXTENSIONS__ 1
3872_ACEOF
3873
3874 ;;
3875esac
3876
3877
3878
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003879{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3880echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003881if test -z "$LIBRARY"
3882then
3883 LIBRARY='libpython$(VERSION).a'
3884fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003885{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3886echo "${ECHO_T}$LIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003887
3888# LDLIBRARY is the name of the library to link against (as opposed to the
3889# name of the library into which to insert object files). BLDLIBRARY is also
3890# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3891# is blank as the main program is not linked directly against LDLIBRARY.
3892# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3893# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3894# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3895# DLLLIBRARY is the shared (i.e., DLL) library.
3896#
3897# RUNSHARED is used to run shared python without installed libraries
3898#
3899# INSTSONAME is the name of the shared library that will be use to install
3900# on the system - some systems like version suffix, others don't
3901
3902
3903
3904
3905
3906
3907LDLIBRARY="$LIBRARY"
3908BLDLIBRARY='$(LDLIBRARY)'
3909INSTSONAME='$(LDLIBRARY)'
3910DLLLIBRARY=''
3911LDLIBRARYDIR=''
3912RUNSHARED=''
3913
3914# LINKCC is the command that links the python executable -- default is $(CC).
3915# If CXX is set, and if it is needed to link a main function that was
3916# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3917# python might then depend on the C++ runtime
3918# This is altered for AIX in order to build the export list before
3919# linking.
3920
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003921{ echo "$as_me:$LINENO: checking LINKCC" >&5
3922echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003923if test -z "$LINKCC"
3924then
3925 LINKCC='$(PURIFY) $(MAINCC)'
3926 case $ac_sys_system in
3927 AIX*)
3928 exp_extra="\"\""
3929 if test $ac_sys_release -ge 5 -o \
3930 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3931 exp_extra="."
3932 fi
3933 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Antoine Pitrou20327222009-05-24 20:39:11 +00003934 QNX*)
3935 # qcc must be used because the other compilers do not
3936 # support -N.
3937 LINKCC=qcc;;
3938 esac
3939fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003940{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3941echo "${ECHO_T}$LINKCC" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003942
3943# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3944# make sure we default having it set to "no": this is used by
3945# distutils.unixccompiler to know if it should add --enable-new-dtags
3946# to linker command lines, and failing to detect GNU ld simply results
3947# in the same bahaviour as before.
3948
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003949{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3950echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003951ac_prog=ld
3952if test "$GCC" = yes; then
3953 ac_prog=`$CC -print-prog-name=ld`
3954fi
3955case `"$ac_prog" -V 2>&1 < /dev/null` in
3956 *GNU*)
3957 GNULD=yes;;
3958 *)
3959 GNULD=no;;
3960esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003961{ echo "$as_me:$LINENO: result: $GNULD" >&5
3962echo "${ECHO_T}$GNULD" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003963
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003964{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3965echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003966# Check whether --enable-shared was given.
3967if test "${enable_shared+set}" = set; then
3968 enableval=$enable_shared;
3969fi
3970
3971
3972if test -z "$enable_shared"
3973then
3974 case $ac_sys_system in
3975 CYGWIN* | atheos*)
3976 enable_shared="yes";;
3977 *)
3978 enable_shared="no";;
3979 esac
3980fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003981{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3982echo "${ECHO_T}$enable_shared" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003983
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003984{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3985echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003986# Check whether --enable-profiling was given.
3987if test "${enable_profiling+set}" = set; then
3988 enableval=$enable_profiling; ac_save_cc="$CC"
3989 CC="$CC -pg"
3990 if test "$cross_compiling" = yes; then
3991 ac_enable_profiling="no"
3992else
3993 cat >conftest.$ac_ext <<_ACEOF
3994/* confdefs.h. */
3995_ACEOF
3996cat confdefs.h >>conftest.$ac_ext
3997cat >>conftest.$ac_ext <<_ACEOF
3998/* end confdefs.h. */
3999int main() { return 0; }
4000_ACEOF
4001rm -f conftest$ac_exeext
4002if { (ac_try="$ac_link"
4003case "(($ac_try" in
4004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4005 *) ac_try_echo=$ac_try;;
4006esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004008 (eval "$ac_link") 2>&5
4009 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004011 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4012 { (case "(($ac_try" in
4013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4014 *) ac_try_echo=$ac_try;;
4015esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004017 (eval "$ac_try") 2>&5
4018 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004020 (exit $ac_status); }; }; then
4021 ac_enable_profiling="yes"
4022else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004023 echo "$as_me: program exited with status $ac_status" >&5
4024echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004025sed 's/^/| /' conftest.$ac_ext >&5
4026
4027( exit $ac_status )
4028ac_enable_profiling="no"
4029fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004030rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4031fi
4032
4033
4034 CC="$ac_save_cc"
4035fi
4036
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004037{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4038echo "${ECHO_T}$ac_enable_profiling" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004039
4040case "$ac_enable_profiling" in
4041 "yes")
4042 BASECFLAGS="-pg $BASECFLAGS"
4043 LDFLAGS="-pg $LDFLAGS"
4044 ;;
4045esac
4046
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004047{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4048echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004049
4050# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4051# library that we build, but we do not want to link against it (we
4052# will find it with a -framework option). For this reason there is an
4053# extra variable BLDLIBRARY against which Python and the extension
4054# modules are linked, BLDLIBRARY. This is normally the same as
4055# LDLIBRARY, but empty for MacOSX framework builds.
4056if test "$enable_framework"
4057then
4058 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4059 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4060 BLDLIBRARY=''
4061else
4062 BLDLIBRARY='$(LDLIBRARY)'
4063fi
4064
4065# Other platforms follow
4066if test $enable_shared = "yes"; then
4067
4068cat >>confdefs.h <<\_ACEOF
4069#define Py_ENABLE_SHARED 1
4070_ACEOF
4071
4072 case $ac_sys_system in
4073 CYGWIN*)
4074 LDLIBRARY='libpython$(VERSION).dll.a'
4075 DLLLIBRARY='libpython$(VERSION).dll'
4076 ;;
4077 SunOS*)
4078 LDLIBRARY='libpython$(VERSION).so'
4079 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4080 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4081 INSTSONAME="$LDLIBRARY".$SOVERSION
4082 ;;
4083 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4084 LDLIBRARY='libpython$(VERSION).so'
4085 BLDLIBRARY='-L. -lpython$(VERSION)'
4086 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4087 case $ac_sys_system in
4088 FreeBSD*)
4089 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4090 ;;
4091 esac
4092 INSTSONAME="$LDLIBRARY".$SOVERSION
4093 ;;
4094 hp*|HP*)
4095 case `uname -m` in
4096 ia64)
4097 LDLIBRARY='libpython$(VERSION).so'
4098 ;;
4099 *)
4100 LDLIBRARY='libpython$(VERSION).sl'
4101 ;;
4102 esac
4103 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4104 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4105 ;;
4106 OSF*)
4107 LDLIBRARY='libpython$(VERSION).so'
4108 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4109 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4110 ;;
4111 atheos*)
4112 LDLIBRARY='libpython$(VERSION).so'
4113 BLDLIBRARY='-L. -lpython$(VERSION)'
4114 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4115 ;;
4116 Darwin*)
4117 LDLIBRARY='libpython$(VERSION).dylib'
4118 BLDLIBRARY='-L. -lpython$(VERSION)'
4119 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4120 ;;
4121
4122 esac
4123else # shared is disabled
4124 case $ac_sys_system in
4125 CYGWIN*)
4126 BLDLIBRARY='$(LIBRARY)'
4127 LDLIBRARY='libpython$(VERSION).dll.a'
4128 ;;
4129 esac
4130fi
4131
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004132{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4133echo "${ECHO_T}$LDLIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004134
4135if test -n "$ac_tool_prefix"; then
4136 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4137set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004138{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4139echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004140if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004141 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004142else
4143 if test -n "$RANLIB"; then
4144 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4145else
4146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4147for as_dir in $PATH
4148do
4149 IFS=$as_save_IFS
4150 test -z "$as_dir" && as_dir=.
4151 for ac_exec_ext in '' $ac_executable_extensions; do
4152 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4153 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004154 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004155 break 2
4156 fi
4157done
4158done
4159IFS=$as_save_IFS
4160
4161fi
4162fi
4163RANLIB=$ac_cv_prog_RANLIB
4164if test -n "$RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004165 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4166echo "${ECHO_T}$RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004167else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004168 { echo "$as_me:$LINENO: result: no" >&5
4169echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004170fi
4171
4172
4173fi
4174if test -z "$ac_cv_prog_RANLIB"; then
4175 ac_ct_RANLIB=$RANLIB
4176 # Extract the first word of "ranlib", so it can be a program name with args.
4177set dummy ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004178{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4179echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004180if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004181 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004182else
4183 if test -n "$ac_ct_RANLIB"; then
4184 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4185else
4186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4187for as_dir in $PATH
4188do
4189 IFS=$as_save_IFS
4190 test -z "$as_dir" && as_dir=.
4191 for ac_exec_ext in '' $ac_executable_extensions; do
4192 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4193 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004194 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004195 break 2
4196 fi
4197done
4198done
4199IFS=$as_save_IFS
4200
4201fi
4202fi
4203ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4204if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004205 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4206echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004207else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004208 { echo "$as_me:$LINENO: result: no" >&5
4209echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004210fi
4211
4212 if test "x$ac_ct_RANLIB" = x; then
4213 RANLIB=":"
4214 else
4215 case $cross_compiling:$ac_tool_warned in
4216yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004217{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4218whose name does not start with the host triplet. If you think this
4219configuration is useful to you, please write to autoconf@gnu.org." >&5
4220echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4221whose name does not start with the host triplet. If you think this
4222configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004223ac_tool_warned=yes ;;
4224esac
4225 RANLIB=$ac_ct_RANLIB
4226 fi
4227else
4228 RANLIB="$ac_cv_prog_RANLIB"
4229fi
4230
4231
4232for ac_prog in ar aal
4233do
4234 # Extract the first word of "$ac_prog", so it can be a program name with args.
4235set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004236{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4237echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004238if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004239 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004240else
4241 if test -n "$AR"; then
4242 ac_cv_prog_AR="$AR" # Let the user override the test.
4243else
4244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4245for as_dir in $PATH
4246do
4247 IFS=$as_save_IFS
4248 test -z "$as_dir" && as_dir=.
4249 for ac_exec_ext in '' $ac_executable_extensions; do
4250 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4251 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004252 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004253 break 2
4254 fi
4255done
4256done
4257IFS=$as_save_IFS
4258
4259fi
4260fi
4261AR=$ac_cv_prog_AR
4262if test -n "$AR"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004263 { echo "$as_me:$LINENO: result: $AR" >&5
4264echo "${ECHO_T}$AR" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004265else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004266 { echo "$as_me:$LINENO: result: no" >&5
4267echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004268fi
4269
4270
4271 test -n "$AR" && break
4272done
4273test -n "$AR" || AR="ar"
4274
4275
4276# tweak ARFLAGS only if the user didn't set it on the command line
4277
4278if test -z "$ARFLAGS"
4279then
4280 ARFLAGS="rc"
4281fi
4282
4283
4284# Extract the first word of "svnversion", so it can be a program name with args.
4285set dummy svnversion; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004286{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4287echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004288if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004289 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004290else
4291 if test -n "$SVNVERSION"; then
4292 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4293else
4294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4295for as_dir in $PATH
4296do
4297 IFS=$as_save_IFS
4298 test -z "$as_dir" && as_dir=.
4299 for ac_exec_ext in '' $ac_executable_extensions; do
4300 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4301 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004302 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004303 break 2
4304 fi
4305done
4306done
4307IFS=$as_save_IFS
4308
4309 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4310fi
4311fi
4312SVNVERSION=$ac_cv_prog_SVNVERSION
4313if test -n "$SVNVERSION"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004314 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4315echo "${ECHO_T}$SVNVERSION" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004316else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004317 { echo "$as_me:$LINENO: result: no" >&5
4318echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004319fi
4320
4321
4322if test $SVNVERSION = found
4323then
4324 SVNVERSION="svnversion \$(srcdir)"
4325else
4326 SVNVERSION="echo Unversioned directory"
4327fi
4328
4329case $MACHDEP in
4330bsdos*|hp*|HP*)
4331 # install -d does not work on BSDI or HP-UX
4332 if test -z "$INSTALL"
4333 then
4334 INSTALL="${srcdir}/install-sh -c"
4335 fi
4336esac
4337ac_aux_dir=
4338for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4339 if test -f "$ac_dir/install-sh"; then
4340 ac_aux_dir=$ac_dir
4341 ac_install_sh="$ac_aux_dir/install-sh -c"
4342 break
4343 elif test -f "$ac_dir/install.sh"; then
4344 ac_aux_dir=$ac_dir
4345 ac_install_sh="$ac_aux_dir/install.sh -c"
4346 break
4347 elif test -f "$ac_dir/shtool"; then
4348 ac_aux_dir=$ac_dir
4349 ac_install_sh="$ac_aux_dir/shtool install -c"
4350 break
4351 fi
4352done
4353if test -z "$ac_aux_dir"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004354 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4355echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004356 { (exit 1); exit 1; }; }
4357fi
4358
4359# These three variables are undocumented and unsupported,
4360# and are intended to be withdrawn in a future Autoconf release.
4361# They can cause serious problems if a builder's source tree is in a directory
4362# whose full name contains unusual characters.
4363ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4364ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4365ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4366
4367
4368# Find a good install program. We prefer a C program (faster),
4369# so one script is as good as another. But avoid the broken or
4370# incompatible versions:
4371# SysV /etc/install, /usr/sbin/install
4372# SunOS /usr/etc/install
4373# IRIX /sbin/install
4374# AIX /bin/install
4375# AmigaOS /C/install, which installs bootblocks on floppy discs
4376# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4377# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4378# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4379# OS/2's system install, which has a completely different semantic
4380# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004381{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4382echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004383if test -z "$INSTALL"; then
4384if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004385 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004386else
4387 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4388for as_dir in $PATH
4389do
4390 IFS=$as_save_IFS
4391 test -z "$as_dir" && as_dir=.
4392 # Account for people who put trailing slashes in PATH elements.
4393case $as_dir/ in
4394 ./ | .// | /cC/* | \
4395 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4396 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4397 /usr/ucb/* ) ;;
4398 *)
4399 # OSF1 and SCO ODT 3.0 have their own names for install.
4400 # Don't use installbsd from OSF since it installs stuff as root
4401 # by default.
4402 for ac_prog in ginstall scoinst install; do
4403 for ac_exec_ext in '' $ac_executable_extensions; do
4404 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4405 if test $ac_prog = install &&
4406 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4407 # AIX install. It has an incompatible calling convention.
4408 :
4409 elif test $ac_prog = install &&
4410 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4411 # program-specific install script used by HP pwplus--don't use.
4412 :
4413 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004414 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4415 break 3
Antoine Pitrou20327222009-05-24 20:39:11 +00004416 fi
4417 fi
4418 done
4419 done
4420 ;;
4421esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004422done
4423IFS=$as_save_IFS
4424
Antoine Pitrou20327222009-05-24 20:39:11 +00004425
4426fi
4427 if test "${ac_cv_path_install+set}" = set; then
4428 INSTALL=$ac_cv_path_install
4429 else
4430 # As a last resort, use the slow shell script. Don't cache a
4431 # value for INSTALL within a source directory, because that will
4432 # break other packages using the cache if that directory is
4433 # removed, or if the value is a relative name.
4434 INSTALL=$ac_install_sh
4435 fi
4436fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004437{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4438echo "${ECHO_T}$INSTALL" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004439
4440# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4441# It thinks the first close brace ends the variable substitution.
4442test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4443
4444test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4445
4446test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4447
4448
4449# Not every filesystem supports hard links
4450
4451if test -z "$LN" ; then
4452 case $ac_sys_system in
4453 CYGWIN*) LN="ln -s";;
4454 atheos*) LN="ln -s";;
4455 *) LN=ln;;
4456 esac
4457fi
4458
4459# Check for --with-pydebug
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004460{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4461echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004462
4463# Check whether --with-pydebug was given.
4464if test "${with_pydebug+set}" = set; then
4465 withval=$with_pydebug;
4466if test "$withval" != no
4467then
4468
4469cat >>confdefs.h <<\_ACEOF
4470#define Py_DEBUG 1
4471_ACEOF
4472
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004473 { echo "$as_me:$LINENO: result: yes" >&5
4474echo "${ECHO_T}yes" >&6; };
Antoine Pitrou20327222009-05-24 20:39:11 +00004475 Py_DEBUG='true'
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004476else { echo "$as_me:$LINENO: result: no" >&5
4477echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Antoine Pitrou20327222009-05-24 20:39:11 +00004478fi
4479else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004480 { echo "$as_me:$LINENO: result: no" >&5
4481echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004482fi
4483
4484
4485# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4486# merged with this chunk of code?
4487
4488# Optimizer/debugger flags
4489# ------------------------
4490# (The following bit of code is complicated enough - please keep things
4491# indented properly. Just pretend you're editing Python code. ;-)
4492
4493# There are two parallel sets of case statements below, one that checks to
4494# see if OPT was set and one that does BASECFLAGS setting based upon
4495# compiler and platform. BASECFLAGS tweaks need to be made even if the
4496# user set OPT.
4497
4498# tweak OPT based on compiler and platform, only if the user didn't set
4499# it on the command line
4500
4501if test -z "$OPT"
4502then
4503 case $GCC in
4504 yes)
4505 if test "$CC" != 'g++' ; then
4506 STRICT_PROTO="-Wstrict-prototypes"
4507 fi
4508 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4509 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4510 WRAP="-fwrapv"
4511 fi
4512 case $ac_cv_prog_cc_g in
4513 yes)
4514 if test "$Py_DEBUG" = 'true' ; then
4515 # Optimization messes up debuggers, so turn it off for
4516 # debug builds.
4517 OPT="-g -Wall $STRICT_PROTO"
4518 else
4519 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4520 fi
4521 ;;
4522 *)
4523 OPT="-O3 -Wall $STRICT_PROTO"
4524 ;;
4525 esac
4526 case $ac_sys_system in
4527 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4528 ;;
4529 esac
4530 ;;
4531
4532 *)
4533 OPT="-O"
4534 ;;
4535 esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004536fi
4537
4538
4539
4540# The -arch flags for universal builds on OSX
4541UNIVERSAL_ARCH_FLAGS=
4542
4543
4544# tweak BASECFLAGS based on compiler and platform
4545case $GCC in
4546yes)
4547 # Python violates C99 rules, by casting between incompatible
4548 # pointer types. GCC may generate bad code as a result of that,
4549 # so use -fno-strict-aliasing if supported.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004550 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4551echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004552 ac_save_cc="$CC"
4553 CC="$CC -fno-strict-aliasing"
4554 if test "$cross_compiling" = yes; then
4555 ac_cv_no_strict_aliasing_ok=no
4556else
4557 cat >conftest.$ac_ext <<_ACEOF
4558/* confdefs.h. */
4559_ACEOF
4560cat confdefs.h >>conftest.$ac_ext
4561cat >>conftest.$ac_ext <<_ACEOF
4562/* end confdefs.h. */
4563int main() { return 0; }
4564_ACEOF
4565rm -f conftest$ac_exeext
4566if { (ac_try="$ac_link"
4567case "(($ac_try" in
4568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4569 *) ac_try_echo=$ac_try;;
4570esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004572 (eval "$ac_link") 2>&5
4573 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004575 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4576 { (case "(($ac_try" in
4577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4578 *) ac_try_echo=$ac_try;;
4579esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004581 (eval "$ac_try") 2>&5
4582 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004584 (exit $ac_status); }; }; then
4585 ac_cv_no_strict_aliasing_ok=yes
4586else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004587 echo "$as_me: program exited with status $ac_status" >&5
4588echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004589sed 's/^/| /' conftest.$ac_ext >&5
4590
4591( exit $ac_status )
4592ac_cv_no_strict_aliasing_ok=no
4593fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4595fi
4596
4597
4598 CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004599 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4600echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004601 if test $ac_cv_no_strict_aliasing_ok = yes
4602 then
4603 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4604 fi
4605
4606 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4607 # support. Without this, treatment of subnormals doesn't follow
4608 # the standard.
4609 case $ac_sys_machine in
4610 alpha*)
4611 BASECFLAGS="$BASECFLAGS -mieee"
4612 ;;
4613 esac
4614
4615 case $ac_sys_system in
4616 SCO_SV*)
4617 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4618 ;;
4619 # is there any other compiler on Darwin besides gcc?
4620 Darwin*)
4621 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4622 # used to be here, but non-Apple gcc doesn't accept them.
4623
4624
4625 if test "${enable_universalsdk}"; then
4626 UNIVERSAL_ARCH_FLAGS=""
4627 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4628 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4629 ARCH_RUN_32BIT=""
4630
4631 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4632 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004633 ARCH_RUN_32BIT="true"
Antoine Pitrou20327222009-05-24 20:39:11 +00004634
4635 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4636 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4637 ARCH_RUN_32BIT="arch -i386 -ppc"
4638
Ronald Oussoren856624d2009-09-08 07:13:53 +00004639 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4640 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4641 ARCH_RUN_32BIT="arch -i386"
4642
4643 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4644 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4645 ARCH_RUN_32BIT="arch -i386 -ppc"
4646
Antoine Pitrou20327222009-05-24 20:39:11 +00004647 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004648 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4649echo "$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 +00004650 { (exit 1); exit 1; }; }
4651
4652 fi
4653
4654
4655 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4656 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4657 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4658 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4659 fi
4660 fi
4661
4662 # Calculate the right deployment target for this build.
4663 #
4664 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4665 if test ${cur_target} '>' 10.2; then
4666 cur_target=10.3
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004667 if test ${enable_universalsdk}; then
4668 if test "${UNIVERSAL_ARCHS}" = "all"; then
4669 # Ensure that the default platform for a
4670 # 4-way universal build is OSX 10.5,
4671 # that's the first OS release where
4672 # 4-way builds make sense.
4673 cur_target='10.5'
Ronald Oussoren856624d2009-09-08 07:13:53 +00004674
4675 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4676 cur_target='10.5'
4677
4678 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4679 cur_target='10.5'
4680
4681 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4682 cur_target='10.5'
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004683 fi
4684 else
4685 if test `arch` = "i386"; then
4686 # On Intel macs default to a deployment
4687 # target of 10.4, that's the first OSX
4688 # release with Intel support.
4689 cur_target="10.4"
4690 fi
4691 fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004692 fi
4693 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4694
4695 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4696 # environment with a value that is the same as what we'll use
4697 # in the Makefile to ensure that we'll get the same compiler
4698 # environment during configure and build time.
4699 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4700 export MACOSX_DEPLOYMENT_TARGET
4701 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4702
4703 ;;
4704 OSF*)
4705 BASECFLAGS="$BASECFLAGS -mieee"
4706 ;;
4707 esac
4708 ;;
4709
4710*)
4711 case $ac_sys_system in
4712 OpenUNIX*|UnixWare*)
4713 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4714 ;;
4715 OSF*)
4716 BASECFLAGS="$BASECFLAGS -ieee -std"
4717 ;;
4718 SCO_SV*)
4719 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4720 ;;
4721 esac
4722 ;;
4723esac
4724
4725if test "$Py_DEBUG" = 'true'; then
4726 :
4727else
4728 OPT="-DNDEBUG $OPT"
4729fi
4730
4731if test "$ac_arch_flags"
4732then
4733 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4734fi
4735
4736# disable check for icc since it seems to pass, but generates a warning
4737if test "$CC" = icc
4738then
4739 ac_cv_opt_olimit_ok=no
4740fi
4741
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004742{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4743echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004744if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004745 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004746else
4747 ac_save_cc="$CC"
4748CC="$CC -OPT:Olimit=0"
4749if test "$cross_compiling" = yes; then
4750 ac_cv_opt_olimit_ok=no
4751else
4752 cat >conftest.$ac_ext <<_ACEOF
4753/* confdefs.h. */
4754_ACEOF
4755cat confdefs.h >>conftest.$ac_ext
4756cat >>conftest.$ac_ext <<_ACEOF
4757/* end confdefs.h. */
4758int main() { return 0; }
4759_ACEOF
4760rm -f conftest$ac_exeext
4761if { (ac_try="$ac_link"
4762case "(($ac_try" in
4763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4764 *) ac_try_echo=$ac_try;;
4765esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004767 (eval "$ac_link") 2>&5
4768 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004770 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4771 { (case "(($ac_try" in
4772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4773 *) ac_try_echo=$ac_try;;
4774esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004776 (eval "$ac_try") 2>&5
4777 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004779 (exit $ac_status); }; }; then
4780 ac_cv_opt_olimit_ok=yes
4781else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004782 echo "$as_me: program exited with status $ac_status" >&5
4783echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004784sed 's/^/| /' conftest.$ac_ext >&5
4785
4786( exit $ac_status )
4787ac_cv_opt_olimit_ok=no
4788fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4790fi
4791
4792
4793CC="$ac_save_cc"
4794fi
4795
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004796{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4797echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004798if test $ac_cv_opt_olimit_ok = yes; then
4799 case $ac_sys_system in
4800 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4801 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4802 # environment?
4803 Darwin*)
4804 ;;
4805 *)
4806 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4807 ;;
4808 esac
4809else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004810 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4811echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004812 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004813 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004814else
4815 ac_save_cc="$CC"
4816 CC="$CC -Olimit 1500"
4817 if test "$cross_compiling" = yes; then
4818 ac_cv_olimit_ok=no
4819else
4820 cat >conftest.$ac_ext <<_ACEOF
4821/* confdefs.h. */
4822_ACEOF
4823cat confdefs.h >>conftest.$ac_ext
4824cat >>conftest.$ac_ext <<_ACEOF
4825/* end confdefs.h. */
4826int main() { return 0; }
4827_ACEOF
4828rm -f conftest$ac_exeext
4829if { (ac_try="$ac_link"
4830case "(($ac_try" in
4831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4832 *) ac_try_echo=$ac_try;;
4833esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004835 (eval "$ac_link") 2>&5
4836 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004838 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4839 { (case "(($ac_try" in
4840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4841 *) ac_try_echo=$ac_try;;
4842esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004844 (eval "$ac_try") 2>&5
4845 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004847 (exit $ac_status); }; }; then
4848 ac_cv_olimit_ok=yes
4849else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004850 echo "$as_me: program exited with status $ac_status" >&5
4851echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004852sed 's/^/| /' conftest.$ac_ext >&5
4853
4854( exit $ac_status )
4855ac_cv_olimit_ok=no
4856fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004857rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4858fi
4859
4860
4861 CC="$ac_save_cc"
4862fi
4863
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004864 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4865echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004866 if test $ac_cv_olimit_ok = yes; then
4867 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4868 fi
4869fi
4870
4871# Check whether GCC supports PyArg_ParseTuple format
4872if test "$GCC" = "yes"
4873then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004874 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4875echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004876 save_CFLAGS=$CFLAGS
4877 CFLAGS="$CFLAGS -Werror"
4878 cat >conftest.$ac_ext <<_ACEOF
4879/* confdefs.h. */
4880_ACEOF
4881cat confdefs.h >>conftest.$ac_ext
4882cat >>conftest.$ac_ext <<_ACEOF
4883/* end confdefs.h. */
4884
4885 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4886
4887int
4888main ()
4889{
4890
4891 ;
4892 return 0;
4893}
4894_ACEOF
4895rm -f conftest.$ac_objext
4896if { (ac_try="$ac_compile"
4897case "(($ac_try" in
4898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4899 *) ac_try_echo=$ac_try;;
4900esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004902 (eval "$ac_compile") 2>conftest.er1
4903 ac_status=$?
4904 grep -v '^ *+' conftest.er1 >conftest.err
4905 rm -f conftest.er1
4906 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004908 (exit $ac_status); } && {
4909 test -z "$ac_c_werror_flag" ||
4910 test ! -s conftest.err
4911 } && test -s conftest.$ac_objext; then
4912
4913cat >>confdefs.h <<\_ACEOF
4914#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4915_ACEOF
4916
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004917 { echo "$as_me:$LINENO: result: yes" >&5
4918echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004919else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004920 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004921sed 's/^/| /' conftest.$ac_ext >&5
4922
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004923 { echo "$as_me:$LINENO: result: no" >&5
4924echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004925
4926fi
4927
4928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4929 CFLAGS=$save_CFLAGS
4930fi
4931
4932# On some compilers, pthreads are available without further options
4933# (e.g. MacOS X). On some of these systems, the compiler will not
4934# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4935# So we have to see first whether pthreads are available without
4936# options before we can check whether -Kpthread improves anything.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004937{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4938echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004939if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004940 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004941else
4942 if test "$cross_compiling" = yes; then
4943 ac_cv_pthread_is_default=no
4944else
4945 cat >conftest.$ac_ext <<_ACEOF
4946/* confdefs.h. */
4947_ACEOF
4948cat confdefs.h >>conftest.$ac_ext
4949cat >>conftest.$ac_ext <<_ACEOF
4950/* end confdefs.h. */
4951
4952#include <pthread.h>
4953
4954void* routine(void* p){return NULL;}
4955
4956int main(){
4957 pthread_t p;
4958 if(pthread_create(&p,NULL,routine,NULL)!=0)
4959 return 1;
4960 (void)pthread_detach(p);
4961 return 0;
4962}
4963
4964_ACEOF
4965rm -f conftest$ac_exeext
4966if { (ac_try="$ac_link"
4967case "(($ac_try" in
4968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4969 *) ac_try_echo=$ac_try;;
4970esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004972 (eval "$ac_link") 2>&5
4973 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004975 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4976 { (case "(($ac_try" in
4977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4978 *) ac_try_echo=$ac_try;;
4979esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004981 (eval "$ac_try") 2>&5
4982 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004984 (exit $ac_status); }; }; then
4985
4986 ac_cv_pthread_is_default=yes
4987 ac_cv_kthread=no
4988 ac_cv_pthread=no
4989
4990else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004991 echo "$as_me: program exited with status $ac_status" >&5
4992echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004993sed 's/^/| /' conftest.$ac_ext >&5
4994
4995( exit $ac_status )
4996ac_cv_pthread_is_default=no
4997fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004998rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4999fi
5000
5001
5002
5003fi
5004
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005005{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5006echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005007
5008
5009if test $ac_cv_pthread_is_default = yes
5010then
5011 ac_cv_kpthread=no
5012else
5013# -Kpthread, if available, provides the right #defines
5014# and linker options to make pthread_create available
5015# Some compilers won't report that they do not support -Kpthread,
5016# so we need to run a program to see whether it really made the
5017# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005018{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5019echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005020if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005021 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005022else
5023 ac_save_cc="$CC"
5024CC="$CC -Kpthread"
5025if test "$cross_compiling" = yes; then
5026 ac_cv_kpthread=no
5027else
5028 cat >conftest.$ac_ext <<_ACEOF
5029/* confdefs.h. */
5030_ACEOF
5031cat confdefs.h >>conftest.$ac_ext
5032cat >>conftest.$ac_ext <<_ACEOF
5033/* end confdefs.h. */
5034
5035#include <pthread.h>
5036
5037void* routine(void* p){return NULL;}
5038
5039int main(){
5040 pthread_t p;
5041 if(pthread_create(&p,NULL,routine,NULL)!=0)
5042 return 1;
5043 (void)pthread_detach(p);
5044 return 0;
5045}
5046
5047_ACEOF
5048rm -f conftest$ac_exeext
5049if { (ac_try="$ac_link"
5050case "(($ac_try" in
5051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5052 *) ac_try_echo=$ac_try;;
5053esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005055 (eval "$ac_link") 2>&5
5056 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005058 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5059 { (case "(($ac_try" in
5060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5061 *) ac_try_echo=$ac_try;;
5062esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005064 (eval "$ac_try") 2>&5
5065 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005067 (exit $ac_status); }; }; then
5068 ac_cv_kpthread=yes
5069else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005070 echo "$as_me: program exited with status $ac_status" >&5
5071echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005072sed 's/^/| /' conftest.$ac_ext >&5
5073
5074( exit $ac_status )
5075ac_cv_kpthread=no
5076fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005077rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5078fi
5079
5080
5081CC="$ac_save_cc"
5082fi
5083
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005084{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5085echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005086fi
5087
5088if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5089then
5090# -Kthread, if available, provides the right #defines
5091# and linker options to make pthread_create available
5092# Some compilers won't report that they do not support -Kthread,
5093# so we need to run a program to see whether it really made the
5094# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005095{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5096echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005097if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005098 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005099else
5100 ac_save_cc="$CC"
5101CC="$CC -Kthread"
5102if test "$cross_compiling" = yes; then
5103 ac_cv_kthread=no
5104else
5105 cat >conftest.$ac_ext <<_ACEOF
5106/* confdefs.h. */
5107_ACEOF
5108cat confdefs.h >>conftest.$ac_ext
5109cat >>conftest.$ac_ext <<_ACEOF
5110/* end confdefs.h. */
5111
5112#include <pthread.h>
5113
5114void* routine(void* p){return NULL;}
5115
5116int main(){
5117 pthread_t p;
5118 if(pthread_create(&p,NULL,routine,NULL)!=0)
5119 return 1;
5120 (void)pthread_detach(p);
5121 return 0;
5122}
5123
5124_ACEOF
5125rm -f conftest$ac_exeext
5126if { (ac_try="$ac_link"
5127case "(($ac_try" in
5128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5129 *) ac_try_echo=$ac_try;;
5130esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005132 (eval "$ac_link") 2>&5
5133 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005135 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5136 { (case "(($ac_try" in
5137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5138 *) ac_try_echo=$ac_try;;
5139esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005141 (eval "$ac_try") 2>&5
5142 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005144 (exit $ac_status); }; }; then
5145 ac_cv_kthread=yes
5146else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005147 echo "$as_me: program exited with status $ac_status" >&5
5148echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005149sed 's/^/| /' conftest.$ac_ext >&5
5150
5151( exit $ac_status )
5152ac_cv_kthread=no
5153fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5155fi
5156
5157
5158CC="$ac_save_cc"
5159fi
5160
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005161{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5162echo "${ECHO_T}$ac_cv_kthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005163fi
5164
5165if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5166then
5167# -pthread, if available, provides the right #defines
5168# and linker options to make pthread_create available
5169# Some compilers won't report that they do not support -pthread,
5170# so we need to run a program to see whether it really made the
5171# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005172{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5173echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005174if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005175 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005176else
5177 ac_save_cc="$CC"
5178CC="$CC -pthread"
5179if test "$cross_compiling" = yes; then
5180 ac_cv_pthread=no
5181else
5182 cat >conftest.$ac_ext <<_ACEOF
5183/* confdefs.h. */
5184_ACEOF
5185cat confdefs.h >>conftest.$ac_ext
5186cat >>conftest.$ac_ext <<_ACEOF
5187/* end confdefs.h. */
5188
5189#include <pthread.h>
5190
5191void* routine(void* p){return NULL;}
5192
5193int main(){
5194 pthread_t p;
5195 if(pthread_create(&p,NULL,routine,NULL)!=0)
5196 return 1;
5197 (void)pthread_detach(p);
5198 return 0;
5199}
5200
5201_ACEOF
5202rm -f conftest$ac_exeext
5203if { (ac_try="$ac_link"
5204case "(($ac_try" in
5205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5206 *) ac_try_echo=$ac_try;;
5207esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005209 (eval "$ac_link") 2>&5
5210 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005212 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5213 { (case "(($ac_try" in
5214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5215 *) ac_try_echo=$ac_try;;
5216esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005218 (eval "$ac_try") 2>&5
5219 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005221 (exit $ac_status); }; }; then
5222 ac_cv_pthread=yes
5223else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005224 echo "$as_me: program exited with status $ac_status" >&5
5225echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005226sed 's/^/| /' conftest.$ac_ext >&5
5227
5228( exit $ac_status )
5229ac_cv_pthread=no
5230fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5232fi
5233
5234
5235CC="$ac_save_cc"
5236fi
5237
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005238{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5239echo "${ECHO_T}$ac_cv_pthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005240fi
5241
5242# If we have set a CC compiler flag for thread support then
5243# check if it works for CXX, too.
5244ac_cv_cxx_thread=no
5245if test ! -z "$CXX"
5246then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005247{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5248echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005249ac_save_cxx="$CXX"
5250
5251if test "$ac_cv_kpthread" = "yes"
5252then
5253 CXX="$CXX -Kpthread"
5254 ac_cv_cxx_thread=yes
5255elif test "$ac_cv_kthread" = "yes"
5256then
5257 CXX="$CXX -Kthread"
5258 ac_cv_cxx_thread=yes
5259elif test "$ac_cv_pthread" = "yes"
5260then
5261 CXX="$CXX -pthread"
5262 ac_cv_cxx_thread=yes
5263fi
5264
5265if test $ac_cv_cxx_thread = yes
5266then
5267 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5268 $CXX -c conftest.$ac_ext 2>&5
5269 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5270 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5271 then
5272 ac_cv_cxx_thread=yes
5273 else
5274 ac_cv_cxx_thread=no
5275 fi
5276 rm -fr conftest*
5277fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005278{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5279echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005280fi
5281CXX="$ac_save_cxx"
5282
5283
5284# checks for header files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005285{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5286echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005287if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005288 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005289else
5290 cat >conftest.$ac_ext <<_ACEOF
5291/* confdefs.h. */
5292_ACEOF
5293cat confdefs.h >>conftest.$ac_ext
5294cat >>conftest.$ac_ext <<_ACEOF
5295/* end confdefs.h. */
5296#include <stdlib.h>
5297#include <stdarg.h>
5298#include <string.h>
5299#include <float.h>
5300
5301int
5302main ()
5303{
5304
5305 ;
5306 return 0;
5307}
5308_ACEOF
5309rm -f conftest.$ac_objext
5310if { (ac_try="$ac_compile"
5311case "(($ac_try" in
5312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5313 *) ac_try_echo=$ac_try;;
5314esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005316 (eval "$ac_compile") 2>conftest.er1
5317 ac_status=$?
5318 grep -v '^ *+' conftest.er1 >conftest.err
5319 rm -f conftest.er1
5320 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005322 (exit $ac_status); } && {
5323 test -z "$ac_c_werror_flag" ||
5324 test ! -s conftest.err
5325 } && test -s conftest.$ac_objext; then
5326 ac_cv_header_stdc=yes
5327else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005328 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005329sed 's/^/| /' conftest.$ac_ext >&5
5330
5331 ac_cv_header_stdc=no
5332fi
5333
5334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5335
5336if test $ac_cv_header_stdc = yes; then
5337 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5338 cat >conftest.$ac_ext <<_ACEOF
5339/* confdefs.h. */
5340_ACEOF
5341cat confdefs.h >>conftest.$ac_ext
5342cat >>conftest.$ac_ext <<_ACEOF
5343/* end confdefs.h. */
5344#include <string.h>
5345
5346_ACEOF
5347if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5348 $EGREP "memchr" >/dev/null 2>&1; then
5349 :
5350else
5351 ac_cv_header_stdc=no
5352fi
Mark Dickinson875ada42009-11-28 12:52:39 +00005353rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005354
5355fi
5356
5357if test $ac_cv_header_stdc = yes; then
5358 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5359 cat >conftest.$ac_ext <<_ACEOF
5360/* confdefs.h. */
5361_ACEOF
5362cat confdefs.h >>conftest.$ac_ext
5363cat >>conftest.$ac_ext <<_ACEOF
5364/* end confdefs.h. */
5365#include <stdlib.h>
5366
5367_ACEOF
5368if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5369 $EGREP "free" >/dev/null 2>&1; then
5370 :
5371else
5372 ac_cv_header_stdc=no
5373fi
Mark Dickinson875ada42009-11-28 12:52:39 +00005374rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005375
5376fi
5377
5378if test $ac_cv_header_stdc = yes; then
5379 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5380 if test "$cross_compiling" = yes; then
5381 :
5382else
5383 cat >conftest.$ac_ext <<_ACEOF
5384/* confdefs.h. */
5385_ACEOF
5386cat confdefs.h >>conftest.$ac_ext
5387cat >>conftest.$ac_ext <<_ACEOF
5388/* end confdefs.h. */
5389#include <ctype.h>
5390#include <stdlib.h>
5391#if ((' ' & 0x0FF) == 0x020)
5392# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5393# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5394#else
5395# define ISLOWER(c) \
5396 (('a' <= (c) && (c) <= 'i') \
5397 || ('j' <= (c) && (c) <= 'r') \
5398 || ('s' <= (c) && (c) <= 'z'))
5399# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5400#endif
5401
5402#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5403int
5404main ()
5405{
5406 int i;
5407 for (i = 0; i < 256; i++)
5408 if (XOR (islower (i), ISLOWER (i))
5409 || toupper (i) != TOUPPER (i))
5410 return 2;
5411 return 0;
5412}
5413_ACEOF
5414rm -f conftest$ac_exeext
5415if { (ac_try="$ac_link"
5416case "(($ac_try" in
5417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5418 *) ac_try_echo=$ac_try;;
5419esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005421 (eval "$ac_link") 2>&5
5422 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005424 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5425 { (case "(($ac_try" in
5426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5427 *) ac_try_echo=$ac_try;;
5428esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005430 (eval "$ac_try") 2>&5
5431 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005433 (exit $ac_status); }; }; then
5434 :
5435else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005436 echo "$as_me: program exited with status $ac_status" >&5
5437echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005438sed 's/^/| /' conftest.$ac_ext >&5
5439
5440( exit $ac_status )
5441ac_cv_header_stdc=no
5442fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005443rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5444fi
5445
5446
5447fi
5448fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005449{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5450echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005451if test $ac_cv_header_stdc = yes; then
5452
5453cat >>confdefs.h <<\_ACEOF
5454#define STDC_HEADERS 1
5455_ACEOF
5456
5457fi
5458
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005459# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5470 inttypes.h stdint.h unistd.h
5471do
5472as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5473{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5474echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5475if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5476 echo $ECHO_N "(cached) $ECHO_C" >&6
5477else
5478 cat >conftest.$ac_ext <<_ACEOF
5479/* confdefs.h. */
5480_ACEOF
5481cat confdefs.h >>conftest.$ac_ext
5482cat >>conftest.$ac_ext <<_ACEOF
5483/* end confdefs.h. */
5484$ac_includes_default
5485
5486#include <$ac_header>
5487_ACEOF
5488rm -f conftest.$ac_objext
5489if { (ac_try="$ac_compile"
5490case "(($ac_try" in
5491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5492 *) ac_try_echo=$ac_try;;
5493esac
5494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5495 (eval "$ac_compile") 2>conftest.er1
5496 ac_status=$?
5497 grep -v '^ *+' conftest.er1 >conftest.err
5498 rm -f conftest.er1
5499 cat conftest.err >&5
5500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5501 (exit $ac_status); } && {
5502 test -z "$ac_c_werror_flag" ||
5503 test ! -s conftest.err
5504 } && test -s conftest.$ac_objext; then
5505 eval "$as_ac_Header=yes"
5506else
5507 echo "$as_me: failed program was:" >&5
5508sed 's/^/| /' conftest.$ac_ext >&5
5509
5510 eval "$as_ac_Header=no"
5511fi
5512
5513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5514fi
5515ac_res=`eval echo '${'$as_ac_Header'}'`
5516 { echo "$as_me:$LINENO: result: $ac_res" >&5
5517echo "${ECHO_T}$ac_res" >&6; }
5518if test `eval echo '${'$as_ac_Header'}'` = yes; then
5519 cat >>confdefs.h <<_ACEOF
5520#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5521_ACEOF
5522
5523fi
5524
5525done
5526
5527
Antoine Pitrou20327222009-05-24 20:39:11 +00005528
Martin v. Löwis11437992002-04-12 09:54:03 +00005529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
Anthony Baxter8a560de2004-10-13 15:30:56 +00005564
Martin v. Löwisc3001752005-01-23 09:27:24 +00005565
Martin v. Löwis11017b12006-01-14 18:12:57 +00005566
Thomas Wouters477c8d52006-05-27 19:21:47 +00005567
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005568
5569
5570
5571
5572
5573
5574
5575
Thomas Wouters89f507f2006-12-13 04:49:30 +00005576
Christian Heimes043d6f62008-01-07 17:19:16 +00005577
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005578
5579
Christian Heimesbbe741d2008-03-28 10:53:29 +00005580
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005581
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005582for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5583fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005584ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005585shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005586unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005587sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5588sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005589sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005590sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005591sys/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 +00005592sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005593bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005594do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005595as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005596if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005597 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5598echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005599if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005600 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005601fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005602ac_res=`eval echo '${'$as_ac_Header'}'`
5603 { echo "$as_me:$LINENO: result: $ac_res" >&5
5604echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005605else
Martin v. Löwis11437992002-04-12 09:54:03 +00005606 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005607{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5608echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005610/* confdefs.h. */
5611_ACEOF
5612cat confdefs.h >>conftest.$ac_ext
5613cat >>conftest.$ac_ext <<_ACEOF
5614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005615$ac_includes_default
5616#include <$ac_header>
5617_ACEOF
5618rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005619if { (ac_try="$ac_compile"
5620case "(($ac_try" in
5621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5622 *) ac_try_echo=$ac_try;;
5623esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005625 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005627 grep -v '^ *+' conftest.er1 >conftest.err
5628 rm -f conftest.er1
5629 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005631 (exit $ac_status); } && {
5632 test -z "$ac_c_werror_flag" ||
5633 test ! -s conftest.err
5634 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005635 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005636else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005638sed 's/^/| /' conftest.$ac_ext >&5
5639
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005640 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005642
5643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005644{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5645echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005646
5647# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005648{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5649echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005650cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005651/* confdefs.h. */
5652_ACEOF
5653cat confdefs.h >>conftest.$ac_ext
5654cat >>conftest.$ac_ext <<_ACEOF
5655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005656#include <$ac_header>
5657_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005658if { (ac_try="$ac_cpp conftest.$ac_ext"
5659case "(($ac_try" in
5660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5661 *) ac_try_echo=$ac_try;;
5662esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005664 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005665 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005666 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005667 rm -f conftest.er1
5668 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005670 (exit $ac_status); } >/dev/null && {
5671 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5672 test ! -s conftest.err
5673 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005674 ac_header_preproc=yes
5675else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005677sed 's/^/| /' conftest.$ac_ext >&5
5678
Martin v. Löwis11437992002-04-12 09:54:03 +00005679 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005681
Martin v. Löwis11437992002-04-12 09:54:03 +00005682rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005683{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5684echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005685
5686# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005687case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5688 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005689 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5690echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5691 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5692echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005693 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005694 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005695 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005696 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5697echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5698 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5699echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5700 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5701echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5702 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5703echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5704 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5705echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5706 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5707echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005708 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005709## -------------------------------------- ##
5710## Report this to http://bugs.python.org/ ##
5711## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005712_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005713 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005714 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005715esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005716{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5717echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005718if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005719 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005720else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005721 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005722fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005723ac_res=`eval echo '${'$as_ac_Header'}'`
5724 { echo "$as_me:$LINENO: result: $ac_res" >&5
5725echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005726
5727fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005728if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005729 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005730#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005731_ACEOF
5732
5733fi
5734
Guido van Rossum627b2d71993-12-24 10:39:16 +00005735done
5736
Martin v. Löwis11437992002-04-12 09:54:03 +00005737
5738
5739
5740
5741
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005742ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005743for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005744 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5745{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5746echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005747if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005748 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005749else
Martin v. Löwis11437992002-04-12 09:54:03 +00005750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005751/* confdefs.h. */
5752_ACEOF
5753cat confdefs.h >>conftest.$ac_ext
5754cat >>conftest.$ac_ext <<_ACEOF
5755/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005756#include <sys/types.h>
5757#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005758
Martin v. Löwis11437992002-04-12 09:54:03 +00005759int
5760main ()
5761{
5762if ((DIR *) 0)
5763return 0;
5764 ;
5765 return 0;
5766}
5767_ACEOF
5768rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005769if { (ac_try="$ac_compile"
5770case "(($ac_try" in
5771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5772 *) ac_try_echo=$ac_try;;
5773esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005775 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005777 grep -v '^ *+' conftest.er1 >conftest.err
5778 rm -f conftest.er1
5779 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005781 (exit $ac_status); } && {
5782 test -z "$ac_c_werror_flag" ||
5783 test ! -s conftest.err
5784 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005785 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005786else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005788sed 's/^/| /' conftest.$ac_ext >&5
5789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005790 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005792
5793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005794fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005795ac_res=`eval echo '${'$as_ac_Header'}'`
5796 { echo "$as_me:$LINENO: result: $ac_res" >&5
5797echo "${ECHO_T}$ac_res" >&6; }
5798if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005799 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005800#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005801_ACEOF
5802
5803ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005804fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005805
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005806done
5807# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5808if test $ac_header_dirent = dirent.h; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005809 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5810echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005811if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005812 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005813else
Martin v. Löwis11437992002-04-12 09:54:03 +00005814 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005815cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005816/* confdefs.h. */
5817_ACEOF
5818cat confdefs.h >>conftest.$ac_ext
5819cat >>conftest.$ac_ext <<_ACEOF
5820/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005821
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005822/* Override any GCC internal prototype to avoid an error.
5823 Use char because int might match the return type of a GCC
5824 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005825#ifdef __cplusplus
5826extern "C"
5827#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005828char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005829int
5830main ()
5831{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005832return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005833 ;
5834 return 0;
5835}
5836_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005837for ac_lib in '' dir; do
5838 if test -z "$ac_lib"; then
5839 ac_res="none required"
5840 else
5841 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005842 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005843 fi
5844 rm -f conftest.$ac_objext conftest$ac_exeext
5845if { (ac_try="$ac_link"
5846case "(($ac_try" in
5847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5848 *) ac_try_echo=$ac_try;;
5849esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005851 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005852 ac_status=$?
5853 grep -v '^ *+' conftest.er1 >conftest.err
5854 rm -f conftest.er1
5855 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005857 (exit $ac_status); } && {
5858 test -z "$ac_c_werror_flag" ||
5859 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005860 } && test -s conftest$ac_exeext &&
5861 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005862 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005863else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005864 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005865sed 's/^/| /' conftest.$ac_ext >&5
5866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005867
Thomas Wouters477c8d52006-05-27 19:21:47 +00005868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005869
5870rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5871 conftest$ac_exeext
5872 if test "${ac_cv_search_opendir+set}" = set; then
5873 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005875done
5876if test "${ac_cv_search_opendir+set}" = set; then
5877 :
5878else
5879 ac_cv_search_opendir=no
5880fi
5881rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005882LIBS=$ac_func_search_save_LIBS
5883fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005884{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5885echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005886ac_res=$ac_cv_search_opendir
5887if test "$ac_res" != no; then
5888 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005889
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005890fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005891
Michael W. Hudson54241132001-12-07 15:38:26 +00005892else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005893 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5894echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005895if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005896 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005897else
5898 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005899cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005900/* confdefs.h. */
5901_ACEOF
5902cat confdefs.h >>conftest.$ac_ext
5903cat >>conftest.$ac_ext <<_ACEOF
5904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005906/* Override any GCC internal prototype to avoid an error.
5907 Use char because int might match the return type of a GCC
5908 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005909#ifdef __cplusplus
5910extern "C"
5911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005912char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005913int
5914main ()
5915{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005916return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005917 ;
5918 return 0;
5919}
5920_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005921for ac_lib in '' x; do
5922 if test -z "$ac_lib"; then
5923 ac_res="none required"
5924 else
5925 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005926 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005927 fi
5928 rm -f conftest.$ac_objext conftest$ac_exeext
5929if { (ac_try="$ac_link"
5930case "(($ac_try" in
5931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5932 *) ac_try_echo=$ac_try;;
5933esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005935 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005936 ac_status=$?
5937 grep -v '^ *+' conftest.er1 >conftest.err
5938 rm -f conftest.er1
5939 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005941 (exit $ac_status); } && {
5942 test -z "$ac_c_werror_flag" ||
5943 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005944 } && test -s conftest$ac_exeext &&
5945 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005946 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005947else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005948 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005949sed 's/^/| /' conftest.$ac_ext >&5
5950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005951
Thomas Wouters477c8d52006-05-27 19:21:47 +00005952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005953
5954rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5955 conftest$ac_exeext
5956 if test "${ac_cv_search_opendir+set}" = set; then
5957 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005958fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005959done
5960if test "${ac_cv_search_opendir+set}" = set; then
5961 :
5962else
5963 ac_cv_search_opendir=no
5964fi
5965rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005966LIBS=$ac_func_search_save_LIBS
5967fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005968{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5969echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005970ac_res=$ac_cv_search_opendir
5971if test "$ac_res" != no; then
5972 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005973
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005974fi
5975
5976fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005977
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005978{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5979echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005980if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005981 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005982else
5983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005984/* confdefs.h. */
5985_ACEOF
5986cat confdefs.h >>conftest.$ac_ext
5987cat >>conftest.$ac_ext <<_ACEOF
5988/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005989#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005990int
5991main ()
5992{
5993return makedev(0, 0);
5994 ;
5995 return 0;
5996}
5997_ACEOF
5998rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005999if { (ac_try="$ac_link"
6000case "(($ac_try" in
6001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6002 *) ac_try_echo=$ac_try;;
6003esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006005 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006007 grep -v '^ *+' conftest.er1 >conftest.err
6008 rm -f conftest.er1
6009 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006011 (exit $ac_status); } && {
6012 test -z "$ac_c_werror_flag" ||
6013 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006014 } && test -s conftest$ac_exeext &&
6015 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006016 ac_cv_header_sys_types_h_makedev=yes
6017else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006019sed 's/^/| /' conftest.$ac_ext >&5
6020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006021 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006023
6024rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006025 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006026
6027fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006028{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6029echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006030
6031if test $ac_cv_header_sys_types_h_makedev = no; then
6032if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006033 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6034echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006035if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006036 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006037fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006038{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6039echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006040else
6041 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006042{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6043echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006044cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006045/* confdefs.h. */
6046_ACEOF
6047cat confdefs.h >>conftest.$ac_ext
6048cat >>conftest.$ac_ext <<_ACEOF
6049/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006050$ac_includes_default
6051#include <sys/mkdev.h>
6052_ACEOF
6053rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006054if { (ac_try="$ac_compile"
6055case "(($ac_try" in
6056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6057 *) ac_try_echo=$ac_try;;
6058esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006060 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006061 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006062 grep -v '^ *+' conftest.er1 >conftest.err
6063 rm -f conftest.er1
6064 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006066 (exit $ac_status); } && {
6067 test -z "$ac_c_werror_flag" ||
6068 test ! -s conftest.err
6069 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070 ac_header_compiler=yes
6071else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006073sed 's/^/| /' conftest.$ac_ext >&5
6074
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006075 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006077
6078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006079{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6080echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006081
6082# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006083{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6084echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006085cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006086/* confdefs.h. */
6087_ACEOF
6088cat confdefs.h >>conftest.$ac_ext
6089cat >>conftest.$ac_ext <<_ACEOF
6090/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091#include <sys/mkdev.h>
6092_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006093if { (ac_try="$ac_cpp conftest.$ac_ext"
6094case "(($ac_try" in
6095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6096 *) ac_try_echo=$ac_try;;
6097esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006099 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006100 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006101 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102 rm -f conftest.er1
6103 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006105 (exit $ac_status); } >/dev/null && {
6106 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6107 test ! -s conftest.err
6108 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006109 ac_header_preproc=yes
6110else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006112sed 's/^/| /' conftest.$ac_ext >&5
6113
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114 ac_header_preproc=no
6115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006116
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006117rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006118{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6119echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006120
6121# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006122case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6123 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006124 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6125echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6126 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6127echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006128 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006129 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006130 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006131 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6132echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6133 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6134echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6135 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6136echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6137 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6138echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6139 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6140echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6141 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6142echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006143 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006144## -------------------------------------- ##
6145## Report this to http://bugs.python.org/ ##
6146## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006147_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006148 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006149 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006150esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006151{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6152echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006154 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006155else
6156 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6157fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006158{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6159echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006160
6161fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006162if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163
6164cat >>confdefs.h <<\_ACEOF
6165#define MAJOR_IN_MKDEV 1
6166_ACEOF
6167
6168fi
6169
6170
6171
6172 if test $ac_cv_header_sys_mkdev_h = no; then
6173 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006174 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6175echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006176if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006177 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006179{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6180echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006181else
6182 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006183{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6184echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006185cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006186/* confdefs.h. */
6187_ACEOF
6188cat confdefs.h >>conftest.$ac_ext
6189cat >>conftest.$ac_ext <<_ACEOF
6190/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191$ac_includes_default
6192#include <sys/sysmacros.h>
6193_ACEOF
6194rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006195if { (ac_try="$ac_compile"
6196case "(($ac_try" in
6197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6198 *) ac_try_echo=$ac_try;;
6199esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006201 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006202 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006203 grep -v '^ *+' conftest.er1 >conftest.err
6204 rm -f conftest.er1
6205 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006207 (exit $ac_status); } && {
6208 test -z "$ac_c_werror_flag" ||
6209 test ! -s conftest.err
6210 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211 ac_header_compiler=yes
6212else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006213 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006214sed 's/^/| /' conftest.$ac_ext >&5
6215
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006216 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006218
6219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006220{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6221echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222
6223# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006224{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6225echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006226cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006227/* confdefs.h. */
6228_ACEOF
6229cat confdefs.h >>conftest.$ac_ext
6230cat >>conftest.$ac_ext <<_ACEOF
6231/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232#include <sys/sysmacros.h>
6233_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006234if { (ac_try="$ac_cpp conftest.$ac_ext"
6235case "(($ac_try" in
6236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6237 *) ac_try_echo=$ac_try;;
6238esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006240 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006241 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006242 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243 rm -f conftest.er1
6244 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006246 (exit $ac_status); } >/dev/null && {
6247 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6248 test ! -s conftest.err
6249 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006250 ac_header_preproc=yes
6251else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006252 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006253sed 's/^/| /' conftest.$ac_ext >&5
6254
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255 ac_header_preproc=no
6256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006257
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006258rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006259{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6260echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006261
6262# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006263case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6264 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006265 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6266echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6267 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6268echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006269 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006270 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006271 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006272 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6273echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6274 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6275echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6276 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6277echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6278 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6279echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6280 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6281echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6282 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6283echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006284 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006285## -------------------------------------- ##
6286## Report this to http://bugs.python.org/ ##
6287## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006288_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006289 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006290 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006291esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006292{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6293echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006294if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006295 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006296else
6297 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6298fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006299{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6300echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301
6302fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006303if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304
6305cat >>confdefs.h <<\_ACEOF
6306#define MAJOR_IN_SYSMACROS 1
6307_ACEOF
6308
6309fi
6310
6311
6312 fi
6313fi
6314
Michael W. Hudson54241132001-12-07 15:38:26 +00006315
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006316# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006317
6318for ac_header in term.h
6319do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006320as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6321{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6322echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006323if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006324 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006325else
6326 cat >conftest.$ac_ext <<_ACEOF
6327/* confdefs.h. */
6328_ACEOF
6329cat confdefs.h >>conftest.$ac_ext
6330cat >>conftest.$ac_ext <<_ACEOF
6331/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006332
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006333#ifdef HAVE_CURSES_H
6334#include <curses.h>
6335#endif
6336
6337
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006338#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006339_ACEOF
6340rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006341if { (ac_try="$ac_compile"
6342case "(($ac_try" in
6343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6344 *) ac_try_echo=$ac_try;;
6345esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006347 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006348 ac_status=$?
6349 grep -v '^ *+' conftest.er1 >conftest.err
6350 rm -f conftest.er1
6351 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006353 (exit $ac_status); } && {
6354 test -z "$ac_c_werror_flag" ||
6355 test ! -s conftest.err
6356 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006357 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006358else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006359 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006360sed 's/^/| /' conftest.$ac_ext >&5
6361
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006362 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006364
6365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006366fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006367ac_res=`eval echo '${'$as_ac_Header'}'`
6368 { echo "$as_me:$LINENO: result: $ac_res" >&5
6369echo "${ECHO_T}$ac_res" >&6; }
6370if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006371 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006372#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006373_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006374
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006375fi
6376
6377done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006378
6379
Martin v. Löwis11017b12006-01-14 18:12:57 +00006380# On Linux, netlink.h requires asm/types.h
6381
6382for ac_header in linux/netlink.h
6383do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006384as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6385{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6386echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006387if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006388 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006389else
6390 cat >conftest.$ac_ext <<_ACEOF
6391/* confdefs.h. */
6392_ACEOF
6393cat confdefs.h >>conftest.$ac_ext
6394cat >>conftest.$ac_ext <<_ACEOF
6395/* end confdefs.h. */
6396
6397#ifdef HAVE_ASM_TYPES_H
6398#include <asm/types.h>
6399#endif
6400#ifdef HAVE_SYS_SOCKET_H
6401#include <sys/socket.h>
6402#endif
6403
6404
6405#include <$ac_header>
6406_ACEOF
6407rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006408if { (ac_try="$ac_compile"
6409case "(($ac_try" in
6410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6411 *) ac_try_echo=$ac_try;;
6412esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006414 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006415 ac_status=$?
6416 grep -v '^ *+' conftest.er1 >conftest.err
6417 rm -f conftest.er1
6418 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006420 (exit $ac_status); } && {
6421 test -z "$ac_c_werror_flag" ||
6422 test ! -s conftest.err
6423 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006424 eval "$as_ac_Header=yes"
6425else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006426 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006427sed 's/^/| /' conftest.$ac_ext >&5
6428
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006429 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006431
6432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006433fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006434ac_res=`eval echo '${'$as_ac_Header'}'`
6435 { echo "$as_me:$LINENO: result: $ac_res" >&5
6436echo "${ECHO_T}$ac_res" >&6; }
6437if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006438 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006439#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006440_ACEOF
6441
6442fi
6443
6444done
6445
6446
Guido van Rossum627b2d71993-12-24 10:39:16 +00006447# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006448was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006449{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6450echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006451cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006452/* confdefs.h. */
6453_ACEOF
6454cat confdefs.h >>conftest.$ac_ext
6455cat >>conftest.$ac_ext <<_ACEOF
6456/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006457#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006458
6459_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006460if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006461 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006462 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006463else
Martin v. Löwis11437992002-04-12 09:54:03 +00006464
6465
6466cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006467#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006468_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006469
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006470
Guido van Rossum627b2d71993-12-24 10:39:16 +00006471fi
Mark Dickinson875ada42009-11-28 12:52:39 +00006472rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006473
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006474{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6475echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006476
Neal Norwitz11690112002-07-30 01:08:28 +00006477# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006478{ echo "$as_me:$LINENO: checking for makedev" >&5
6479echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006480cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006481/* confdefs.h. */
6482_ACEOF
6483cat confdefs.h >>conftest.$ac_ext
6484cat >>conftest.$ac_ext <<_ACEOF
6485/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006486#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006487int
6488main ()
6489{
6490 makedev(0, 0)
6491 ;
6492 return 0;
6493}
6494_ACEOF
6495rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006496if { (ac_try="$ac_link"
6497case "(($ac_try" in
6498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6499 *) ac_try_echo=$ac_try;;
6500esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006502 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006504 grep -v '^ *+' conftest.er1 >conftest.err
6505 rm -f conftest.er1
6506 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006508 (exit $ac_status); } && {
6509 test -z "$ac_c_werror_flag" ||
6510 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006511 } && test -s conftest$ac_exeext &&
6512 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006513 ac_cv_has_makedev=yes
6514else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006516sed 's/^/| /' conftest.$ac_ext >&5
6517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006518 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006520
6521rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006522 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006523if test "$ac_cv_has_makedev" = "no"; then
6524 # we didn't link, try if _OSF_SOURCE will allow us to link
6525 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006526/* confdefs.h. */
6527_ACEOF
6528cat confdefs.h >>conftest.$ac_ext
6529cat >>conftest.$ac_ext <<_ACEOF
6530/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006531
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006532#define _OSF_SOURCE 1
6533#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006534
Neal Norwitz11690112002-07-30 01:08:28 +00006535int
6536main ()
6537{
6538 makedev(0, 0)
6539 ;
6540 return 0;
6541}
6542_ACEOF
6543rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006544if { (ac_try="$ac_link"
6545case "(($ac_try" in
6546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6547 *) ac_try_echo=$ac_try;;
6548esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006550 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006552 grep -v '^ *+' conftest.er1 >conftest.err
6553 rm -f conftest.er1
6554 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006556 (exit $ac_status); } && {
6557 test -z "$ac_c_werror_flag" ||
6558 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006559 } && test -s conftest$ac_exeext &&
6560 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006561 ac_cv_has_makedev=yes
6562else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006564sed 's/^/| /' conftest.$ac_ext >&5
6565
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006566 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006568
6569rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006570 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006571 if test "$ac_cv_has_makedev" = "yes"; then
6572
6573cat >>confdefs.h <<\_ACEOF
6574#define _OSF_SOURCE 1
6575_ACEOF
6576
6577 fi
6578fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006579{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6580echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006581if test "$ac_cv_has_makedev" = "yes"; then
6582
6583cat >>confdefs.h <<\_ACEOF
6584#define HAVE_MAKEDEV 1
6585_ACEOF
6586
6587fi
6588
Martin v. Löwis399a6892002-10-04 10:22:02 +00006589# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6590# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6591# defined, but the compiler does not support pragma redefine_extname,
6592# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6593# structures (such as rlimit64) without declaring them. As a
6594# work-around, disable LFS on such configurations
6595
6596use_lfs=yes
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006597{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6598echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006599cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006600/* confdefs.h. */
6601_ACEOF
6602cat confdefs.h >>conftest.$ac_ext
6603cat >>conftest.$ac_ext <<_ACEOF
6604/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006605
6606#define _LARGEFILE_SOURCE 1
6607#define _FILE_OFFSET_BITS 64
6608#include <sys/resource.h>
6609
Martin v. Löwis399a6892002-10-04 10:22:02 +00006610int
6611main ()
6612{
6613struct rlimit foo;
6614 ;
6615 return 0;
6616}
6617_ACEOF
6618rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006619if { (ac_try="$ac_compile"
6620case "(($ac_try" in
6621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6622 *) ac_try_echo=$ac_try;;
6623esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006625 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006627 grep -v '^ *+' conftest.er1 >conftest.err
6628 rm -f conftest.er1
6629 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006631 (exit $ac_status); } && {
6632 test -z "$ac_c_werror_flag" ||
6633 test ! -s conftest.err
6634 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006635 sol_lfs_bug=no
6636else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006638sed 's/^/| /' conftest.$ac_ext >&5
6639
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006640 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006642
6643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006644{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6645echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006646if test "$sol_lfs_bug" = "yes"; then
6647 use_lfs=no
6648fi
6649
6650if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006651# Two defines needed to enable largefile support on various platforms
6652# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006653
Martin v. Löwis11437992002-04-12 09:54:03 +00006654cat >>confdefs.h <<\_ACEOF
6655#define _LARGEFILE_SOURCE 1
6656_ACEOF
6657
6658
6659cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006660#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006661_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006662
Martin v. Löwis399a6892002-10-04 10:22:02 +00006663fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006664
Guido van Rossum84e7b241996-08-19 21:59:00 +00006665# Add some code to confdefs.h so that the test for off_t works on SCO
6666cat >> confdefs.h <<\EOF
6667#if defined(SCO_DS)
6668#undef _OFF_T
6669#endif
6670EOF
6671
Guido van Rossumef2255b2000-03-10 22:30:29 +00006672# Type availability checks
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006673{ echo "$as_me:$LINENO: checking for mode_t" >&5
6674echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006675if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006676 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006677else
Benjamin Petersona8332062009-09-11 22:36:27 +00006678 cat >conftest.$ac_ext <<_ACEOF
6679/* confdefs.h. */
6680_ACEOF
6681cat confdefs.h >>conftest.$ac_ext
6682cat >>conftest.$ac_ext <<_ACEOF
6683/* end confdefs.h. */
6684$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006685typedef mode_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006686int
6687main ()
6688{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006689if ((ac__type_new_ *) 0)
6690 return 0;
6691if (sizeof (ac__type_new_))
6692 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006693 ;
6694 return 0;
6695}
6696_ACEOF
6697rm -f conftest.$ac_objext
6698if { (ac_try="$ac_compile"
6699case "(($ac_try" in
6700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6701 *) ac_try_echo=$ac_try;;
6702esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006704 (eval "$ac_compile") 2>conftest.er1
6705 ac_status=$?
6706 grep -v '^ *+' conftest.er1 >conftest.err
6707 rm -f conftest.er1
6708 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006710 (exit $ac_status); } && {
6711 test -z "$ac_c_werror_flag" ||
6712 test ! -s conftest.err
6713 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006714 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006715else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006717sed 's/^/| /' conftest.$ac_ext >&5
6718
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006719 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006721
6722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006723fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006724{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6725echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6726if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006727 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006728else
Martin v. Löwis11437992002-04-12 09:54:03 +00006729
6730cat >>confdefs.h <<_ACEOF
6731#define mode_t int
6732_ACEOF
6733
6734fi
6735
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006736{ echo "$as_me:$LINENO: checking for off_t" >&5
6737echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006738if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006739 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006740else
Benjamin Petersona8332062009-09-11 22:36:27 +00006741 cat >conftest.$ac_ext <<_ACEOF
6742/* confdefs.h. */
6743_ACEOF
6744cat confdefs.h >>conftest.$ac_ext
6745cat >>conftest.$ac_ext <<_ACEOF
6746/* end confdefs.h. */
6747$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006748typedef off_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006749int
6750main ()
6751{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006752if ((ac__type_new_ *) 0)
6753 return 0;
6754if (sizeof (ac__type_new_))
6755 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006756 ;
6757 return 0;
6758}
6759_ACEOF
6760rm -f conftest.$ac_objext
6761if { (ac_try="$ac_compile"
6762case "(($ac_try" in
6763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6764 *) ac_try_echo=$ac_try;;
6765esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006767 (eval "$ac_compile") 2>conftest.er1
6768 ac_status=$?
6769 grep -v '^ *+' conftest.er1 >conftest.err
6770 rm -f conftest.er1
6771 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006773 (exit $ac_status); } && {
6774 test -z "$ac_c_werror_flag" ||
6775 test ! -s conftest.err
6776 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006777 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006778else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006780sed 's/^/| /' conftest.$ac_ext >&5
6781
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006782 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006784
6785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006786fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006787{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6788echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6789if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006790 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006791else
Martin v. Löwis11437992002-04-12 09:54:03 +00006792
6793cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006794#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006795_ACEOF
6796
6797fi
6798
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006799{ echo "$as_me:$LINENO: checking for pid_t" >&5
6800echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006801if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006802 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006803else
Benjamin Petersona8332062009-09-11 22:36:27 +00006804 cat >conftest.$ac_ext <<_ACEOF
6805/* confdefs.h. */
6806_ACEOF
6807cat confdefs.h >>conftest.$ac_ext
6808cat >>conftest.$ac_ext <<_ACEOF
6809/* end confdefs.h. */
6810$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006811typedef pid_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006812int
6813main ()
6814{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006815if ((ac__type_new_ *) 0)
6816 return 0;
6817if (sizeof (ac__type_new_))
6818 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006819 ;
6820 return 0;
6821}
6822_ACEOF
6823rm -f conftest.$ac_objext
6824if { (ac_try="$ac_compile"
6825case "(($ac_try" in
6826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6827 *) ac_try_echo=$ac_try;;
6828esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006830 (eval "$ac_compile") 2>conftest.er1
6831 ac_status=$?
6832 grep -v '^ *+' conftest.er1 >conftest.err
6833 rm -f conftest.er1
6834 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006836 (exit $ac_status); } && {
6837 test -z "$ac_c_werror_flag" ||
6838 test ! -s conftest.err
6839 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006840 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006841else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006843sed 's/^/| /' conftest.$ac_ext >&5
6844
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006845 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006847
6848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006849fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006850{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6851echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6852if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006853 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006854else
Martin v. Löwis11437992002-04-12 09:54:03 +00006855
6856cat >>confdefs.h <<_ACEOF
6857#define pid_t int
6858_ACEOF
6859
6860fi
6861
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006862{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6863echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006864if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006865 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006866else
6867 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006868/* confdefs.h. */
6869_ACEOF
6870cat confdefs.h >>conftest.$ac_ext
6871cat >>conftest.$ac_ext <<_ACEOF
6872/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006873#include <sys/types.h>
6874#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006875
Martin v. Löwis11437992002-04-12 09:54:03 +00006876int
6877main ()
6878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006879return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006880 ;
6881 return 0;
6882}
6883_ACEOF
6884rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006885if { (ac_try="$ac_compile"
6886case "(($ac_try" in
6887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6888 *) ac_try_echo=$ac_try;;
6889esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006891 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006893 grep -v '^ *+' conftest.er1 >conftest.err
6894 rm -f conftest.er1
6895 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006897 (exit $ac_status); } && {
6898 test -z "$ac_c_werror_flag" ||
6899 test ! -s conftest.err
6900 } && test -s conftest.$ac_objext; then
6901 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006902else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006903 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006904sed 's/^/| /' conftest.$ac_ext >&5
6905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006906 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006907fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006908
6909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006910fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006911{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6912echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006913
Martin v. Löwis11437992002-04-12 09:54:03 +00006914cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006915#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006916_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006917
Michael W. Hudson54241132001-12-07 15:38:26 +00006918
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006919{ echo "$as_me:$LINENO: checking for size_t" >&5
6920echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006921if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006922 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006923else
Benjamin Petersona8332062009-09-11 22:36:27 +00006924 cat >conftest.$ac_ext <<_ACEOF
6925/* confdefs.h. */
6926_ACEOF
6927cat confdefs.h >>conftest.$ac_ext
6928cat >>conftest.$ac_ext <<_ACEOF
6929/* end confdefs.h. */
6930$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006931typedef size_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006932int
6933main ()
6934{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006935if ((ac__type_new_ *) 0)
6936 return 0;
6937if (sizeof (ac__type_new_))
6938 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006939 ;
6940 return 0;
6941}
6942_ACEOF
6943rm -f conftest.$ac_objext
6944if { (ac_try="$ac_compile"
6945case "(($ac_try" in
6946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6947 *) ac_try_echo=$ac_try;;
6948esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006950 (eval "$ac_compile") 2>conftest.er1
6951 ac_status=$?
6952 grep -v '^ *+' conftest.er1 >conftest.err
6953 rm -f conftest.er1
6954 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006956 (exit $ac_status); } && {
6957 test -z "$ac_c_werror_flag" ||
6958 test ! -s conftest.err
6959 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006960 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006961else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006963sed 's/^/| /' conftest.$ac_ext >&5
6964
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006965 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006967
6968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006969fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006970{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6971echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6972if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006973 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006974else
Martin v. Löwis11437992002-04-12 09:54:03 +00006975
6976cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006977#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006978_ACEOF
6979
6980fi
6981
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006982{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6983echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006984if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006985 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006986else
6987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006988/* confdefs.h. */
6989_ACEOF
6990cat confdefs.h >>conftest.$ac_ext
6991cat >>conftest.$ac_ext <<_ACEOF
6992/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006993#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006994
6995_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006997 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006998 ac_cv_type_uid_t=yes
6999else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007000 ac_cv_type_uid_t=no
7001fi
Mark Dickinson875ada42009-11-28 12:52:39 +00007002rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007003
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007004fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007005{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7006echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007007if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007008
Martin v. Löwis11437992002-04-12 09:54:03 +00007009cat >>confdefs.h <<\_ACEOF
7010#define uid_t int
7011_ACEOF
7012
7013
7014cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007015#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007016_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007017
7018fi
7019
Mark Dickinsonbd792642009-03-18 20:06:12 +00007020
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007021 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7022echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007023if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007024 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007025else
7026 ac_cv_c_uint32_t=no
7027 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7028 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7029 cat >conftest.$ac_ext <<_ACEOF
7030/* confdefs.h. */
7031_ACEOF
7032cat confdefs.h >>conftest.$ac_ext
7033cat >>conftest.$ac_ext <<_ACEOF
7034/* end confdefs.h. */
7035$ac_includes_default
7036int
7037main ()
7038{
7039static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7040test_array [0] = 0
7041
7042 ;
7043 return 0;
7044}
7045_ACEOF
7046rm -f conftest.$ac_objext
7047if { (ac_try="$ac_compile"
7048case "(($ac_try" in
7049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7050 *) ac_try_echo=$ac_try;;
7051esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007053 (eval "$ac_compile") 2>conftest.er1
7054 ac_status=$?
7055 grep -v '^ *+' conftest.er1 >conftest.err
7056 rm -f conftest.er1
7057 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007059 (exit $ac_status); } && {
7060 test -z "$ac_c_werror_flag" ||
7061 test ! -s conftest.err
7062 } && test -s conftest.$ac_objext; then
7063 case $ac_type in
7064 uint32_t) ac_cv_c_uint32_t=yes ;;
7065 *) ac_cv_c_uint32_t=$ac_type ;;
7066esac
7067
7068else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007069 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007070sed 's/^/| /' conftest.$ac_ext >&5
7071
7072
7073fi
7074
7075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7076 test "$ac_cv_c_uint32_t" != no && break
7077 done
7078fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007079{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7080echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007081 case $ac_cv_c_uint32_t in #(
7082 no|yes) ;; #(
7083 *)
7084
7085cat >>confdefs.h <<\_ACEOF
7086#define _UINT32_T 1
7087_ACEOF
7088
7089
7090cat >>confdefs.h <<_ACEOF
7091#define uint32_t $ac_cv_c_uint32_t
7092_ACEOF
7093;;
7094 esac
7095
7096
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007097 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7098echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007099if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007100 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007101else
7102 ac_cv_c_uint64_t=no
7103 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7104 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7105 cat >conftest.$ac_ext <<_ACEOF
7106/* confdefs.h. */
7107_ACEOF
7108cat confdefs.h >>conftest.$ac_ext
7109cat >>conftest.$ac_ext <<_ACEOF
7110/* end confdefs.h. */
7111$ac_includes_default
7112int
7113main ()
7114{
7115static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7116test_array [0] = 0
7117
7118 ;
7119 return 0;
7120}
7121_ACEOF
7122rm -f conftest.$ac_objext
7123if { (ac_try="$ac_compile"
7124case "(($ac_try" in
7125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7126 *) ac_try_echo=$ac_try;;
7127esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007129 (eval "$ac_compile") 2>conftest.er1
7130 ac_status=$?
7131 grep -v '^ *+' conftest.er1 >conftest.err
7132 rm -f conftest.er1
7133 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007135 (exit $ac_status); } && {
7136 test -z "$ac_c_werror_flag" ||
7137 test ! -s conftest.err
7138 } && test -s conftest.$ac_objext; then
7139 case $ac_type in
7140 uint64_t) ac_cv_c_uint64_t=yes ;;
7141 *) ac_cv_c_uint64_t=$ac_type ;;
7142esac
7143
7144else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007145 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007146sed 's/^/| /' conftest.$ac_ext >&5
7147
7148
7149fi
7150
7151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7152 test "$ac_cv_c_uint64_t" != no && break
7153 done
7154fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007155{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7156echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007157 case $ac_cv_c_uint64_t in #(
7158 no|yes) ;; #(
7159 *)
7160
7161cat >>confdefs.h <<\_ACEOF
7162#define _UINT64_T 1
7163_ACEOF
7164
7165
7166cat >>confdefs.h <<_ACEOF
7167#define uint64_t $ac_cv_c_uint64_t
7168_ACEOF
7169;;
7170 esac
7171
7172
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007173 { echo "$as_me:$LINENO: checking for int32_t" >&5
7174echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007175if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007176 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007177else
7178 ac_cv_c_int32_t=no
7179 for ac_type in 'int32_t' 'int' 'long int' \
7180 'long long int' 'short int' 'signed char'; do
7181 cat >conftest.$ac_ext <<_ACEOF
7182/* confdefs.h. */
7183_ACEOF
7184cat confdefs.h >>conftest.$ac_ext
7185cat >>conftest.$ac_ext <<_ACEOF
7186/* end confdefs.h. */
7187$ac_includes_default
7188int
7189main ()
7190{
7191static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7192test_array [0] = 0
7193
7194 ;
7195 return 0;
7196}
7197_ACEOF
7198rm -f conftest.$ac_objext
7199if { (ac_try="$ac_compile"
7200case "(($ac_try" in
7201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7202 *) ac_try_echo=$ac_try;;
7203esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007205 (eval "$ac_compile") 2>conftest.er1
7206 ac_status=$?
7207 grep -v '^ *+' conftest.er1 >conftest.err
7208 rm -f conftest.er1
7209 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007211 (exit $ac_status); } && {
7212 test -z "$ac_c_werror_flag" ||
7213 test ! -s conftest.err
7214 } && test -s conftest.$ac_objext; then
7215 cat >conftest.$ac_ext <<_ACEOF
7216/* confdefs.h. */
7217_ACEOF
7218cat confdefs.h >>conftest.$ac_ext
7219cat >>conftest.$ac_ext <<_ACEOF
7220/* end confdefs.h. */
7221$ac_includes_default
7222int
7223main ()
7224{
7225static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007226 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007227test_array [0] = 0
7228
7229 ;
7230 return 0;
7231}
7232_ACEOF
7233rm -f conftest.$ac_objext
7234if { (ac_try="$ac_compile"
7235case "(($ac_try" in
7236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7237 *) ac_try_echo=$ac_try;;
7238esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007240 (eval "$ac_compile") 2>conftest.er1
7241 ac_status=$?
7242 grep -v '^ *+' conftest.er1 >conftest.err
7243 rm -f conftest.er1
7244 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007246 (exit $ac_status); } && {
7247 test -z "$ac_c_werror_flag" ||
7248 test ! -s conftest.err
7249 } && test -s conftest.$ac_objext; then
7250 :
7251else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007252 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007253sed 's/^/| /' conftest.$ac_ext >&5
7254
7255 case $ac_type in
7256 int32_t) ac_cv_c_int32_t=yes ;;
7257 *) ac_cv_c_int32_t=$ac_type ;;
7258esac
7259
7260fi
7261
7262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7263else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007264 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007265sed 's/^/| /' conftest.$ac_ext >&5
7266
7267
7268fi
7269
7270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7271 test "$ac_cv_c_int32_t" != no && break
7272 done
7273fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007274{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7275echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007276 case $ac_cv_c_int32_t in #(
7277 no|yes) ;; #(
7278 *)
7279
7280cat >>confdefs.h <<_ACEOF
7281#define int32_t $ac_cv_c_int32_t
7282_ACEOF
7283;;
7284 esac
7285
7286
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007287 { echo "$as_me:$LINENO: checking for int64_t" >&5
7288echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007289if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007290 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007291else
7292 ac_cv_c_int64_t=no
7293 for ac_type in 'int64_t' 'int' 'long int' \
7294 'long long int' 'short int' 'signed char'; do
7295 cat >conftest.$ac_ext <<_ACEOF
7296/* confdefs.h. */
7297_ACEOF
7298cat confdefs.h >>conftest.$ac_ext
7299cat >>conftest.$ac_ext <<_ACEOF
7300/* end confdefs.h. */
7301$ac_includes_default
7302int
7303main ()
7304{
7305static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7306test_array [0] = 0
7307
7308 ;
7309 return 0;
7310}
7311_ACEOF
7312rm -f conftest.$ac_objext
7313if { (ac_try="$ac_compile"
7314case "(($ac_try" in
7315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7316 *) ac_try_echo=$ac_try;;
7317esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007319 (eval "$ac_compile") 2>conftest.er1
7320 ac_status=$?
7321 grep -v '^ *+' conftest.er1 >conftest.err
7322 rm -f conftest.er1
7323 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007325 (exit $ac_status); } && {
7326 test -z "$ac_c_werror_flag" ||
7327 test ! -s conftest.err
7328 } && test -s conftest.$ac_objext; then
7329 cat >conftest.$ac_ext <<_ACEOF
7330/* confdefs.h. */
7331_ACEOF
7332cat confdefs.h >>conftest.$ac_ext
7333cat >>conftest.$ac_ext <<_ACEOF
7334/* end confdefs.h. */
7335$ac_includes_default
7336int
7337main ()
7338{
7339static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007340 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007341test_array [0] = 0
7342
7343 ;
7344 return 0;
7345}
7346_ACEOF
7347rm -f conftest.$ac_objext
7348if { (ac_try="$ac_compile"
7349case "(($ac_try" in
7350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7351 *) ac_try_echo=$ac_try;;
7352esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007354 (eval "$ac_compile") 2>conftest.er1
7355 ac_status=$?
7356 grep -v '^ *+' conftest.er1 >conftest.err
7357 rm -f conftest.er1
7358 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007360 (exit $ac_status); } && {
7361 test -z "$ac_c_werror_flag" ||
7362 test ! -s conftest.err
7363 } && test -s conftest.$ac_objext; then
7364 :
7365else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007366 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007367sed 's/^/| /' conftest.$ac_ext >&5
7368
7369 case $ac_type in
7370 int64_t) ac_cv_c_int64_t=yes ;;
7371 *) ac_cv_c_int64_t=$ac_type ;;
7372esac
7373
7374fi
7375
7376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7377else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007378 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007379sed 's/^/| /' conftest.$ac_ext >&5
7380
7381
7382fi
7383
7384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7385 test "$ac_cv_c_int64_t" != no && break
7386 done
7387fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007388{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7389echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007390 case $ac_cv_c_int64_t in #(
7391 no|yes) ;; #(
7392 *)
7393
7394cat >>confdefs.h <<_ACEOF
7395#define int64_t $ac_cv_c_int64_t
7396_ACEOF
7397;;
7398 esac
7399
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007400{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7401echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007402if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007403 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007404else
Benjamin Petersona8332062009-09-11 22:36:27 +00007405 cat >conftest.$ac_ext <<_ACEOF
7406/* confdefs.h. */
7407_ACEOF
7408cat confdefs.h >>conftest.$ac_ext
7409cat >>conftest.$ac_ext <<_ACEOF
7410/* end confdefs.h. */
7411$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007412typedef ssize_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00007413int
7414main ()
7415{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007416if ((ac__type_new_ *) 0)
7417 return 0;
7418if (sizeof (ac__type_new_))
7419 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00007420 ;
7421 return 0;
7422}
7423_ACEOF
7424rm -f conftest.$ac_objext
7425if { (ac_try="$ac_compile"
7426case "(($ac_try" in
7427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7428 *) ac_try_echo=$ac_try;;
7429esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007431 (eval "$ac_compile") 2>conftest.er1
7432 ac_status=$?
7433 grep -v '^ *+' conftest.er1 >conftest.err
7434 rm -f conftest.er1
7435 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007437 (exit $ac_status); } && {
7438 test -z "$ac_c_werror_flag" ||
7439 test ! -s conftest.err
7440 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007441 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007442else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007443 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007444sed 's/^/| /' conftest.$ac_ext >&5
7445
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007446 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007448
7449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007450fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007451{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7452echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7453if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007454
7455cat >>confdefs.h <<\_ACEOF
7456#define HAVE_SSIZE_T 1
7457_ACEOF
7458
7459fi
7460
Jack Jansendd19cf82001-12-06 22:36:17 +00007461
Michael W. Hudson54241132001-12-07 15:38:26 +00007462# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007463# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007464{ echo "$as_me:$LINENO: checking for int" >&5
7465echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7466if test "${ac_cv_type_int+set}" = set; then
7467 echo $ECHO_N "(cached) $ECHO_C" >&6
7468else
7469 cat >conftest.$ac_ext <<_ACEOF
7470/* confdefs.h. */
7471_ACEOF
7472cat confdefs.h >>conftest.$ac_ext
7473cat >>conftest.$ac_ext <<_ACEOF
7474/* end confdefs.h. */
7475$ac_includes_default
7476typedef int ac__type_new_;
7477int
7478main ()
7479{
7480if ((ac__type_new_ *) 0)
7481 return 0;
7482if (sizeof (ac__type_new_))
7483 return 0;
7484 ;
7485 return 0;
7486}
7487_ACEOF
7488rm -f conftest.$ac_objext
7489if { (ac_try="$ac_compile"
7490case "(($ac_try" in
7491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7492 *) ac_try_echo=$ac_try;;
7493esac
7494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7495 (eval "$ac_compile") 2>conftest.er1
7496 ac_status=$?
7497 grep -v '^ *+' conftest.er1 >conftest.err
7498 rm -f conftest.er1
7499 cat conftest.err >&5
7500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7501 (exit $ac_status); } && {
7502 test -z "$ac_c_werror_flag" ||
7503 test ! -s conftest.err
7504 } && test -s conftest.$ac_objext; then
7505 ac_cv_type_int=yes
7506else
7507 echo "$as_me: failed program was:" >&5
7508sed 's/^/| /' conftest.$ac_ext >&5
7509
7510 ac_cv_type_int=no
7511fi
7512
7513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7514fi
7515{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7516echo "${ECHO_T}$ac_cv_type_int" >&6; }
7517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007518# The cast to long int works around a bug in the HP C Compiler
7519# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7520# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7521# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007522{ echo "$as_me:$LINENO: checking size of int" >&5
7523echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007524if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007525 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007526else
Martin v. Löwis11437992002-04-12 09:54:03 +00007527 if test "$cross_compiling" = yes; then
7528 # Depending upon the size, compute the lo and hi bounds.
7529cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007530/* confdefs.h. */
7531_ACEOF
7532cat confdefs.h >>conftest.$ac_ext
7533cat >>conftest.$ac_ext <<_ACEOF
7534/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007535$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007536 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007537int
7538main ()
7539{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007540static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007541test_array [0] = 0
7542
7543 ;
7544 return 0;
7545}
7546_ACEOF
7547rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007548if { (ac_try="$ac_compile"
7549case "(($ac_try" in
7550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7551 *) ac_try_echo=$ac_try;;
7552esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007554 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007555 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007556 grep -v '^ *+' conftest.er1 >conftest.err
7557 rm -f conftest.er1
7558 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007560 (exit $ac_status); } && {
7561 test -z "$ac_c_werror_flag" ||
7562 test ! -s conftest.err
7563 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007564 ac_lo=0 ac_mid=0
7565 while :; do
7566 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007567/* confdefs.h. */
7568_ACEOF
7569cat confdefs.h >>conftest.$ac_ext
7570cat >>conftest.$ac_ext <<_ACEOF
7571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007572$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007573 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007574int
7575main ()
7576{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007577static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007578test_array [0] = 0
7579
7580 ;
7581 return 0;
7582}
7583_ACEOF
7584rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007585if { (ac_try="$ac_compile"
7586case "(($ac_try" in
7587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7588 *) ac_try_echo=$ac_try;;
7589esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007591 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007593 grep -v '^ *+' conftest.er1 >conftest.err
7594 rm -f conftest.er1
7595 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007597 (exit $ac_status); } && {
7598 test -z "$ac_c_werror_flag" ||
7599 test ! -s conftest.err
7600 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007601 ac_hi=$ac_mid; break
7602else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007604sed 's/^/| /' conftest.$ac_ext >&5
7605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007606 ac_lo=`expr $ac_mid + 1`
7607 if test $ac_lo -le $ac_mid; then
7608 ac_lo= ac_hi=
7609 break
7610 fi
7611 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007613
7614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007615 done
7616else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007618sed 's/^/| /' conftest.$ac_ext >&5
7619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007620 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007621/* confdefs.h. */
7622_ACEOF
7623cat confdefs.h >>conftest.$ac_ext
7624cat >>conftest.$ac_ext <<_ACEOF
7625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007626$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007627 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007628int
7629main ()
7630{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007631static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007632test_array [0] = 0
7633
7634 ;
7635 return 0;
7636}
7637_ACEOF
7638rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007639if { (ac_try="$ac_compile"
7640case "(($ac_try" in
7641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7642 *) ac_try_echo=$ac_try;;
7643esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007645 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007647 grep -v '^ *+' conftest.er1 >conftest.err
7648 rm -f conftest.er1
7649 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007651 (exit $ac_status); } && {
7652 test -z "$ac_c_werror_flag" ||
7653 test ! -s conftest.err
7654 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007655 ac_hi=-1 ac_mid=-1
7656 while :; do
7657 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007658/* confdefs.h. */
7659_ACEOF
7660cat confdefs.h >>conftest.$ac_ext
7661cat >>conftest.$ac_ext <<_ACEOF
7662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007663$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007664 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007665int
7666main ()
7667{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007668static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007669test_array [0] = 0
7670
7671 ;
7672 return 0;
7673}
7674_ACEOF
7675rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007676if { (ac_try="$ac_compile"
7677case "(($ac_try" in
7678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7679 *) ac_try_echo=$ac_try;;
7680esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007682 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007683 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007684 grep -v '^ *+' conftest.er1 >conftest.err
7685 rm -f conftest.er1
7686 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007688 (exit $ac_status); } && {
7689 test -z "$ac_c_werror_flag" ||
7690 test ! -s conftest.err
7691 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007692 ac_lo=$ac_mid; break
7693else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007695sed 's/^/| /' conftest.$ac_ext >&5
7696
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007697 ac_hi=`expr '(' $ac_mid ')' - 1`
7698 if test $ac_mid -le $ac_hi; then
7699 ac_lo= ac_hi=
7700 break
7701 fi
7702 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007704
7705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007706 done
7707else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007709sed 's/^/| /' conftest.$ac_ext >&5
7710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007713
7714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007716
7717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007718# Binary search between lo and hi bounds.
7719while test "x$ac_lo" != "x$ac_hi"; do
7720 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007722/* confdefs.h. */
7723_ACEOF
7724cat confdefs.h >>conftest.$ac_ext
7725cat >>conftest.$ac_ext <<_ACEOF
7726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007727$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007728 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007729int
7730main ()
7731{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007732static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007733test_array [0] = 0
7734
7735 ;
7736 return 0;
7737}
7738_ACEOF
7739rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007740if { (ac_try="$ac_compile"
7741case "(($ac_try" in
7742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7743 *) ac_try_echo=$ac_try;;
7744esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007748 grep -v '^ *+' conftest.er1 >conftest.err
7749 rm -f conftest.er1
7750 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007752 (exit $ac_status); } && {
7753 test -z "$ac_c_werror_flag" ||
7754 test ! -s conftest.err
7755 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 ac_hi=$ac_mid
7757else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007759sed 's/^/| /' conftest.$ac_ext >&5
7760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007761 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007763
7764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007765done
7766case $ac_lo in
7767?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007768'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007769 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007770See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007771echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007772See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007773 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007774 else
7775 ac_cv_sizeof_int=0
7776 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007777esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007778else
Martin v. Löwis11437992002-04-12 09:54:03 +00007779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007780/* confdefs.h. */
7781_ACEOF
7782cat confdefs.h >>conftest.$ac_ext
7783cat >>conftest.$ac_ext <<_ACEOF
7784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007785$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007786 typedef int ac__type_sizeof_;
7787static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7788static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007789#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007790#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007791int
7792main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007793{
Martin v. Löwis11437992002-04-12 09:54:03 +00007794
7795 FILE *f = fopen ("conftest.val", "w");
7796 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007798 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007799 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007800 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007801 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007803 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007804 }
7805 else
7806 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007807 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007808 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007809 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007810 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007811 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007813
7814 ;
7815 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007816}
Martin v. Löwis11437992002-04-12 09:54:03 +00007817_ACEOF
7818rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007819if { (ac_try="$ac_link"
7820case "(($ac_try" in
7821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7822 *) ac_try_echo=$ac_try;;
7823esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007826 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007828 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007829 { (case "(($ac_try" in
7830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7831 *) ac_try_echo=$ac_try;;
7832esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007834 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007835 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007837 (exit $ac_status); }; }; then
7838 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007839else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007840 echo "$as_me: program exited with status $ac_status" >&5
7841echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007842sed 's/^/| /' conftest.$ac_ext >&5
7843
Martin v. Löwis11437992002-04-12 09:54:03 +00007844( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007845if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007846 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007847See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007848echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007849See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007850 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851 else
7852 ac_cv_sizeof_int=0
7853 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007855rm -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 +00007856fi
7857rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007858fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007859{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7860echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861
7862
7863
Martin v. Löwis11437992002-04-12 09:54:03 +00007864cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007865#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007866_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007867
7868
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007869{ echo "$as_me:$LINENO: checking for long" >&5
7870echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7871if test "${ac_cv_type_long+set}" = set; then
7872 echo $ECHO_N "(cached) $ECHO_C" >&6
7873else
7874 cat >conftest.$ac_ext <<_ACEOF
7875/* confdefs.h. */
7876_ACEOF
7877cat confdefs.h >>conftest.$ac_ext
7878cat >>conftest.$ac_ext <<_ACEOF
7879/* end confdefs.h. */
7880$ac_includes_default
7881typedef long ac__type_new_;
7882int
7883main ()
7884{
7885if ((ac__type_new_ *) 0)
7886 return 0;
7887if (sizeof (ac__type_new_))
7888 return 0;
7889 ;
7890 return 0;
7891}
7892_ACEOF
7893rm -f conftest.$ac_objext
7894if { (ac_try="$ac_compile"
7895case "(($ac_try" in
7896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7897 *) ac_try_echo=$ac_try;;
7898esac
7899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7900 (eval "$ac_compile") 2>conftest.er1
7901 ac_status=$?
7902 grep -v '^ *+' conftest.er1 >conftest.err
7903 rm -f conftest.er1
7904 cat conftest.err >&5
7905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7906 (exit $ac_status); } && {
7907 test -z "$ac_c_werror_flag" ||
7908 test ! -s conftest.err
7909 } && test -s conftest.$ac_objext; then
7910 ac_cv_type_long=yes
7911else
7912 echo "$as_me: failed program was:" >&5
7913sed 's/^/| /' conftest.$ac_ext >&5
7914
7915 ac_cv_type_long=no
7916fi
7917
7918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7919fi
7920{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7921echo "${ECHO_T}$ac_cv_type_long" >&6; }
7922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007923# The cast to long int works around a bug in the HP C Compiler
7924# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7925# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7926# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007927{ echo "$as_me:$LINENO: checking size of long" >&5
7928echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007929if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007930 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007931else
Martin v. Löwis11437992002-04-12 09:54:03 +00007932 if test "$cross_compiling" = yes; then
7933 # Depending upon the size, compute the lo and hi bounds.
7934cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007935/* confdefs.h. */
7936_ACEOF
7937cat confdefs.h >>conftest.$ac_ext
7938cat >>conftest.$ac_ext <<_ACEOF
7939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007940$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007941 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007942int
7943main ()
7944{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007945static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007946test_array [0] = 0
7947
7948 ;
7949 return 0;
7950}
7951_ACEOF
7952rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953if { (ac_try="$ac_compile"
7954case "(($ac_try" in
7955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7956 *) ac_try_echo=$ac_try;;
7957esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007959 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007961 grep -v '^ *+' conftest.er1 >conftest.err
7962 rm -f conftest.er1
7963 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007965 (exit $ac_status); } && {
7966 test -z "$ac_c_werror_flag" ||
7967 test ! -s conftest.err
7968 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007969 ac_lo=0 ac_mid=0
7970 while :; do
7971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007972/* confdefs.h. */
7973_ACEOF
7974cat confdefs.h >>conftest.$ac_ext
7975cat >>conftest.$ac_ext <<_ACEOF
7976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007977$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007978 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007979int
7980main ()
7981{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007982static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007983test_array [0] = 0
7984
7985 ;
7986 return 0;
7987}
7988_ACEOF
7989rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990if { (ac_try="$ac_compile"
7991case "(($ac_try" in
7992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7993 *) ac_try_echo=$ac_try;;
7994esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007998 grep -v '^ *+' conftest.er1 >conftest.err
7999 rm -f conftest.er1
8000 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008002 (exit $ac_status); } && {
8003 test -z "$ac_c_werror_flag" ||
8004 test ! -s conftest.err
8005 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008006 ac_hi=$ac_mid; break
8007else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008008 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008009sed 's/^/| /' conftest.$ac_ext >&5
8010
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008011 ac_lo=`expr $ac_mid + 1`
8012 if test $ac_lo -le $ac_mid; then
8013 ac_lo= ac_hi=
8014 break
8015 fi
8016 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008018
8019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 done
8021else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008023sed 's/^/| /' conftest.$ac_ext >&5
8024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008026/* confdefs.h. */
8027_ACEOF
8028cat confdefs.h >>conftest.$ac_ext
8029cat >>conftest.$ac_ext <<_ACEOF
8030/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008031$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008032 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008033int
8034main ()
8035{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008036static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008037test_array [0] = 0
8038
8039 ;
8040 return 0;
8041}
8042_ACEOF
8043rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044if { (ac_try="$ac_compile"
8045case "(($ac_try" in
8046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8047 *) ac_try_echo=$ac_try;;
8048esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008050 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008052 grep -v '^ *+' conftest.er1 >conftest.err
8053 rm -f conftest.er1
8054 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056 (exit $ac_status); } && {
8057 test -z "$ac_c_werror_flag" ||
8058 test ! -s conftest.err
8059 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008060 ac_hi=-1 ac_mid=-1
8061 while :; do
8062 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008063/* confdefs.h. */
8064_ACEOF
8065cat confdefs.h >>conftest.$ac_ext
8066cat >>conftest.$ac_ext <<_ACEOF
8067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008068$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008069 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008070int
8071main ()
8072{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008073static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008074test_array [0] = 0
8075
8076 ;
8077 return 0;
8078}
8079_ACEOF
8080rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008081if { (ac_try="$ac_compile"
8082case "(($ac_try" in
8083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8084 *) ac_try_echo=$ac_try;;
8085esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008087 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008088 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008089 grep -v '^ *+' conftest.er1 >conftest.err
8090 rm -f conftest.er1
8091 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008093 (exit $ac_status); } && {
8094 test -z "$ac_c_werror_flag" ||
8095 test ! -s conftest.err
8096 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 ac_lo=$ac_mid; break
8098else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008100sed 's/^/| /' conftest.$ac_ext >&5
8101
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008102 ac_hi=`expr '(' $ac_mid ')' - 1`
8103 if test $ac_mid -le $ac_hi; then
8104 ac_lo= ac_hi=
8105 break
8106 fi
8107 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008109
8110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008111 done
8112else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008114sed 's/^/| /' conftest.$ac_ext >&5
8115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008118
8119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008121
8122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008123# Binary search between lo and hi bounds.
8124while test "x$ac_lo" != "x$ac_hi"; do
8125 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8126 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008127/* confdefs.h. */
8128_ACEOF
8129cat confdefs.h >>conftest.$ac_ext
8130cat >>conftest.$ac_ext <<_ACEOF
8131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008132$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008133 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008134int
8135main ()
8136{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008137static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008138test_array [0] = 0
8139
8140 ;
8141 return 0;
8142}
8143_ACEOF
8144rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008145if { (ac_try="$ac_compile"
8146case "(($ac_try" in
8147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8148 *) ac_try_echo=$ac_try;;
8149esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008151 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008152 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008153 grep -v '^ *+' conftest.er1 >conftest.err
8154 rm -f conftest.er1
8155 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008157 (exit $ac_status); } && {
8158 test -z "$ac_c_werror_flag" ||
8159 test ! -s conftest.err
8160 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008161 ac_hi=$ac_mid
8162else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008164sed 's/^/| /' conftest.$ac_ext >&5
8165
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008166 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008168
8169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008170done
8171case $ac_lo in
8172?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008173'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008174 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008175See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008176echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008177See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008178 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008179 else
8180 ac_cv_sizeof_long=0
8181 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008182esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008183else
Martin v. Löwis11437992002-04-12 09:54:03 +00008184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008185/* confdefs.h. */
8186_ACEOF
8187cat confdefs.h >>conftest.$ac_ext
8188cat >>conftest.$ac_ext <<_ACEOF
8189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008190$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008191 typedef long ac__type_sizeof_;
8192static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8193static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008194#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008195#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008196int
8197main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008198{
Martin v. Löwis11437992002-04-12 09:54:03 +00008199
8200 FILE *f = fopen ("conftest.val", "w");
8201 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008202 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008203 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008204 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008205 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008206 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008207 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008208 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008209 }
8210 else
8211 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008213 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008214 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008215 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008216 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008217 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008218
8219 ;
8220 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008221}
Martin v. Löwis11437992002-04-12 09:54:03 +00008222_ACEOF
8223rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008224if { (ac_try="$ac_link"
8225case "(($ac_try" in
8226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8227 *) ac_try_echo=$ac_try;;
8228esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008230 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008231 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008233 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008234 { (case "(($ac_try" in
8235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8236 *) ac_try_echo=$ac_try;;
8237esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008240 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008242 (exit $ac_status); }; }; then
8243 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008244else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008245 echo "$as_me: program exited with status $ac_status" >&5
8246echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008247sed 's/^/| /' conftest.$ac_ext >&5
8248
Martin v. Löwis11437992002-04-12 09:54:03 +00008249( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008251 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008252See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008253echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008254See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008255 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008256 else
8257 ac_cv_sizeof_long=0
8258 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260rm -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 +00008261fi
8262rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008263fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008264{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8265echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008266
8267
8268
Martin v. Löwis11437992002-04-12 09:54:03 +00008269cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008270#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008271_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008272
8273
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008274{ echo "$as_me:$LINENO: checking for void *" >&5
8275echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8276if test "${ac_cv_type_void_p+set}" = set; then
8277 echo $ECHO_N "(cached) $ECHO_C" >&6
8278else
8279 cat >conftest.$ac_ext <<_ACEOF
8280/* confdefs.h. */
8281_ACEOF
8282cat confdefs.h >>conftest.$ac_ext
8283cat >>conftest.$ac_ext <<_ACEOF
8284/* end confdefs.h. */
8285$ac_includes_default
8286typedef void * ac__type_new_;
8287int
8288main ()
8289{
8290if ((ac__type_new_ *) 0)
8291 return 0;
8292if (sizeof (ac__type_new_))
8293 return 0;
8294 ;
8295 return 0;
8296}
8297_ACEOF
8298rm -f conftest.$ac_objext
8299if { (ac_try="$ac_compile"
8300case "(($ac_try" in
8301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8302 *) ac_try_echo=$ac_try;;
8303esac
8304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8305 (eval "$ac_compile") 2>conftest.er1
8306 ac_status=$?
8307 grep -v '^ *+' conftest.er1 >conftest.err
8308 rm -f conftest.er1
8309 cat conftest.err >&5
8310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8311 (exit $ac_status); } && {
8312 test -z "$ac_c_werror_flag" ||
8313 test ! -s conftest.err
8314 } && test -s conftest.$ac_objext; then
8315 ac_cv_type_void_p=yes
8316else
8317 echo "$as_me: failed program was:" >&5
8318sed 's/^/| /' conftest.$ac_ext >&5
8319
8320 ac_cv_type_void_p=no
8321fi
8322
8323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8324fi
8325{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8326echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8327
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008328# The cast to long int works around a bug in the HP C Compiler
8329# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8330# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8331# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008332{ echo "$as_me:$LINENO: checking size of void *" >&5
8333echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008334if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008335 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008336else
Martin v. Löwis11437992002-04-12 09:54:03 +00008337 if test "$cross_compiling" = yes; then
8338 # Depending upon the size, compute the lo and hi bounds.
8339cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008340/* confdefs.h. */
8341_ACEOF
8342cat confdefs.h >>conftest.$ac_ext
8343cat >>conftest.$ac_ext <<_ACEOF
8344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008345$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008346 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008347int
8348main ()
8349{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008350static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008351test_array [0] = 0
8352
8353 ;
8354 return 0;
8355}
8356_ACEOF
8357rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358if { (ac_try="$ac_compile"
8359case "(($ac_try" in
8360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8361 *) ac_try_echo=$ac_try;;
8362esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008364 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008365 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008366 grep -v '^ *+' conftest.er1 >conftest.err
8367 rm -f conftest.er1
8368 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008370 (exit $ac_status); } && {
8371 test -z "$ac_c_werror_flag" ||
8372 test ! -s conftest.err
8373 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008374 ac_lo=0 ac_mid=0
8375 while :; do
8376 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008377/* confdefs.h. */
8378_ACEOF
8379cat confdefs.h >>conftest.$ac_ext
8380cat >>conftest.$ac_ext <<_ACEOF
8381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008382$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008383 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008384int
8385main ()
8386{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008387static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008388test_array [0] = 0
8389
8390 ;
8391 return 0;
8392}
8393_ACEOF
8394rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008395if { (ac_try="$ac_compile"
8396case "(($ac_try" in
8397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8398 *) ac_try_echo=$ac_try;;
8399esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008401 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008402 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008403 grep -v '^ *+' conftest.er1 >conftest.err
8404 rm -f conftest.er1
8405 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008407 (exit $ac_status); } && {
8408 test -z "$ac_c_werror_flag" ||
8409 test ! -s conftest.err
8410 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008411 ac_hi=$ac_mid; break
8412else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008414sed 's/^/| /' conftest.$ac_ext >&5
8415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008416 ac_lo=`expr $ac_mid + 1`
8417 if test $ac_lo -le $ac_mid; then
8418 ac_lo= ac_hi=
8419 break
8420 fi
8421 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008423
8424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008425 done
8426else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008428sed 's/^/| /' conftest.$ac_ext >&5
8429
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008431/* confdefs.h. */
8432_ACEOF
8433cat confdefs.h >>conftest.$ac_ext
8434cat >>conftest.$ac_ext <<_ACEOF
8435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008436$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008437 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008438int
8439main ()
8440{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008441static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008442test_array [0] = 0
8443
8444 ;
8445 return 0;
8446}
8447_ACEOF
8448rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449if { (ac_try="$ac_compile"
8450case "(($ac_try" in
8451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8452 *) ac_try_echo=$ac_try;;
8453esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008455 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008457 grep -v '^ *+' conftest.er1 >conftest.err
8458 rm -f conftest.er1
8459 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008461 (exit $ac_status); } && {
8462 test -z "$ac_c_werror_flag" ||
8463 test ! -s conftest.err
8464 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008465 ac_hi=-1 ac_mid=-1
8466 while :; do
8467 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008468/* confdefs.h. */
8469_ACEOF
8470cat confdefs.h >>conftest.$ac_ext
8471cat >>conftest.$ac_ext <<_ACEOF
8472/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008473$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008474 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008475int
8476main ()
8477{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008478static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008479test_array [0] = 0
8480
8481 ;
8482 return 0;
8483}
8484_ACEOF
8485rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486if { (ac_try="$ac_compile"
8487case "(($ac_try" in
8488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8489 *) ac_try_echo=$ac_try;;
8490esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008492 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008493 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008494 grep -v '^ *+' conftest.er1 >conftest.err
8495 rm -f conftest.er1
8496 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008498 (exit $ac_status); } && {
8499 test -z "$ac_c_werror_flag" ||
8500 test ! -s conftest.err
8501 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008502 ac_lo=$ac_mid; break
8503else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008505sed 's/^/| /' conftest.$ac_ext >&5
8506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507 ac_hi=`expr '(' $ac_mid ')' - 1`
8508 if test $ac_mid -le $ac_hi; then
8509 ac_lo= ac_hi=
8510 break
8511 fi
8512 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514
8515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008516 done
8517else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008519sed 's/^/| /' conftest.$ac_ext >&5
8520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008521 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523
8524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008526
8527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008528# Binary search between lo and hi bounds.
8529while test "x$ac_lo" != "x$ac_hi"; do
8530 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8531 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008532/* confdefs.h. */
8533_ACEOF
8534cat confdefs.h >>conftest.$ac_ext
8535cat >>conftest.$ac_ext <<_ACEOF
8536/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008537$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008538 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008539int
8540main ()
8541{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008542static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008543test_array [0] = 0
8544
8545 ;
8546 return 0;
8547}
8548_ACEOF
8549rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008550if { (ac_try="$ac_compile"
8551case "(($ac_try" in
8552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8553 *) ac_try_echo=$ac_try;;
8554esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008558 grep -v '^ *+' conftest.er1 >conftest.err
8559 rm -f conftest.er1
8560 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008562 (exit $ac_status); } && {
8563 test -z "$ac_c_werror_flag" ||
8564 test ! -s conftest.err
8565 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008566 ac_hi=$ac_mid
8567else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008569sed 's/^/| /' conftest.$ac_ext >&5
8570
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573
8574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008575done
8576case $ac_lo in
8577?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008578'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008579 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008580See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008581echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008582See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008583 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008584 else
8585 ac_cv_sizeof_void_p=0
8586 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008587esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008588else
Martin v. Löwis11437992002-04-12 09:54:03 +00008589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008590/* confdefs.h. */
8591_ACEOF
8592cat confdefs.h >>conftest.$ac_ext
8593cat >>conftest.$ac_ext <<_ACEOF
8594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008595$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008596 typedef void * ac__type_sizeof_;
8597static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8598static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008599#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008600#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008601int
8602main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008603{
Martin v. Löwis11437992002-04-12 09:54:03 +00008604
8605 FILE *f = fopen ("conftest.val", "w");
8606 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008607 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008608 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008609 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008611 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008613 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008614 }
8615 else
8616 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008618 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008619 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008620 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008621 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008623
8624 ;
8625 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008626}
Martin v. Löwis11437992002-04-12 09:54:03 +00008627_ACEOF
8628rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629if { (ac_try="$ac_link"
8630case "(($ac_try" in
8631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8632 *) ac_try_echo=$ac_try;;
8633esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008636 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008639 { (case "(($ac_try" in
8640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8641 *) ac_try_echo=$ac_try;;
8642esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008644 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008645 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008647 (exit $ac_status); }; }; then
8648 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008649else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008650 echo "$as_me: program exited with status $ac_status" >&5
8651echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008652sed 's/^/| /' conftest.$ac_ext >&5
8653
Martin v. Löwis11437992002-04-12 09:54:03 +00008654( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008655if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008656 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008657See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008658echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008659See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008660 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008661 else
8662 ac_cv_sizeof_void_p=0
8663 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008665rm -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 +00008666fi
8667rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008668fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008669{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8670echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671
8672
8673
Martin v. Löwis11437992002-04-12 09:54:03 +00008674cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008675#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008676_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008677
8678
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008679{ echo "$as_me:$LINENO: checking for short" >&5
8680echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8681if test "${ac_cv_type_short+set}" = set; then
8682 echo $ECHO_N "(cached) $ECHO_C" >&6
8683else
8684 cat >conftest.$ac_ext <<_ACEOF
8685/* confdefs.h. */
8686_ACEOF
8687cat confdefs.h >>conftest.$ac_ext
8688cat >>conftest.$ac_ext <<_ACEOF
8689/* end confdefs.h. */
8690$ac_includes_default
8691typedef short ac__type_new_;
8692int
8693main ()
8694{
8695if ((ac__type_new_ *) 0)
8696 return 0;
8697if (sizeof (ac__type_new_))
8698 return 0;
8699 ;
8700 return 0;
8701}
8702_ACEOF
8703rm -f conftest.$ac_objext
8704if { (ac_try="$ac_compile"
8705case "(($ac_try" in
8706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8707 *) ac_try_echo=$ac_try;;
8708esac
8709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8710 (eval "$ac_compile") 2>conftest.er1
8711 ac_status=$?
8712 grep -v '^ *+' conftest.er1 >conftest.err
8713 rm -f conftest.er1
8714 cat conftest.err >&5
8715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8716 (exit $ac_status); } && {
8717 test -z "$ac_c_werror_flag" ||
8718 test ! -s conftest.err
8719 } && test -s conftest.$ac_objext; then
8720 ac_cv_type_short=yes
8721else
8722 echo "$as_me: failed program was:" >&5
8723sed 's/^/| /' conftest.$ac_ext >&5
8724
8725 ac_cv_type_short=no
8726fi
8727
8728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8729fi
8730{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8731echo "${ECHO_T}$ac_cv_type_short" >&6; }
8732
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008733# The cast to long int works around a bug in the HP C Compiler
8734# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8735# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8736# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008737{ echo "$as_me:$LINENO: checking size of short" >&5
8738echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008739if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008740 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008741else
Martin v. Löwis11437992002-04-12 09:54:03 +00008742 if test "$cross_compiling" = yes; then
8743 # Depending upon the size, compute the lo and hi bounds.
8744cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008745/* confdefs.h. */
8746_ACEOF
8747cat confdefs.h >>conftest.$ac_ext
8748cat >>conftest.$ac_ext <<_ACEOF
8749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008750$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008751 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008752int
8753main ()
8754{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008755static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008756test_array [0] = 0
8757
8758 ;
8759 return 0;
8760}
8761_ACEOF
8762rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008763if { (ac_try="$ac_compile"
8764case "(($ac_try" in
8765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8766 *) ac_try_echo=$ac_try;;
8767esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008771 grep -v '^ *+' conftest.er1 >conftest.err
8772 rm -f conftest.er1
8773 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008775 (exit $ac_status); } && {
8776 test -z "$ac_c_werror_flag" ||
8777 test ! -s conftest.err
8778 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008779 ac_lo=0 ac_mid=0
8780 while :; do
8781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008782/* confdefs.h. */
8783_ACEOF
8784cat confdefs.h >>conftest.$ac_ext
8785cat >>conftest.$ac_ext <<_ACEOF
8786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008787$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008788 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008789int
8790main ()
8791{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008792static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008793test_array [0] = 0
8794
8795 ;
8796 return 0;
8797}
8798_ACEOF
8799rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008800if { (ac_try="$ac_compile"
8801case "(($ac_try" in
8802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8803 *) ac_try_echo=$ac_try;;
8804esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008808 grep -v '^ *+' conftest.er1 >conftest.err
8809 rm -f conftest.er1
8810 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008812 (exit $ac_status); } && {
8813 test -z "$ac_c_werror_flag" ||
8814 test ! -s conftest.err
8815 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008816 ac_hi=$ac_mid; break
8817else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008819sed 's/^/| /' conftest.$ac_ext >&5
8820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821 ac_lo=`expr $ac_mid + 1`
8822 if test $ac_lo -le $ac_mid; then
8823 ac_lo= ac_hi=
8824 break
8825 fi
8826 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008828
8829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008830 done
8831else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008833sed 's/^/| /' conftest.$ac_ext >&5
8834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008835 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008836/* confdefs.h. */
8837_ACEOF
8838cat confdefs.h >>conftest.$ac_ext
8839cat >>conftest.$ac_ext <<_ACEOF
8840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008841$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008842 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008843int
8844main ()
8845{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008846static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008847test_array [0] = 0
8848
8849 ;
8850 return 0;
8851}
8852_ACEOF
8853rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008854if { (ac_try="$ac_compile"
8855case "(($ac_try" in
8856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8857 *) ac_try_echo=$ac_try;;
8858esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008860 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008862 grep -v '^ *+' conftest.er1 >conftest.err
8863 rm -f conftest.er1
8864 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008866 (exit $ac_status); } && {
8867 test -z "$ac_c_werror_flag" ||
8868 test ! -s conftest.err
8869 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008870 ac_hi=-1 ac_mid=-1
8871 while :; do
8872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008873/* confdefs.h. */
8874_ACEOF
8875cat confdefs.h >>conftest.$ac_ext
8876cat >>conftest.$ac_ext <<_ACEOF
8877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008878$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008879 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008880int
8881main ()
8882{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008883static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008884test_array [0] = 0
8885
8886 ;
8887 return 0;
8888}
8889_ACEOF
8890rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008891if { (ac_try="$ac_compile"
8892case "(($ac_try" in
8893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8894 *) ac_try_echo=$ac_try;;
8895esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008897 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008899 grep -v '^ *+' conftest.er1 >conftest.err
8900 rm -f conftest.er1
8901 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008903 (exit $ac_status); } && {
8904 test -z "$ac_c_werror_flag" ||
8905 test ! -s conftest.err
8906 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008907 ac_lo=$ac_mid; break
8908else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008910sed 's/^/| /' conftest.$ac_ext >&5
8911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008912 ac_hi=`expr '(' $ac_mid ')' - 1`
8913 if test $ac_mid -le $ac_hi; then
8914 ac_lo= ac_hi=
8915 break
8916 fi
8917 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008919
8920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008921 done
8922else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008924sed 's/^/| /' conftest.$ac_ext >&5
8925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008926 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008928
8929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008931
8932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008933# Binary search between lo and hi bounds.
8934while test "x$ac_lo" != "x$ac_hi"; do
8935 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008937/* confdefs.h. */
8938_ACEOF
8939cat confdefs.h >>conftest.$ac_ext
8940cat >>conftest.$ac_ext <<_ACEOF
8941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008942$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008943 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008944int
8945main ()
8946{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008947static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008948test_array [0] = 0
8949
8950 ;
8951 return 0;
8952}
8953_ACEOF
8954rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008955if { (ac_try="$ac_compile"
8956case "(($ac_try" in
8957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8958 *) ac_try_echo=$ac_try;;
8959esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008961 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008963 grep -v '^ *+' conftest.er1 >conftest.err
8964 rm -f conftest.er1
8965 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008967 (exit $ac_status); } && {
8968 test -z "$ac_c_werror_flag" ||
8969 test ! -s conftest.err
8970 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008971 ac_hi=$ac_mid
8972else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008974sed 's/^/| /' conftest.$ac_ext >&5
8975
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008976 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008978
8979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008980done
8981case $ac_lo in
8982?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008983'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008984 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008985See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008986echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008987See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008988 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008989 else
8990 ac_cv_sizeof_short=0
8991 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008992esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008993else
Martin v. Löwis11437992002-04-12 09:54:03 +00008994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008995/* confdefs.h. */
8996_ACEOF
8997cat confdefs.h >>conftest.$ac_ext
8998cat >>conftest.$ac_ext <<_ACEOF
8999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009000$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009001 typedef short ac__type_sizeof_;
9002static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9003static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009004#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009005#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009006int
9007main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009008{
Martin v. Löwis11437992002-04-12 09:54:03 +00009009
9010 FILE *f = fopen ("conftest.val", "w");
9011 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009012 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009013 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009014 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009015 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009016 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009017 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009018 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009019 }
9020 else
9021 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009022 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009023 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009024 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009025 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009026 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009027 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009028
9029 ;
9030 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009031}
Martin v. Löwis11437992002-04-12 09:54:03 +00009032_ACEOF
9033rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009034if { (ac_try="$ac_link"
9035case "(($ac_try" in
9036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9037 *) ac_try_echo=$ac_try;;
9038esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009040 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009041 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009044 { (case "(($ac_try" in
9045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9046 *) ac_try_echo=$ac_try;;
9047esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009049 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009050 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 (exit $ac_status); }; }; then
9053 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009054else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009055 echo "$as_me: program exited with status $ac_status" >&5
9056echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009057sed 's/^/| /' conftest.$ac_ext >&5
9058
Martin v. Löwis11437992002-04-12 09:54:03 +00009059( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009060if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009061 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009062See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009063echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009064See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009065 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009066 else
9067 ac_cv_sizeof_short=0
9068 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009070rm -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 +00009071fi
9072rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009073fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009074{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9075echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009076
9077
9078
Martin v. Löwis11437992002-04-12 09:54:03 +00009079cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009080#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009081_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009082
9083
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009084{ echo "$as_me:$LINENO: checking for float" >&5
9085echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9086if test "${ac_cv_type_float+set}" = set; then
9087 echo $ECHO_N "(cached) $ECHO_C" >&6
9088else
9089 cat >conftest.$ac_ext <<_ACEOF
9090/* confdefs.h. */
9091_ACEOF
9092cat confdefs.h >>conftest.$ac_ext
9093cat >>conftest.$ac_ext <<_ACEOF
9094/* end confdefs.h. */
9095$ac_includes_default
9096typedef float ac__type_new_;
9097int
9098main ()
9099{
9100if ((ac__type_new_ *) 0)
9101 return 0;
9102if (sizeof (ac__type_new_))
9103 return 0;
9104 ;
9105 return 0;
9106}
9107_ACEOF
9108rm -f conftest.$ac_objext
9109if { (ac_try="$ac_compile"
9110case "(($ac_try" in
9111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9112 *) ac_try_echo=$ac_try;;
9113esac
9114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9115 (eval "$ac_compile") 2>conftest.er1
9116 ac_status=$?
9117 grep -v '^ *+' conftest.er1 >conftest.err
9118 rm -f conftest.er1
9119 cat conftest.err >&5
9120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9121 (exit $ac_status); } && {
9122 test -z "$ac_c_werror_flag" ||
9123 test ! -s conftest.err
9124 } && test -s conftest.$ac_objext; then
9125 ac_cv_type_float=yes
9126else
9127 echo "$as_me: failed program was:" >&5
9128sed 's/^/| /' conftest.$ac_ext >&5
9129
9130 ac_cv_type_float=no
9131fi
9132
9133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9134fi
9135{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9136echo "${ECHO_T}$ac_cv_type_float" >&6; }
9137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009138# The cast to long int works around a bug in the HP C Compiler
9139# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9140# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9141# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009142{ echo "$as_me:$LINENO: checking size of float" >&5
9143echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009144if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009145 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009146else
Martin v. Löwis11437992002-04-12 09:54:03 +00009147 if test "$cross_compiling" = yes; then
9148 # Depending upon the size, compute the lo and hi bounds.
9149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009150/* confdefs.h. */
9151_ACEOF
9152cat confdefs.h >>conftest.$ac_ext
9153cat >>conftest.$ac_ext <<_ACEOF
9154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009155$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009156 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009157int
9158main ()
9159{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009160static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009161test_array [0] = 0
9162
9163 ;
9164 return 0;
9165}
9166_ACEOF
9167rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009168if { (ac_try="$ac_compile"
9169case "(($ac_try" in
9170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9171 *) ac_try_echo=$ac_try;;
9172esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009174 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009176 grep -v '^ *+' conftest.er1 >conftest.err
9177 rm -f conftest.er1
9178 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009180 (exit $ac_status); } && {
9181 test -z "$ac_c_werror_flag" ||
9182 test ! -s conftest.err
9183 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009184 ac_lo=0 ac_mid=0
9185 while :; do
9186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009187/* confdefs.h. */
9188_ACEOF
9189cat confdefs.h >>conftest.$ac_ext
9190cat >>conftest.$ac_ext <<_ACEOF
9191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009192$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009193 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009194int
9195main ()
9196{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009197static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009198test_array [0] = 0
9199
9200 ;
9201 return 0;
9202}
9203_ACEOF
9204rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009205if { (ac_try="$ac_compile"
9206case "(($ac_try" in
9207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9208 *) ac_try_echo=$ac_try;;
9209esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009211 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009213 grep -v '^ *+' conftest.er1 >conftest.err
9214 rm -f conftest.er1
9215 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009217 (exit $ac_status); } && {
9218 test -z "$ac_c_werror_flag" ||
9219 test ! -s conftest.err
9220 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009221 ac_hi=$ac_mid; break
9222else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009224sed 's/^/| /' conftest.$ac_ext >&5
9225
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009226 ac_lo=`expr $ac_mid + 1`
9227 if test $ac_lo -le $ac_mid; then
9228 ac_lo= ac_hi=
9229 break
9230 fi
9231 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009233
9234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 done
9236else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009238sed 's/^/| /' conftest.$ac_ext >&5
9239
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009240 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009241/* confdefs.h. */
9242_ACEOF
9243cat confdefs.h >>conftest.$ac_ext
9244cat >>conftest.$ac_ext <<_ACEOF
9245/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009246$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009247 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009248int
9249main ()
9250{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009251static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009252test_array [0] = 0
9253
9254 ;
9255 return 0;
9256}
9257_ACEOF
9258rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009259if { (ac_try="$ac_compile"
9260case "(($ac_try" in
9261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9262 *) ac_try_echo=$ac_try;;
9263esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009267 grep -v '^ *+' conftest.er1 >conftest.err
9268 rm -f conftest.er1
9269 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009271 (exit $ac_status); } && {
9272 test -z "$ac_c_werror_flag" ||
9273 test ! -s conftest.err
9274 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009275 ac_hi=-1 ac_mid=-1
9276 while :; do
9277 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009278/* confdefs.h. */
9279_ACEOF
9280cat confdefs.h >>conftest.$ac_ext
9281cat >>conftest.$ac_ext <<_ACEOF
9282/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009283$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009284 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009285int
9286main ()
9287{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009288static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009289test_array [0] = 0
9290
9291 ;
9292 return 0;
9293}
9294_ACEOF
9295rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009296if { (ac_try="$ac_compile"
9297case "(($ac_try" in
9298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9299 *) ac_try_echo=$ac_try;;
9300esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009302 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009304 grep -v '^ *+' conftest.er1 >conftest.err
9305 rm -f conftest.er1
9306 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009308 (exit $ac_status); } && {
9309 test -z "$ac_c_werror_flag" ||
9310 test ! -s conftest.err
9311 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009312 ac_lo=$ac_mid; break
9313else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009315sed 's/^/| /' conftest.$ac_ext >&5
9316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009317 ac_hi=`expr '(' $ac_mid ')' - 1`
9318 if test $ac_mid -le $ac_hi; then
9319 ac_lo= ac_hi=
9320 break
9321 fi
9322 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009324
9325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009326 done
9327else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009329sed 's/^/| /' conftest.$ac_ext >&5
9330
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009331 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009333
9334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009336
9337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009338# Binary search between lo and hi bounds.
9339while test "x$ac_lo" != "x$ac_hi"; do
9340 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9341 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009342/* confdefs.h. */
9343_ACEOF
9344cat confdefs.h >>conftest.$ac_ext
9345cat >>conftest.$ac_ext <<_ACEOF
9346/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009347$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009348 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009349int
9350main ()
9351{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009352static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009353test_array [0] = 0
9354
9355 ;
9356 return 0;
9357}
9358_ACEOF
9359rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009360if { (ac_try="$ac_compile"
9361case "(($ac_try" in
9362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9363 *) ac_try_echo=$ac_try;;
9364esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009366 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009368 grep -v '^ *+' conftest.er1 >conftest.err
9369 rm -f conftest.er1
9370 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009372 (exit $ac_status); } && {
9373 test -z "$ac_c_werror_flag" ||
9374 test ! -s conftest.err
9375 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009376 ac_hi=$ac_mid
9377else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009378 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009379sed 's/^/| /' conftest.$ac_ext >&5
9380
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009381 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009383
9384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009385done
9386case $ac_lo in
9387?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009388'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009389 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009390See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009391echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009392See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009393 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009394 else
9395 ac_cv_sizeof_float=0
9396 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009397esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009398else
Martin v. Löwis11437992002-04-12 09:54:03 +00009399 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009400/* confdefs.h. */
9401_ACEOF
9402cat confdefs.h >>conftest.$ac_ext
9403cat >>conftest.$ac_ext <<_ACEOF
9404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009405$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009406 typedef float ac__type_sizeof_;
9407static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9408static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009409#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009410#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009411int
9412main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009413{
Martin v. Löwis11437992002-04-12 09:54:03 +00009414
9415 FILE *f = fopen ("conftest.val", "w");
9416 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009417 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009418 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009419 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009420 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009421 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009422 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009423 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009424 }
9425 else
9426 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009427 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009428 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009429 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009430 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009432 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009433
9434 ;
9435 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009436}
Martin v. Löwis11437992002-04-12 09:54:03 +00009437_ACEOF
9438rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009439if { (ac_try="$ac_link"
9440case "(($ac_try" in
9441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9442 *) ac_try_echo=$ac_try;;
9443esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009445 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009446 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009449 { (case "(($ac_try" in
9450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9451 *) ac_try_echo=$ac_try;;
9452esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009454 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009455 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 (exit $ac_status); }; }; then
9458 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009459else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009460 echo "$as_me: program exited with status $ac_status" >&5
9461echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009462sed 's/^/| /' conftest.$ac_ext >&5
9463
Martin v. Löwis11437992002-04-12 09:54:03 +00009464( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009465if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009466 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009467See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009468echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009469See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009470 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009471 else
9472 ac_cv_sizeof_float=0
9473 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009475rm -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 +00009476fi
9477rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009478fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009479{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9480echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009481
9482
9483
Martin v. Löwis11437992002-04-12 09:54:03 +00009484cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009485#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009486_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009487
9488
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009489{ echo "$as_me:$LINENO: checking for double" >&5
9490echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9491if test "${ac_cv_type_double+set}" = set; then
9492 echo $ECHO_N "(cached) $ECHO_C" >&6
9493else
9494 cat >conftest.$ac_ext <<_ACEOF
9495/* confdefs.h. */
9496_ACEOF
9497cat confdefs.h >>conftest.$ac_ext
9498cat >>conftest.$ac_ext <<_ACEOF
9499/* end confdefs.h. */
9500$ac_includes_default
9501typedef double ac__type_new_;
9502int
9503main ()
9504{
9505if ((ac__type_new_ *) 0)
9506 return 0;
9507if (sizeof (ac__type_new_))
9508 return 0;
9509 ;
9510 return 0;
9511}
9512_ACEOF
9513rm -f conftest.$ac_objext
9514if { (ac_try="$ac_compile"
9515case "(($ac_try" in
9516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9517 *) ac_try_echo=$ac_try;;
9518esac
9519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9520 (eval "$ac_compile") 2>conftest.er1
9521 ac_status=$?
9522 grep -v '^ *+' conftest.er1 >conftest.err
9523 rm -f conftest.er1
9524 cat conftest.err >&5
9525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9526 (exit $ac_status); } && {
9527 test -z "$ac_c_werror_flag" ||
9528 test ! -s conftest.err
9529 } && test -s conftest.$ac_objext; then
9530 ac_cv_type_double=yes
9531else
9532 echo "$as_me: failed program was:" >&5
9533sed 's/^/| /' conftest.$ac_ext >&5
9534
9535 ac_cv_type_double=no
9536fi
9537
9538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9539fi
9540{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9541echo "${ECHO_T}$ac_cv_type_double" >&6; }
9542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009543# The cast to long int works around a bug in the HP C Compiler
9544# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9545# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9546# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009547{ echo "$as_me:$LINENO: checking size of double" >&5
9548echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009549if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009550 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009551else
Martin v. Löwis11437992002-04-12 09:54:03 +00009552 if test "$cross_compiling" = yes; then
9553 # Depending upon the size, compute the lo and hi bounds.
9554cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009555/* confdefs.h. */
9556_ACEOF
9557cat confdefs.h >>conftest.$ac_ext
9558cat >>conftest.$ac_ext <<_ACEOF
9559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009560$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009561 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009562int
9563main ()
9564{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009565static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009566test_array [0] = 0
9567
9568 ;
9569 return 0;
9570}
9571_ACEOF
9572rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573if { (ac_try="$ac_compile"
9574case "(($ac_try" in
9575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9576 *) ac_try_echo=$ac_try;;
9577esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009579 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009581 grep -v '^ *+' conftest.er1 >conftest.err
9582 rm -f conftest.er1
9583 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009585 (exit $ac_status); } && {
9586 test -z "$ac_c_werror_flag" ||
9587 test ! -s conftest.err
9588 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009589 ac_lo=0 ac_mid=0
9590 while :; do
9591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009592/* confdefs.h. */
9593_ACEOF
9594cat confdefs.h >>conftest.$ac_ext
9595cat >>conftest.$ac_ext <<_ACEOF
9596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009597$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009598 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009599int
9600main ()
9601{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009602static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009603test_array [0] = 0
9604
9605 ;
9606 return 0;
9607}
9608_ACEOF
9609rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009610if { (ac_try="$ac_compile"
9611case "(($ac_try" in
9612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9613 *) ac_try_echo=$ac_try;;
9614esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009618 grep -v '^ *+' conftest.er1 >conftest.err
9619 rm -f conftest.er1
9620 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009622 (exit $ac_status); } && {
9623 test -z "$ac_c_werror_flag" ||
9624 test ! -s conftest.err
9625 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009626 ac_hi=$ac_mid; break
9627else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009629sed 's/^/| /' conftest.$ac_ext >&5
9630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009631 ac_lo=`expr $ac_mid + 1`
9632 if test $ac_lo -le $ac_mid; then
9633 ac_lo= ac_hi=
9634 break
9635 fi
9636 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009638
9639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 done
9641else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009643sed 's/^/| /' conftest.$ac_ext >&5
9644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009646/* confdefs.h. */
9647_ACEOF
9648cat confdefs.h >>conftest.$ac_ext
9649cat >>conftest.$ac_ext <<_ACEOF
9650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009651$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009652 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009653int
9654main ()
9655{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009656static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009657test_array [0] = 0
9658
9659 ;
9660 return 0;
9661}
9662_ACEOF
9663rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009664if { (ac_try="$ac_compile"
9665case "(($ac_try" in
9666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9667 *) ac_try_echo=$ac_try;;
9668esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009672 grep -v '^ *+' conftest.er1 >conftest.err
9673 rm -f conftest.er1
9674 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009676 (exit $ac_status); } && {
9677 test -z "$ac_c_werror_flag" ||
9678 test ! -s conftest.err
9679 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 ac_hi=-1 ac_mid=-1
9681 while :; do
9682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009683/* confdefs.h. */
9684_ACEOF
9685cat confdefs.h >>conftest.$ac_ext
9686cat >>conftest.$ac_ext <<_ACEOF
9687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009688$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009689 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009690int
9691main ()
9692{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009693static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009694test_array [0] = 0
9695
9696 ;
9697 return 0;
9698}
9699_ACEOF
9700rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009701if { (ac_try="$ac_compile"
9702case "(($ac_try" in
9703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9704 *) ac_try_echo=$ac_try;;
9705esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009709 grep -v '^ *+' conftest.er1 >conftest.err
9710 rm -f conftest.er1
9711 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009713 (exit $ac_status); } && {
9714 test -z "$ac_c_werror_flag" ||
9715 test ! -s conftest.err
9716 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009717 ac_lo=$ac_mid; break
9718else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009720sed 's/^/| /' conftest.$ac_ext >&5
9721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009722 ac_hi=`expr '(' $ac_mid ')' - 1`
9723 if test $ac_mid -le $ac_hi; then
9724 ac_lo= ac_hi=
9725 break
9726 fi
9727 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009729
9730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 done
9732else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009734sed 's/^/| /' conftest.$ac_ext >&5
9735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009738
9739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009740fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009741
9742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009743# Binary search between lo and hi bounds.
9744while test "x$ac_lo" != "x$ac_hi"; do
9745 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009747/* confdefs.h. */
9748_ACEOF
9749cat confdefs.h >>conftest.$ac_ext
9750cat >>conftest.$ac_ext <<_ACEOF
9751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009752$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009753 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009754int
9755main ()
9756{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009757static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009758test_array [0] = 0
9759
9760 ;
9761 return 0;
9762}
9763_ACEOF
9764rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009765if { (ac_try="$ac_compile"
9766case "(($ac_try" in
9767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9768 *) ac_try_echo=$ac_try;;
9769esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009771 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009773 grep -v '^ *+' conftest.er1 >conftest.err
9774 rm -f conftest.er1
9775 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009777 (exit $ac_status); } && {
9778 test -z "$ac_c_werror_flag" ||
9779 test ! -s conftest.err
9780 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009781 ac_hi=$ac_mid
9782else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009784sed 's/^/| /' conftest.$ac_ext >&5
9785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009786 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009788
9789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009790done
9791case $ac_lo in
9792?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009793'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009794 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009795See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009796echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009797See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009798 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009799 else
9800 ac_cv_sizeof_double=0
9801 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009802esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009803else
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009805/* confdefs.h. */
9806_ACEOF
9807cat confdefs.h >>conftest.$ac_ext
9808cat >>conftest.$ac_ext <<_ACEOF
9809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009810$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009811 typedef double ac__type_sizeof_;
9812static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9813static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009814#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009815#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009816int
9817main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009818{
Martin v. Löwis11437992002-04-12 09:54:03 +00009819
9820 FILE *f = fopen ("conftest.val", "w");
9821 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009822 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009823 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009824 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009825 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009826 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009827 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009828 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009829 }
9830 else
9831 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009833 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009834 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009835 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009837 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009838
9839 ;
9840 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009841}
Martin v. Löwis11437992002-04-12 09:54:03 +00009842_ACEOF
9843rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009844if { (ac_try="$ac_link"
9845case "(($ac_try" in
9846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9847 *) ac_try_echo=$ac_try;;
9848esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009850 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009851 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009853 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854 { (case "(($ac_try" in
9855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9856 *) ac_try_echo=$ac_try;;
9857esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009860 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009862 (exit $ac_status); }; }; then
9863 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009864else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009865 echo "$as_me: program exited with status $ac_status" >&5
9866echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009867sed 's/^/| /' conftest.$ac_ext >&5
9868
Martin v. Löwis11437992002-04-12 09:54:03 +00009869( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009870if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009871 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009872See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009873echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009874See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009875 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876 else
9877 ac_cv_sizeof_double=0
9878 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880rm -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 +00009881fi
9882rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009883fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009884{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9885echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886
9887
9888
Martin v. Löwis11437992002-04-12 09:54:03 +00009889cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009890#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009891_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009892
9893
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009894{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9895echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9896if test "${ac_cv_type_fpos_t+set}" = set; then
9897 echo $ECHO_N "(cached) $ECHO_C" >&6
9898else
9899 cat >conftest.$ac_ext <<_ACEOF
9900/* confdefs.h. */
9901_ACEOF
9902cat confdefs.h >>conftest.$ac_ext
9903cat >>conftest.$ac_ext <<_ACEOF
9904/* end confdefs.h. */
9905$ac_includes_default
9906typedef fpos_t ac__type_new_;
9907int
9908main ()
9909{
9910if ((ac__type_new_ *) 0)
9911 return 0;
9912if (sizeof (ac__type_new_))
9913 return 0;
9914 ;
9915 return 0;
9916}
9917_ACEOF
9918rm -f conftest.$ac_objext
9919if { (ac_try="$ac_compile"
9920case "(($ac_try" in
9921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9922 *) ac_try_echo=$ac_try;;
9923esac
9924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9925 (eval "$ac_compile") 2>conftest.er1
9926 ac_status=$?
9927 grep -v '^ *+' conftest.er1 >conftest.err
9928 rm -f conftest.er1
9929 cat conftest.err >&5
9930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9931 (exit $ac_status); } && {
9932 test -z "$ac_c_werror_flag" ||
9933 test ! -s conftest.err
9934 } && test -s conftest.$ac_objext; then
9935 ac_cv_type_fpos_t=yes
9936else
9937 echo "$as_me: failed program was:" >&5
9938sed 's/^/| /' conftest.$ac_ext >&5
9939
9940 ac_cv_type_fpos_t=no
9941fi
9942
9943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9944fi
9945{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9946echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9947
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009948# The cast to long int works around a bug in the HP C Compiler
9949# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9950# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9951# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009952{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9953echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009954if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009955 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009956else
Martin v. Löwis11437992002-04-12 09:54:03 +00009957 if test "$cross_compiling" = yes; then
9958 # Depending upon the size, compute the lo and hi bounds.
9959cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009960/* confdefs.h. */
9961_ACEOF
9962cat confdefs.h >>conftest.$ac_ext
9963cat >>conftest.$ac_ext <<_ACEOF
9964/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009965$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009966 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009967int
9968main ()
9969{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009970static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009971test_array [0] = 0
9972
9973 ;
9974 return 0;
9975}
9976_ACEOF
9977rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009978if { (ac_try="$ac_compile"
9979case "(($ac_try" in
9980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9981 *) ac_try_echo=$ac_try;;
9982esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009984 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009986 grep -v '^ *+' conftest.er1 >conftest.err
9987 rm -f conftest.er1
9988 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009990 (exit $ac_status); } && {
9991 test -z "$ac_c_werror_flag" ||
9992 test ! -s conftest.err
9993 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009994 ac_lo=0 ac_mid=0
9995 while :; do
9996 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009997/* confdefs.h. */
9998_ACEOF
9999cat confdefs.h >>conftest.$ac_ext
10000cat >>conftest.$ac_ext <<_ACEOF
10001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010002$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010003 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010004int
10005main ()
10006{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010007static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010008test_array [0] = 0
10009
10010 ;
10011 return 0;
10012}
10013_ACEOF
10014rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015if { (ac_try="$ac_compile"
10016case "(($ac_try" in
10017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10018 *) ac_try_echo=$ac_try;;
10019esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010021 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010023 grep -v '^ *+' conftest.er1 >conftest.err
10024 rm -f conftest.er1
10025 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010027 (exit $ac_status); } && {
10028 test -z "$ac_c_werror_flag" ||
10029 test ! -s conftest.err
10030 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010031 ac_hi=$ac_mid; break
10032else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010034sed 's/^/| /' conftest.$ac_ext >&5
10035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010036 ac_lo=`expr $ac_mid + 1`
10037 if test $ac_lo -le $ac_mid; then
10038 ac_lo= ac_hi=
10039 break
10040 fi
10041 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010043
10044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010045 done
10046else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010048sed 's/^/| /' conftest.$ac_ext >&5
10049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010051/* confdefs.h. */
10052_ACEOF
10053cat confdefs.h >>conftest.$ac_ext
10054cat >>conftest.$ac_ext <<_ACEOF
10055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010056$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010057 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010058int
10059main ()
10060{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010061static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010062test_array [0] = 0
10063
10064 ;
10065 return 0;
10066}
10067_ACEOF
10068rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010069if { (ac_try="$ac_compile"
10070case "(($ac_try" in
10071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10072 *) ac_try_echo=$ac_try;;
10073esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010077 grep -v '^ *+' conftest.er1 >conftest.err
10078 rm -f conftest.er1
10079 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010081 (exit $ac_status); } && {
10082 test -z "$ac_c_werror_flag" ||
10083 test ! -s conftest.err
10084 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 ac_hi=-1 ac_mid=-1
10086 while :; do
10087 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010088/* confdefs.h. */
10089_ACEOF
10090cat confdefs.h >>conftest.$ac_ext
10091cat >>conftest.$ac_ext <<_ACEOF
10092/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010093$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010094 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010095int
10096main ()
10097{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010098static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010099test_array [0] = 0
10100
10101 ;
10102 return 0;
10103}
10104_ACEOF
10105rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010106if { (ac_try="$ac_compile"
10107case "(($ac_try" in
10108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10109 *) ac_try_echo=$ac_try;;
10110esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010112 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010114 grep -v '^ *+' conftest.er1 >conftest.err
10115 rm -f conftest.er1
10116 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010118 (exit $ac_status); } && {
10119 test -z "$ac_c_werror_flag" ||
10120 test ! -s conftest.err
10121 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010122 ac_lo=$ac_mid; break
10123else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010125sed 's/^/| /' conftest.$ac_ext >&5
10126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010127 ac_hi=`expr '(' $ac_mid ')' - 1`
10128 if test $ac_mid -le $ac_hi; then
10129 ac_lo= ac_hi=
10130 break
10131 fi
10132 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134
10135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 done
10137else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010139sed 's/^/| /' conftest.$ac_ext >&5
10140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010141 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010143
10144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010146
10147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010148# Binary search between lo and hi bounds.
10149while test "x$ac_lo" != "x$ac_hi"; do
10150 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10151 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010152/* confdefs.h. */
10153_ACEOF
10154cat confdefs.h >>conftest.$ac_ext
10155cat >>conftest.$ac_ext <<_ACEOF
10156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010157$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010158 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010159int
10160main ()
10161{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010162static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010163test_array [0] = 0
10164
10165 ;
10166 return 0;
10167}
10168_ACEOF
10169rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010170if { (ac_try="$ac_compile"
10171case "(($ac_try" in
10172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10173 *) ac_try_echo=$ac_try;;
10174esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010178 grep -v '^ *+' conftest.er1 >conftest.err
10179 rm -f conftest.er1
10180 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182 (exit $ac_status); } && {
10183 test -z "$ac_c_werror_flag" ||
10184 test ! -s conftest.err
10185 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 ac_hi=$ac_mid
10187else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010189sed 's/^/| /' conftest.$ac_ext >&5
10190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010191 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010193
10194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010195done
10196case $ac_lo in
10197?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010198'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010199 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010200See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010201echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010202See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010203 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010204 else
10205 ac_cv_sizeof_fpos_t=0
10206 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010207esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010208else
Martin v. Löwis11437992002-04-12 09:54:03 +000010209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010210/* confdefs.h. */
10211_ACEOF
10212cat confdefs.h >>conftest.$ac_ext
10213cat >>conftest.$ac_ext <<_ACEOF
10214/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010215$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010216 typedef fpos_t ac__type_sizeof_;
10217static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10218static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010219#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010220#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010221int
10222main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010223{
Martin v. Löwis11437992002-04-12 09:54:03 +000010224
10225 FILE *f = fopen ("conftest.val", "w");
10226 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010228 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010229 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010231 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010232 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010233 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 }
10235 else
10236 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010238 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010239 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010240 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010241 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010242 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010243
10244 ;
10245 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010246}
Martin v. Löwis11437992002-04-12 09:54:03 +000010247_ACEOF
10248rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010249if { (ac_try="$ac_link"
10250case "(($ac_try" in
10251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10252 *) ac_try_echo=$ac_try;;
10253esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010255 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010259 { (case "(($ac_try" in
10260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10261 *) ac_try_echo=$ac_try;;
10262esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010264 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 (exit $ac_status); }; }; then
10268 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010269else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010270 echo "$as_me: program exited with status $ac_status" >&5
10271echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010272sed 's/^/| /' conftest.$ac_ext >&5
10273
Martin v. Löwis11437992002-04-12 09:54:03 +000010274( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010275if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010276 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010277See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010278echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010279See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010280 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010281 else
10282 ac_cv_sizeof_fpos_t=0
10283 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010285rm -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 +000010286fi
10287rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010288fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010289{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10290echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010291
10292
10293
Martin v. Löwis11437992002-04-12 09:54:03 +000010294cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010295#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010296_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010297
Michael W. Hudson54241132001-12-07 15:38:26 +000010298
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010299{ echo "$as_me:$LINENO: checking for size_t" >&5
10300echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10301if test "${ac_cv_type_size_t+set}" = set; then
10302 echo $ECHO_N "(cached) $ECHO_C" >&6
10303else
10304 cat >conftest.$ac_ext <<_ACEOF
10305/* confdefs.h. */
10306_ACEOF
10307cat confdefs.h >>conftest.$ac_ext
10308cat >>conftest.$ac_ext <<_ACEOF
10309/* end confdefs.h. */
10310$ac_includes_default
10311typedef size_t ac__type_new_;
10312int
10313main ()
10314{
10315if ((ac__type_new_ *) 0)
10316 return 0;
10317if (sizeof (ac__type_new_))
10318 return 0;
10319 ;
10320 return 0;
10321}
10322_ACEOF
10323rm -f conftest.$ac_objext
10324if { (ac_try="$ac_compile"
10325case "(($ac_try" in
10326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10327 *) ac_try_echo=$ac_try;;
10328esac
10329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10330 (eval "$ac_compile") 2>conftest.er1
10331 ac_status=$?
10332 grep -v '^ *+' conftest.er1 >conftest.err
10333 rm -f conftest.er1
10334 cat conftest.err >&5
10335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10336 (exit $ac_status); } && {
10337 test -z "$ac_c_werror_flag" ||
10338 test ! -s conftest.err
10339 } && test -s conftest.$ac_objext; then
10340 ac_cv_type_size_t=yes
10341else
10342 echo "$as_me: failed program was:" >&5
10343sed 's/^/| /' conftest.$ac_ext >&5
10344
10345 ac_cv_type_size_t=no
10346fi
10347
10348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10349fi
10350{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10351echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010353# The cast to long int works around a bug in the HP C Compiler
10354# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10355# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10356# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010357{ echo "$as_me:$LINENO: checking size of size_t" >&5
10358echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010359if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010360 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010361else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010362 if test "$cross_compiling" = yes; then
10363 # Depending upon the size, compute the lo and hi bounds.
10364cat >conftest.$ac_ext <<_ACEOF
10365/* confdefs.h. */
10366_ACEOF
10367cat confdefs.h >>conftest.$ac_ext
10368cat >>conftest.$ac_ext <<_ACEOF
10369/* end confdefs.h. */
10370$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010371 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010372int
10373main ()
10374{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010375static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010376test_array [0] = 0
10377
10378 ;
10379 return 0;
10380}
10381_ACEOF
10382rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010383if { (ac_try="$ac_compile"
10384case "(($ac_try" in
10385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10386 *) ac_try_echo=$ac_try;;
10387esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010389 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010390 ac_status=$?
10391 grep -v '^ *+' conftest.er1 >conftest.err
10392 rm -f conftest.er1
10393 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010395 (exit $ac_status); } && {
10396 test -z "$ac_c_werror_flag" ||
10397 test ! -s conftest.err
10398 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010399 ac_lo=0 ac_mid=0
10400 while :; do
10401 cat >conftest.$ac_ext <<_ACEOF
10402/* confdefs.h. */
10403_ACEOF
10404cat confdefs.h >>conftest.$ac_ext
10405cat >>conftest.$ac_ext <<_ACEOF
10406/* end confdefs.h. */
10407$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010408 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010409int
10410main ()
10411{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010412static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010413test_array [0] = 0
10414
10415 ;
10416 return 0;
10417}
10418_ACEOF
10419rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010420if { (ac_try="$ac_compile"
10421case "(($ac_try" in
10422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10423 *) ac_try_echo=$ac_try;;
10424esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010426 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010427 ac_status=$?
10428 grep -v '^ *+' conftest.er1 >conftest.err
10429 rm -f conftest.er1
10430 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010432 (exit $ac_status); } && {
10433 test -z "$ac_c_werror_flag" ||
10434 test ! -s conftest.err
10435 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010436 ac_hi=$ac_mid; break
10437else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010438 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010439sed 's/^/| /' conftest.$ac_ext >&5
10440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010441 ac_lo=`expr $ac_mid + 1`
10442 if test $ac_lo -le $ac_mid; then
10443 ac_lo= ac_hi=
10444 break
10445 fi
10446 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010448
10449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010450 done
10451else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010452 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010453sed 's/^/| /' conftest.$ac_ext >&5
10454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010455 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010456/* confdefs.h. */
10457_ACEOF
10458cat confdefs.h >>conftest.$ac_ext
10459cat >>conftest.$ac_ext <<_ACEOF
10460/* end confdefs.h. */
10461$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010462 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010463int
10464main ()
10465{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010466static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010467test_array [0] = 0
10468
10469 ;
10470 return 0;
10471}
10472_ACEOF
10473rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010474if { (ac_try="$ac_compile"
10475case "(($ac_try" in
10476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10477 *) ac_try_echo=$ac_try;;
10478esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010480 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010481 ac_status=$?
10482 grep -v '^ *+' conftest.er1 >conftest.err
10483 rm -f conftest.er1
10484 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010486 (exit $ac_status); } && {
10487 test -z "$ac_c_werror_flag" ||
10488 test ! -s conftest.err
10489 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010490 ac_hi=-1 ac_mid=-1
10491 while :; do
10492 cat >conftest.$ac_ext <<_ACEOF
10493/* confdefs.h. */
10494_ACEOF
10495cat confdefs.h >>conftest.$ac_ext
10496cat >>conftest.$ac_ext <<_ACEOF
10497/* end confdefs.h. */
10498$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010499 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010500int
10501main ()
10502{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010503static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010504test_array [0] = 0
10505
10506 ;
10507 return 0;
10508}
10509_ACEOF
10510rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010511if { (ac_try="$ac_compile"
10512case "(($ac_try" in
10513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10514 *) ac_try_echo=$ac_try;;
10515esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010518 ac_status=$?
10519 grep -v '^ *+' conftest.er1 >conftest.err
10520 rm -f conftest.er1
10521 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010523 (exit $ac_status); } && {
10524 test -z "$ac_c_werror_flag" ||
10525 test ! -s conftest.err
10526 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010527 ac_lo=$ac_mid; break
10528else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010529 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010530sed 's/^/| /' conftest.$ac_ext >&5
10531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010532 ac_hi=`expr '(' $ac_mid ')' - 1`
10533 if test $ac_mid -le $ac_hi; then
10534 ac_lo= ac_hi=
10535 break
10536 fi
10537 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010539
10540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010541 done
10542else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010543 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010544sed 's/^/| /' conftest.$ac_ext >&5
10545
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010546 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010548
10549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010551
10552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010553# Binary search between lo and hi bounds.
10554while test "x$ac_lo" != "x$ac_hi"; do
10555 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10556 cat >conftest.$ac_ext <<_ACEOF
10557/* confdefs.h. */
10558_ACEOF
10559cat confdefs.h >>conftest.$ac_ext
10560cat >>conftest.$ac_ext <<_ACEOF
10561/* end confdefs.h. */
10562$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010563 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010564int
10565main ()
10566{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010567static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010568test_array [0] = 0
10569
10570 ;
10571 return 0;
10572}
10573_ACEOF
10574rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010575if { (ac_try="$ac_compile"
10576case "(($ac_try" in
10577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10578 *) ac_try_echo=$ac_try;;
10579esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010582 ac_status=$?
10583 grep -v '^ *+' conftest.er1 >conftest.err
10584 rm -f conftest.er1
10585 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010587 (exit $ac_status); } && {
10588 test -z "$ac_c_werror_flag" ||
10589 test ! -s conftest.err
10590 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010591 ac_hi=$ac_mid
10592else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010593 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010594sed 's/^/| /' conftest.$ac_ext >&5
10595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010596 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010598
10599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010600done
10601case $ac_lo in
10602?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010603'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010604 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010605See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010606echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010607See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010608 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010609 else
10610 ac_cv_sizeof_size_t=0
10611 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010612esac
10613else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010614 cat >conftest.$ac_ext <<_ACEOF
10615/* confdefs.h. */
10616_ACEOF
10617cat confdefs.h >>conftest.$ac_ext
10618cat >>conftest.$ac_ext <<_ACEOF
10619/* end confdefs.h. */
10620$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010621 typedef size_t ac__type_sizeof_;
10622static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10623static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010624#include <stdio.h>
10625#include <stdlib.h>
10626int
10627main ()
10628{
10629
10630 FILE *f = fopen ("conftest.val", "w");
10631 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010632 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010633 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010634 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010635 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010636 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010638 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010639 }
10640 else
10641 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010643 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010644 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010645 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010646 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010647 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010648
10649 ;
10650 return 0;
10651}
10652_ACEOF
10653rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010654if { (ac_try="$ac_link"
10655case "(($ac_try" in
10656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10657 *) ac_try_echo=$ac_try;;
10658esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010660 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010661 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010663 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010664 { (case "(($ac_try" in
10665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10666 *) ac_try_echo=$ac_try;;
10667esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010669 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010672 (exit $ac_status); }; }; then
10673 ac_cv_sizeof_size_t=`cat conftest.val`
10674else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010675 echo "$as_me: program exited with status $ac_status" >&5
10676echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010677sed 's/^/| /' conftest.$ac_ext >&5
10678
10679( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010680if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010681 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010682See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010683echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010684See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010685 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010686 else
10687 ac_cv_sizeof_size_t=0
10688 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010690rm -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 +000010691fi
10692rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010693fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010694{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10695echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010696
10697
10698
Martin v. Löwis18e16552006-02-15 17:27:45 +000010699cat >>confdefs.h <<_ACEOF
10700#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10701_ACEOF
10702
10703
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010704{ echo "$as_me:$LINENO: checking for pid_t" >&5
10705echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10706if test "${ac_cv_type_pid_t+set}" = set; then
10707 echo $ECHO_N "(cached) $ECHO_C" >&6
10708else
10709 cat >conftest.$ac_ext <<_ACEOF
10710/* confdefs.h. */
10711_ACEOF
10712cat confdefs.h >>conftest.$ac_ext
10713cat >>conftest.$ac_ext <<_ACEOF
10714/* end confdefs.h. */
10715$ac_includes_default
10716typedef pid_t ac__type_new_;
10717int
10718main ()
10719{
10720if ((ac__type_new_ *) 0)
10721 return 0;
10722if (sizeof (ac__type_new_))
10723 return 0;
10724 ;
10725 return 0;
10726}
10727_ACEOF
10728rm -f conftest.$ac_objext
10729if { (ac_try="$ac_compile"
10730case "(($ac_try" in
10731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10732 *) ac_try_echo=$ac_try;;
10733esac
10734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10735 (eval "$ac_compile") 2>conftest.er1
10736 ac_status=$?
10737 grep -v '^ *+' conftest.er1 >conftest.err
10738 rm -f conftest.er1
10739 cat conftest.err >&5
10740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10741 (exit $ac_status); } && {
10742 test -z "$ac_c_werror_flag" ||
10743 test ! -s conftest.err
10744 } && test -s conftest.$ac_objext; then
10745 ac_cv_type_pid_t=yes
10746else
10747 echo "$as_me: failed program was:" >&5
10748sed 's/^/| /' conftest.$ac_ext >&5
10749
10750 ac_cv_type_pid_t=no
10751fi
10752
10753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10754fi
10755{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10756echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10757
Christian Heimes400adb02008-02-01 08:12:03 +000010758# The cast to long int works around a bug in the HP C Compiler
10759# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10760# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10761# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010762{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10763echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010764if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010765 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010766else
10767 if test "$cross_compiling" = yes; then
10768 # Depending upon the size, compute the lo and hi bounds.
10769cat >conftest.$ac_ext <<_ACEOF
10770/* confdefs.h. */
10771_ACEOF
10772cat confdefs.h >>conftest.$ac_ext
10773cat >>conftest.$ac_ext <<_ACEOF
10774/* end confdefs.h. */
10775$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010776 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010777int
10778main ()
10779{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010780static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010781test_array [0] = 0
10782
10783 ;
10784 return 0;
10785}
10786_ACEOF
10787rm -f conftest.$ac_objext
10788if { (ac_try="$ac_compile"
10789case "(($ac_try" in
10790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10791 *) ac_try_echo=$ac_try;;
10792esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010794 (eval "$ac_compile") 2>conftest.er1
10795 ac_status=$?
10796 grep -v '^ *+' conftest.er1 >conftest.err
10797 rm -f conftest.er1
10798 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010800 (exit $ac_status); } && {
10801 test -z "$ac_c_werror_flag" ||
10802 test ! -s conftest.err
10803 } && test -s conftest.$ac_objext; then
10804 ac_lo=0 ac_mid=0
10805 while :; do
10806 cat >conftest.$ac_ext <<_ACEOF
10807/* confdefs.h. */
10808_ACEOF
10809cat confdefs.h >>conftest.$ac_ext
10810cat >>conftest.$ac_ext <<_ACEOF
10811/* end confdefs.h. */
10812$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010813 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010814int
10815main ()
10816{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010817static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010818test_array [0] = 0
10819
10820 ;
10821 return 0;
10822}
10823_ACEOF
10824rm -f conftest.$ac_objext
10825if { (ac_try="$ac_compile"
10826case "(($ac_try" in
10827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10828 *) ac_try_echo=$ac_try;;
10829esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010831 (eval "$ac_compile") 2>conftest.er1
10832 ac_status=$?
10833 grep -v '^ *+' conftest.er1 >conftest.err
10834 rm -f conftest.er1
10835 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010837 (exit $ac_status); } && {
10838 test -z "$ac_c_werror_flag" ||
10839 test ! -s conftest.err
10840 } && test -s conftest.$ac_objext; then
10841 ac_hi=$ac_mid; break
10842else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010843 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010844sed 's/^/| /' conftest.$ac_ext >&5
10845
10846 ac_lo=`expr $ac_mid + 1`
10847 if test $ac_lo -le $ac_mid; then
10848 ac_lo= ac_hi=
10849 break
10850 fi
10851 ac_mid=`expr 2 '*' $ac_mid + 1`
10852fi
10853
10854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10855 done
10856else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010857 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010858sed 's/^/| /' conftest.$ac_ext >&5
10859
10860 cat >conftest.$ac_ext <<_ACEOF
10861/* confdefs.h. */
10862_ACEOF
10863cat confdefs.h >>conftest.$ac_ext
10864cat >>conftest.$ac_ext <<_ACEOF
10865/* end confdefs.h. */
10866$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010867 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010868int
10869main ()
10870{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010871static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010872test_array [0] = 0
10873
10874 ;
10875 return 0;
10876}
10877_ACEOF
10878rm -f conftest.$ac_objext
10879if { (ac_try="$ac_compile"
10880case "(($ac_try" in
10881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10882 *) ac_try_echo=$ac_try;;
10883esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010885 (eval "$ac_compile") 2>conftest.er1
10886 ac_status=$?
10887 grep -v '^ *+' conftest.er1 >conftest.err
10888 rm -f conftest.er1
10889 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010891 (exit $ac_status); } && {
10892 test -z "$ac_c_werror_flag" ||
10893 test ! -s conftest.err
10894 } && test -s conftest.$ac_objext; then
10895 ac_hi=-1 ac_mid=-1
10896 while :; do
10897 cat >conftest.$ac_ext <<_ACEOF
10898/* confdefs.h. */
10899_ACEOF
10900cat confdefs.h >>conftest.$ac_ext
10901cat >>conftest.$ac_ext <<_ACEOF
10902/* end confdefs.h. */
10903$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010904 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010905int
10906main ()
10907{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010908static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010909test_array [0] = 0
10910
10911 ;
10912 return 0;
10913}
10914_ACEOF
10915rm -f conftest.$ac_objext
10916if { (ac_try="$ac_compile"
10917case "(($ac_try" in
10918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10919 *) ac_try_echo=$ac_try;;
10920esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010922 (eval "$ac_compile") 2>conftest.er1
10923 ac_status=$?
10924 grep -v '^ *+' conftest.er1 >conftest.err
10925 rm -f conftest.er1
10926 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010928 (exit $ac_status); } && {
10929 test -z "$ac_c_werror_flag" ||
10930 test ! -s conftest.err
10931 } && test -s conftest.$ac_objext; then
10932 ac_lo=$ac_mid; break
10933else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010934 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010935sed 's/^/| /' conftest.$ac_ext >&5
10936
10937 ac_hi=`expr '(' $ac_mid ')' - 1`
10938 if test $ac_mid -le $ac_hi; then
10939 ac_lo= ac_hi=
10940 break
10941 fi
10942 ac_mid=`expr 2 '*' $ac_mid`
10943fi
10944
10945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10946 done
10947else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010948 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010949sed 's/^/| /' conftest.$ac_ext >&5
10950
10951 ac_lo= ac_hi=
10952fi
10953
10954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10955fi
10956
10957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10958# Binary search between lo and hi bounds.
10959while test "x$ac_lo" != "x$ac_hi"; do
10960 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10961 cat >conftest.$ac_ext <<_ACEOF
10962/* confdefs.h. */
10963_ACEOF
10964cat confdefs.h >>conftest.$ac_ext
10965cat >>conftest.$ac_ext <<_ACEOF
10966/* end confdefs.h. */
10967$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010968 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010969int
10970main ()
10971{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010972static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010973test_array [0] = 0
10974
10975 ;
10976 return 0;
10977}
10978_ACEOF
10979rm -f conftest.$ac_objext
10980if { (ac_try="$ac_compile"
10981case "(($ac_try" in
10982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10983 *) ac_try_echo=$ac_try;;
10984esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010986 (eval "$ac_compile") 2>conftest.er1
10987 ac_status=$?
10988 grep -v '^ *+' conftest.er1 >conftest.err
10989 rm -f conftest.er1
10990 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010992 (exit $ac_status); } && {
10993 test -z "$ac_c_werror_flag" ||
10994 test ! -s conftest.err
10995 } && test -s conftest.$ac_objext; then
10996 ac_hi=$ac_mid
10997else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010998 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010999sed 's/^/| /' conftest.$ac_ext >&5
11000
11001 ac_lo=`expr '(' $ac_mid ')' + 1`
11002fi
11003
11004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11005done
11006case $ac_lo in
11007?*) ac_cv_sizeof_pid_t=$ac_lo;;
11008'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011009 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011010See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011011echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011012See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011013 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011014 else
11015 ac_cv_sizeof_pid_t=0
11016 fi ;;
11017esac
11018else
11019 cat >conftest.$ac_ext <<_ACEOF
11020/* confdefs.h. */
11021_ACEOF
11022cat confdefs.h >>conftest.$ac_ext
11023cat >>conftest.$ac_ext <<_ACEOF
11024/* end confdefs.h. */
11025$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011026 typedef pid_t ac__type_sizeof_;
11027static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11028static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011029#include <stdio.h>
11030#include <stdlib.h>
11031int
11032main ()
11033{
11034
11035 FILE *f = fopen ("conftest.val", "w");
11036 if (! f)
11037 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011038 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011039 {
11040 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011041 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011042 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011043 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011044 }
11045 else
11046 {
11047 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011048 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011049 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011050 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011051 }
11052 return ferror (f) || fclose (f) != 0;
11053
11054 ;
11055 return 0;
11056}
11057_ACEOF
11058rm -f conftest$ac_exeext
11059if { (ac_try="$ac_link"
11060case "(($ac_try" in
11061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11062 *) ac_try_echo=$ac_try;;
11063esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011065 (eval "$ac_link") 2>&5
11066 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011068 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11069 { (case "(($ac_try" in
11070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11071 *) ac_try_echo=$ac_try;;
11072esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011074 (eval "$ac_try") 2>&5
11075 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011077 (exit $ac_status); }; }; then
11078 ac_cv_sizeof_pid_t=`cat conftest.val`
11079else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011080 echo "$as_me: program exited with status $ac_status" >&5
11081echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011082sed 's/^/| /' conftest.$ac_ext >&5
11083
11084( exit $ac_status )
11085if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011086 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011087See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011088echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011089See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011090 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011091 else
11092 ac_cv_sizeof_pid_t=0
11093 fi
11094fi
11095rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11096fi
11097rm -f conftest.val
11098fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011099{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11100echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011101
11102
11103
11104cat >>confdefs.h <<_ACEOF
11105#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11106_ACEOF
11107
11108
Michael W. Hudson54241132001-12-07 15:38:26 +000011109
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011110{ echo "$as_me:$LINENO: checking for long long support" >&5
11111echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011112have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011113cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011114/* confdefs.h. */
11115_ACEOF
11116cat confdefs.h >>conftest.$ac_ext
11117cat >>conftest.$ac_ext <<_ACEOF
11118/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011119
Martin v. Löwis11437992002-04-12 09:54:03 +000011120int
11121main ()
11122{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011123long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011124 ;
11125 return 0;
11126}
11127_ACEOF
11128rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011129if { (ac_try="$ac_compile"
11130case "(($ac_try" in
11131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11132 *) ac_try_echo=$ac_try;;
11133esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011135 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011137 grep -v '^ *+' conftest.er1 >conftest.err
11138 rm -f conftest.er1
11139 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011141 (exit $ac_status); } && {
11142 test -z "$ac_c_werror_flag" ||
11143 test ! -s conftest.err
11144 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011145
11146
11147cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011148#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011149_ACEOF
11150
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011151 have_long_long=yes
11152
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011153else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011155sed 's/^/| /' conftest.$ac_ext >&5
11156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011157
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011159
11160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011161{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11162echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011163if test "$have_long_long" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011164{ echo "$as_me:$LINENO: checking for long long" >&5
11165echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11166if test "${ac_cv_type_long_long+set}" = set; then
11167 echo $ECHO_N "(cached) $ECHO_C" >&6
11168else
11169 cat >conftest.$ac_ext <<_ACEOF
11170/* confdefs.h. */
11171_ACEOF
11172cat confdefs.h >>conftest.$ac_ext
11173cat >>conftest.$ac_ext <<_ACEOF
11174/* end confdefs.h. */
11175$ac_includes_default
11176typedef long long ac__type_new_;
11177int
11178main ()
11179{
11180if ((ac__type_new_ *) 0)
11181 return 0;
11182if (sizeof (ac__type_new_))
11183 return 0;
11184 ;
11185 return 0;
11186}
11187_ACEOF
11188rm -f conftest.$ac_objext
11189if { (ac_try="$ac_compile"
11190case "(($ac_try" in
11191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11192 *) ac_try_echo=$ac_try;;
11193esac
11194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11195 (eval "$ac_compile") 2>conftest.er1
11196 ac_status=$?
11197 grep -v '^ *+' conftest.er1 >conftest.err
11198 rm -f conftest.er1
11199 cat conftest.err >&5
11200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11201 (exit $ac_status); } && {
11202 test -z "$ac_c_werror_flag" ||
11203 test ! -s conftest.err
11204 } && test -s conftest.$ac_objext; then
11205 ac_cv_type_long_long=yes
11206else
11207 echo "$as_me: failed program was:" >&5
11208sed 's/^/| /' conftest.$ac_ext >&5
11209
11210 ac_cv_type_long_long=no
11211fi
11212
11213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11214fi
11215{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11216echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011218# The cast to long int works around a bug in the HP C Compiler
11219# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11220# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11221# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011222{ echo "$as_me:$LINENO: checking size of long long" >&5
11223echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011224if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011225 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011226else
Martin v. Löwis11437992002-04-12 09:54:03 +000011227 if test "$cross_compiling" = yes; then
11228 # Depending upon the size, compute the lo and hi bounds.
11229cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011230/* confdefs.h. */
11231_ACEOF
11232cat confdefs.h >>conftest.$ac_ext
11233cat >>conftest.$ac_ext <<_ACEOF
11234/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011235$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011236 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011237int
11238main ()
11239{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011240static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011241test_array [0] = 0
11242
11243 ;
11244 return 0;
11245}
11246_ACEOF
11247rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011248if { (ac_try="$ac_compile"
11249case "(($ac_try" in
11250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11251 *) ac_try_echo=$ac_try;;
11252esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011254 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011255 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011256 grep -v '^ *+' conftest.er1 >conftest.err
11257 rm -f conftest.er1
11258 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011260 (exit $ac_status); } && {
11261 test -z "$ac_c_werror_flag" ||
11262 test ! -s conftest.err
11263 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 ac_lo=0 ac_mid=0
11265 while :; do
11266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011267/* confdefs.h. */
11268_ACEOF
11269cat confdefs.h >>conftest.$ac_ext
11270cat >>conftest.$ac_ext <<_ACEOF
11271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011272$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011273 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011274int
11275main ()
11276{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011277static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011278test_array [0] = 0
11279
11280 ;
11281 return 0;
11282}
11283_ACEOF
11284rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011285if { (ac_try="$ac_compile"
11286case "(($ac_try" in
11287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11288 *) ac_try_echo=$ac_try;;
11289esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011291 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011293 grep -v '^ *+' conftest.er1 >conftest.err
11294 rm -f conftest.er1
11295 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011297 (exit $ac_status); } && {
11298 test -z "$ac_c_werror_flag" ||
11299 test ! -s conftest.err
11300 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011301 ac_hi=$ac_mid; break
11302else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011304sed 's/^/| /' conftest.$ac_ext >&5
11305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011306 ac_lo=`expr $ac_mid + 1`
11307 if test $ac_lo -le $ac_mid; then
11308 ac_lo= ac_hi=
11309 break
11310 fi
11311 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011313
11314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 done
11316else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011318sed 's/^/| /' conftest.$ac_ext >&5
11319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011320 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011321/* confdefs.h. */
11322_ACEOF
11323cat confdefs.h >>conftest.$ac_ext
11324cat >>conftest.$ac_ext <<_ACEOF
11325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011326$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011327 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011328int
11329main ()
11330{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011331static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011332test_array [0] = 0
11333
11334 ;
11335 return 0;
11336}
11337_ACEOF
11338rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011339if { (ac_try="$ac_compile"
11340case "(($ac_try" in
11341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11342 *) ac_try_echo=$ac_try;;
11343esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011345 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011347 grep -v '^ *+' conftest.er1 >conftest.err
11348 rm -f conftest.er1
11349 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011351 (exit $ac_status); } && {
11352 test -z "$ac_c_werror_flag" ||
11353 test ! -s conftest.err
11354 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011355 ac_hi=-1 ac_mid=-1
11356 while :; do
11357 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011358/* confdefs.h. */
11359_ACEOF
11360cat confdefs.h >>conftest.$ac_ext
11361cat >>conftest.$ac_ext <<_ACEOF
11362/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011363$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011364 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011365int
11366main ()
11367{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011368static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011369test_array [0] = 0
11370
11371 ;
11372 return 0;
11373}
11374_ACEOF
11375rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011376if { (ac_try="$ac_compile"
11377case "(($ac_try" in
11378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11379 *) ac_try_echo=$ac_try;;
11380esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011382 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011384 grep -v '^ *+' conftest.er1 >conftest.err
11385 rm -f conftest.er1
11386 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011388 (exit $ac_status); } && {
11389 test -z "$ac_c_werror_flag" ||
11390 test ! -s conftest.err
11391 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011392 ac_lo=$ac_mid; break
11393else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011395sed 's/^/| /' conftest.$ac_ext >&5
11396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011397 ac_hi=`expr '(' $ac_mid ')' - 1`
11398 if test $ac_mid -le $ac_hi; then
11399 ac_lo= ac_hi=
11400 break
11401 fi
11402 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011404
11405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011406 done
11407else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011409sed 's/^/| /' conftest.$ac_ext >&5
11410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011411 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011413
11414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011416
11417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011418# Binary search between lo and hi bounds.
11419while test "x$ac_lo" != "x$ac_hi"; do
11420 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11421 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011422/* confdefs.h. */
11423_ACEOF
11424cat confdefs.h >>conftest.$ac_ext
11425cat >>conftest.$ac_ext <<_ACEOF
11426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011427$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011428 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011429int
11430main ()
11431{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011432static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011433test_array [0] = 0
11434
11435 ;
11436 return 0;
11437}
11438_ACEOF
11439rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011440if { (ac_try="$ac_compile"
11441case "(($ac_try" in
11442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11443 *) ac_try_echo=$ac_try;;
11444esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011446 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011447 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011448 grep -v '^ *+' conftest.er1 >conftest.err
11449 rm -f conftest.er1
11450 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011452 (exit $ac_status); } && {
11453 test -z "$ac_c_werror_flag" ||
11454 test ! -s conftest.err
11455 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011456 ac_hi=$ac_mid
11457else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011459sed 's/^/| /' conftest.$ac_ext >&5
11460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011461 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011463
11464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011465done
11466case $ac_lo in
11467?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011468'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011469 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011470See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011471echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011472See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011473 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011474 else
11475 ac_cv_sizeof_long_long=0
11476 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011477esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011478else
Martin v. Löwis11437992002-04-12 09:54:03 +000011479 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011480/* confdefs.h. */
11481_ACEOF
11482cat confdefs.h >>conftest.$ac_ext
11483cat >>conftest.$ac_ext <<_ACEOF
11484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011485$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011486 typedef long long ac__type_sizeof_;
11487static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11488static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011489#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011490#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011491int
11492main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011493{
Martin v. Löwis11437992002-04-12 09:54:03 +000011494
11495 FILE *f = fopen ("conftest.val", "w");
11496 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011497 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011498 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011499 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011500 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011501 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011502 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011503 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011504 }
11505 else
11506 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011508 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011509 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011510 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011511 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011512 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011513
11514 ;
11515 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011516}
Martin v. Löwis11437992002-04-12 09:54:03 +000011517_ACEOF
11518rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011519if { (ac_try="$ac_link"
11520case "(($ac_try" in
11521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11522 *) ac_try_echo=$ac_try;;
11523esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011525 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011526 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011528 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529 { (case "(($ac_try" in
11530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11531 *) ac_try_echo=$ac_try;;
11532esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011534 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011535 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011537 (exit $ac_status); }; }; then
11538 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011539else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011540 echo "$as_me: program exited with status $ac_status" >&5
11541echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011542sed 's/^/| /' conftest.$ac_ext >&5
11543
Martin v. Löwis11437992002-04-12 09:54:03 +000011544( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011545if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011546 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011547See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011548echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011549See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011550 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011551 else
11552 ac_cv_sizeof_long_long=0
11553 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011555rm -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 +000011556fi
11557rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011558fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011559{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11560echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011561
11562
11563
Martin v. Löwis11437992002-04-12 09:54:03 +000011564cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011565#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011566_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011567
Michael W. Hudson54241132001-12-07 15:38:26 +000011568
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011569fi
11570
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011571{ echo "$as_me:$LINENO: checking for long double support" >&5
11572echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011573have_long_double=no
11574cat >conftest.$ac_ext <<_ACEOF
11575/* confdefs.h. */
11576_ACEOF
11577cat confdefs.h >>conftest.$ac_ext
11578cat >>conftest.$ac_ext <<_ACEOF
11579/* end confdefs.h. */
11580
11581int
11582main ()
11583{
11584long double x; x = (long double)0;
11585 ;
11586 return 0;
11587}
11588_ACEOF
11589rm -f conftest.$ac_objext
11590if { (ac_try="$ac_compile"
11591case "(($ac_try" in
11592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11593 *) ac_try_echo=$ac_try;;
11594esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011596 (eval "$ac_compile") 2>conftest.er1
11597 ac_status=$?
11598 grep -v '^ *+' conftest.er1 >conftest.err
11599 rm -f conftest.er1
11600 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011602 (exit $ac_status); } && {
11603 test -z "$ac_c_werror_flag" ||
11604 test ! -s conftest.err
11605 } && test -s conftest.$ac_objext; then
11606
11607
11608cat >>confdefs.h <<\_ACEOF
11609#define HAVE_LONG_DOUBLE 1
11610_ACEOF
11611
11612 have_long_double=yes
11613
11614else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011615 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011616sed 's/^/| /' conftest.$ac_ext >&5
11617
11618
11619fi
11620
11621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011622{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11623echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011624if test "$have_long_double" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011625{ echo "$as_me:$LINENO: checking for long double" >&5
11626echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11627if test "${ac_cv_type_long_double+set}" = set; then
11628 echo $ECHO_N "(cached) $ECHO_C" >&6
11629else
11630 cat >conftest.$ac_ext <<_ACEOF
11631/* confdefs.h. */
11632_ACEOF
11633cat confdefs.h >>conftest.$ac_ext
11634cat >>conftest.$ac_ext <<_ACEOF
11635/* end confdefs.h. */
11636$ac_includes_default
11637typedef long double ac__type_new_;
11638int
11639main ()
11640{
11641if ((ac__type_new_ *) 0)
11642 return 0;
11643if (sizeof (ac__type_new_))
11644 return 0;
11645 ;
11646 return 0;
11647}
11648_ACEOF
11649rm -f conftest.$ac_objext
11650if { (ac_try="$ac_compile"
11651case "(($ac_try" in
11652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11653 *) ac_try_echo=$ac_try;;
11654esac
11655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11656 (eval "$ac_compile") 2>conftest.er1
11657 ac_status=$?
11658 grep -v '^ *+' conftest.er1 >conftest.err
11659 rm -f conftest.er1
11660 cat conftest.err >&5
11661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11662 (exit $ac_status); } && {
11663 test -z "$ac_c_werror_flag" ||
11664 test ! -s conftest.err
11665 } && test -s conftest.$ac_objext; then
11666 ac_cv_type_long_double=yes
11667else
11668 echo "$as_me: failed program was:" >&5
11669sed 's/^/| /' conftest.$ac_ext >&5
11670
11671 ac_cv_type_long_double=no
11672fi
11673
11674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11675fi
11676{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11677echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11678
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011679# The cast to long int works around a bug in the HP C Compiler
11680# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11681# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11682# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011683{ echo "$as_me:$LINENO: checking size of long double" >&5
11684echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011685if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011686 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011687else
11688 if test "$cross_compiling" = yes; then
11689 # Depending upon the size, compute the lo and hi bounds.
11690cat >conftest.$ac_ext <<_ACEOF
11691/* confdefs.h. */
11692_ACEOF
11693cat confdefs.h >>conftest.$ac_ext
11694cat >>conftest.$ac_ext <<_ACEOF
11695/* end confdefs.h. */
11696$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011697 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011698int
11699main ()
11700{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011701static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011702test_array [0] = 0
11703
11704 ;
11705 return 0;
11706}
11707_ACEOF
11708rm -f conftest.$ac_objext
11709if { (ac_try="$ac_compile"
11710case "(($ac_try" in
11711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11712 *) ac_try_echo=$ac_try;;
11713esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011715 (eval "$ac_compile") 2>conftest.er1
11716 ac_status=$?
11717 grep -v '^ *+' conftest.er1 >conftest.err
11718 rm -f conftest.er1
11719 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011721 (exit $ac_status); } && {
11722 test -z "$ac_c_werror_flag" ||
11723 test ! -s conftest.err
11724 } && test -s conftest.$ac_objext; then
11725 ac_lo=0 ac_mid=0
11726 while :; do
11727 cat >conftest.$ac_ext <<_ACEOF
11728/* confdefs.h. */
11729_ACEOF
11730cat confdefs.h >>conftest.$ac_ext
11731cat >>conftest.$ac_ext <<_ACEOF
11732/* end confdefs.h. */
11733$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011734 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011735int
11736main ()
11737{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011738static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011739test_array [0] = 0
11740
11741 ;
11742 return 0;
11743}
11744_ACEOF
11745rm -f conftest.$ac_objext
11746if { (ac_try="$ac_compile"
11747case "(($ac_try" in
11748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11749 *) ac_try_echo=$ac_try;;
11750esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011752 (eval "$ac_compile") 2>conftest.er1
11753 ac_status=$?
11754 grep -v '^ *+' conftest.er1 >conftest.err
11755 rm -f conftest.er1
11756 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011758 (exit $ac_status); } && {
11759 test -z "$ac_c_werror_flag" ||
11760 test ! -s conftest.err
11761 } && test -s conftest.$ac_objext; then
11762 ac_hi=$ac_mid; break
11763else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011764 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011765sed 's/^/| /' conftest.$ac_ext >&5
11766
11767 ac_lo=`expr $ac_mid + 1`
11768 if test $ac_lo -le $ac_mid; then
11769 ac_lo= ac_hi=
11770 break
11771 fi
11772 ac_mid=`expr 2 '*' $ac_mid + 1`
11773fi
11774
11775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11776 done
11777else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011778 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011779sed 's/^/| /' conftest.$ac_ext >&5
11780
11781 cat >conftest.$ac_ext <<_ACEOF
11782/* confdefs.h. */
11783_ACEOF
11784cat confdefs.h >>conftest.$ac_ext
11785cat >>conftest.$ac_ext <<_ACEOF
11786/* end confdefs.h. */
11787$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011788 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011789int
11790main ()
11791{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011792static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011793test_array [0] = 0
11794
11795 ;
11796 return 0;
11797}
11798_ACEOF
11799rm -f conftest.$ac_objext
11800if { (ac_try="$ac_compile"
11801case "(($ac_try" in
11802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11803 *) ac_try_echo=$ac_try;;
11804esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011806 (eval "$ac_compile") 2>conftest.er1
11807 ac_status=$?
11808 grep -v '^ *+' conftest.er1 >conftest.err
11809 rm -f conftest.er1
11810 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011812 (exit $ac_status); } && {
11813 test -z "$ac_c_werror_flag" ||
11814 test ! -s conftest.err
11815 } && test -s conftest.$ac_objext; then
11816 ac_hi=-1 ac_mid=-1
11817 while :; do
11818 cat >conftest.$ac_ext <<_ACEOF
11819/* confdefs.h. */
11820_ACEOF
11821cat confdefs.h >>conftest.$ac_ext
11822cat >>conftest.$ac_ext <<_ACEOF
11823/* end confdefs.h. */
11824$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011825 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011826int
11827main ()
11828{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011829static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011830test_array [0] = 0
11831
11832 ;
11833 return 0;
11834}
11835_ACEOF
11836rm -f conftest.$ac_objext
11837if { (ac_try="$ac_compile"
11838case "(($ac_try" in
11839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11840 *) ac_try_echo=$ac_try;;
11841esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011843 (eval "$ac_compile") 2>conftest.er1
11844 ac_status=$?
11845 grep -v '^ *+' conftest.er1 >conftest.err
11846 rm -f conftest.er1
11847 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011849 (exit $ac_status); } && {
11850 test -z "$ac_c_werror_flag" ||
11851 test ! -s conftest.err
11852 } && test -s conftest.$ac_objext; then
11853 ac_lo=$ac_mid; break
11854else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011855 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011856sed 's/^/| /' conftest.$ac_ext >&5
11857
11858 ac_hi=`expr '(' $ac_mid ')' - 1`
11859 if test $ac_mid -le $ac_hi; then
11860 ac_lo= ac_hi=
11861 break
11862 fi
11863 ac_mid=`expr 2 '*' $ac_mid`
11864fi
11865
11866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11867 done
11868else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011869 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011870sed 's/^/| /' conftest.$ac_ext >&5
11871
11872 ac_lo= ac_hi=
11873fi
11874
11875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11876fi
11877
11878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11879# Binary search between lo and hi bounds.
11880while test "x$ac_lo" != "x$ac_hi"; do
11881 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11882 cat >conftest.$ac_ext <<_ACEOF
11883/* confdefs.h. */
11884_ACEOF
11885cat confdefs.h >>conftest.$ac_ext
11886cat >>conftest.$ac_ext <<_ACEOF
11887/* end confdefs.h. */
11888$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011889 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011890int
11891main ()
11892{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011893static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011894test_array [0] = 0
11895
11896 ;
11897 return 0;
11898}
11899_ACEOF
11900rm -f conftest.$ac_objext
11901if { (ac_try="$ac_compile"
11902case "(($ac_try" in
11903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11904 *) ac_try_echo=$ac_try;;
11905esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011907 (eval "$ac_compile") 2>conftest.er1
11908 ac_status=$?
11909 grep -v '^ *+' conftest.er1 >conftest.err
11910 rm -f conftest.er1
11911 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011913 (exit $ac_status); } && {
11914 test -z "$ac_c_werror_flag" ||
11915 test ! -s conftest.err
11916 } && test -s conftest.$ac_objext; then
11917 ac_hi=$ac_mid
11918else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011919 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011920sed 's/^/| /' conftest.$ac_ext >&5
11921
11922 ac_lo=`expr '(' $ac_mid ')' + 1`
11923fi
11924
11925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11926done
11927case $ac_lo in
11928?*) ac_cv_sizeof_long_double=$ac_lo;;
11929'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011930 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011931See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011932echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011933See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011934 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011935 else
11936 ac_cv_sizeof_long_double=0
11937 fi ;;
11938esac
11939else
11940 cat >conftest.$ac_ext <<_ACEOF
11941/* confdefs.h. */
11942_ACEOF
11943cat confdefs.h >>conftest.$ac_ext
11944cat >>conftest.$ac_ext <<_ACEOF
11945/* end confdefs.h. */
11946$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011947 typedef long double ac__type_sizeof_;
11948static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11949static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011950#include <stdio.h>
11951#include <stdlib.h>
11952int
11953main ()
11954{
11955
11956 FILE *f = fopen ("conftest.val", "w");
11957 if (! f)
11958 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011959 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011960 {
11961 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011962 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011963 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011964 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011965 }
11966 else
11967 {
11968 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011969 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011970 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011971 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011972 }
11973 return ferror (f) || fclose (f) != 0;
11974
11975 ;
11976 return 0;
11977}
11978_ACEOF
11979rm -f conftest$ac_exeext
11980if { (ac_try="$ac_link"
11981case "(($ac_try" in
11982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11983 *) ac_try_echo=$ac_try;;
11984esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011986 (eval "$ac_link") 2>&5
11987 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011989 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11990 { (case "(($ac_try" in
11991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11992 *) ac_try_echo=$ac_try;;
11993esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011995 (eval "$ac_try") 2>&5
11996 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011998 (exit $ac_status); }; }; then
11999 ac_cv_sizeof_long_double=`cat conftest.val`
12000else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012001 echo "$as_me: program exited with status $ac_status" >&5
12002echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012003sed 's/^/| /' conftest.$ac_ext >&5
12004
12005( exit $ac_status )
12006if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012007 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012008See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012009echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012010See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012011 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012012 else
12013 ac_cv_sizeof_long_double=0
12014 fi
12015fi
12016rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12017fi
12018rm -f conftest.val
12019fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012020{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12021echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012022
12023
12024
12025cat >>confdefs.h <<_ACEOF
12026#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12027_ACEOF
12028
12029
12030fi
12031
12032
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012033{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12034echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012035have_c99_bool=no
12036cat >conftest.$ac_ext <<_ACEOF
12037/* confdefs.h. */
12038_ACEOF
12039cat confdefs.h >>conftest.$ac_ext
12040cat >>conftest.$ac_ext <<_ACEOF
12041/* end confdefs.h. */
12042
12043int
12044main ()
12045{
12046_Bool x; x = (_Bool)0;
12047 ;
12048 return 0;
12049}
12050_ACEOF
12051rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012052if { (ac_try="$ac_compile"
12053case "(($ac_try" in
12054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12055 *) ac_try_echo=$ac_try;;
12056esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012058 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012059 ac_status=$?
12060 grep -v '^ *+' conftest.er1 >conftest.err
12061 rm -f conftest.er1
12062 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012064 (exit $ac_status); } && {
12065 test -z "$ac_c_werror_flag" ||
12066 test ! -s conftest.err
12067 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012068
12069
12070cat >>confdefs.h <<\_ACEOF
12071#define HAVE_C99_BOOL 1
12072_ACEOF
12073
12074 have_c99_bool=yes
12075
12076else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012077 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012078sed 's/^/| /' conftest.$ac_ext >&5
12079
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012080
Thomas Woutersb2137042007-02-01 18:02:27 +000012081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012082
12083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012084{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12085echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012086if test "$have_c99_bool" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012087{ echo "$as_me:$LINENO: checking for _Bool" >&5
12088echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12089if test "${ac_cv_type__Bool+set}" = set; then
12090 echo $ECHO_N "(cached) $ECHO_C" >&6
12091else
12092 cat >conftest.$ac_ext <<_ACEOF
12093/* confdefs.h. */
12094_ACEOF
12095cat confdefs.h >>conftest.$ac_ext
12096cat >>conftest.$ac_ext <<_ACEOF
12097/* end confdefs.h. */
12098$ac_includes_default
12099typedef _Bool ac__type_new_;
12100int
12101main ()
12102{
12103if ((ac__type_new_ *) 0)
12104 return 0;
12105if (sizeof (ac__type_new_))
12106 return 0;
12107 ;
12108 return 0;
12109}
12110_ACEOF
12111rm -f conftest.$ac_objext
12112if { (ac_try="$ac_compile"
12113case "(($ac_try" in
12114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12115 *) ac_try_echo=$ac_try;;
12116esac
12117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12118 (eval "$ac_compile") 2>conftest.er1
12119 ac_status=$?
12120 grep -v '^ *+' conftest.er1 >conftest.err
12121 rm -f conftest.er1
12122 cat conftest.err >&5
12123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12124 (exit $ac_status); } && {
12125 test -z "$ac_c_werror_flag" ||
12126 test ! -s conftest.err
12127 } && test -s conftest.$ac_objext; then
12128 ac_cv_type__Bool=yes
12129else
12130 echo "$as_me: failed program was:" >&5
12131sed 's/^/| /' conftest.$ac_ext >&5
12132
12133 ac_cv_type__Bool=no
12134fi
12135
12136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12137fi
12138{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12139echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012141# The cast to long int works around a bug in the HP C Compiler
12142# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12143# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12144# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012145{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12146echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012147if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012148 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012149else
12150 if test "$cross_compiling" = yes; then
12151 # Depending upon the size, compute the lo and hi bounds.
12152cat >conftest.$ac_ext <<_ACEOF
12153/* confdefs.h. */
12154_ACEOF
12155cat confdefs.h >>conftest.$ac_ext
12156cat >>conftest.$ac_ext <<_ACEOF
12157/* end confdefs.h. */
12158$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012159 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012160int
12161main ()
12162{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012163static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012164test_array [0] = 0
12165
12166 ;
12167 return 0;
12168}
12169_ACEOF
12170rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012171if { (ac_try="$ac_compile"
12172case "(($ac_try" in
12173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12174 *) ac_try_echo=$ac_try;;
12175esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012177 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012178 ac_status=$?
12179 grep -v '^ *+' conftest.er1 >conftest.err
12180 rm -f conftest.er1
12181 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012183 (exit $ac_status); } && {
12184 test -z "$ac_c_werror_flag" ||
12185 test ! -s conftest.err
12186 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012187 ac_lo=0 ac_mid=0
12188 while :; do
12189 cat >conftest.$ac_ext <<_ACEOF
12190/* confdefs.h. */
12191_ACEOF
12192cat confdefs.h >>conftest.$ac_ext
12193cat >>conftest.$ac_ext <<_ACEOF
12194/* end confdefs.h. */
12195$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012196 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012197int
12198main ()
12199{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012200static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012201test_array [0] = 0
12202
12203 ;
12204 return 0;
12205}
12206_ACEOF
12207rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208if { (ac_try="$ac_compile"
12209case "(($ac_try" in
12210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12211 *) ac_try_echo=$ac_try;;
12212esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012214 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012215 ac_status=$?
12216 grep -v '^ *+' conftest.er1 >conftest.err
12217 rm -f conftest.er1
12218 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012220 (exit $ac_status); } && {
12221 test -z "$ac_c_werror_flag" ||
12222 test ! -s conftest.err
12223 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012224 ac_hi=$ac_mid; break
12225else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012226 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012227sed 's/^/| /' conftest.$ac_ext >&5
12228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012229 ac_lo=`expr $ac_mid + 1`
12230 if test $ac_lo -le $ac_mid; then
12231 ac_lo= ac_hi=
12232 break
12233 fi
12234 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012236
12237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012238 done
12239else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012240 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012241sed 's/^/| /' conftest.$ac_ext >&5
12242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012243 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012244/* confdefs.h. */
12245_ACEOF
12246cat confdefs.h >>conftest.$ac_ext
12247cat >>conftest.$ac_ext <<_ACEOF
12248/* end confdefs.h. */
12249$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012250 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012251int
12252main ()
12253{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012254static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012255test_array [0] = 0
12256
12257 ;
12258 return 0;
12259}
12260_ACEOF
12261rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012262if { (ac_try="$ac_compile"
12263case "(($ac_try" in
12264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12265 *) ac_try_echo=$ac_try;;
12266esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012268 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012269 ac_status=$?
12270 grep -v '^ *+' conftest.er1 >conftest.err
12271 rm -f conftest.er1
12272 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012274 (exit $ac_status); } && {
12275 test -z "$ac_c_werror_flag" ||
12276 test ! -s conftest.err
12277 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012278 ac_hi=-1 ac_mid=-1
12279 while :; do
12280 cat >conftest.$ac_ext <<_ACEOF
12281/* confdefs.h. */
12282_ACEOF
12283cat confdefs.h >>conftest.$ac_ext
12284cat >>conftest.$ac_ext <<_ACEOF
12285/* end confdefs.h. */
12286$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012287 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012288int
12289main ()
12290{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012291static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012292test_array [0] = 0
12293
12294 ;
12295 return 0;
12296}
12297_ACEOF
12298rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012299if { (ac_try="$ac_compile"
12300case "(($ac_try" in
12301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12302 *) ac_try_echo=$ac_try;;
12303esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012305 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012306 ac_status=$?
12307 grep -v '^ *+' conftest.er1 >conftest.err
12308 rm -f conftest.er1
12309 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012311 (exit $ac_status); } && {
12312 test -z "$ac_c_werror_flag" ||
12313 test ! -s conftest.err
12314 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012315 ac_lo=$ac_mid; break
12316else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012317 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012318sed 's/^/| /' conftest.$ac_ext >&5
12319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012320 ac_hi=`expr '(' $ac_mid ')' - 1`
12321 if test $ac_mid -le $ac_hi; then
12322 ac_lo= ac_hi=
12323 break
12324 fi
12325 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012327
12328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012329 done
12330else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012331 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012332sed 's/^/| /' conftest.$ac_ext >&5
12333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012334 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012336
12337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012339
12340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012341# Binary search between lo and hi bounds.
12342while test "x$ac_lo" != "x$ac_hi"; do
12343 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12344 cat >conftest.$ac_ext <<_ACEOF
12345/* confdefs.h. */
12346_ACEOF
12347cat confdefs.h >>conftest.$ac_ext
12348cat >>conftest.$ac_ext <<_ACEOF
12349/* end confdefs.h. */
12350$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012351 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012352int
12353main ()
12354{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012355static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012356test_array [0] = 0
12357
12358 ;
12359 return 0;
12360}
12361_ACEOF
12362rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012363if { (ac_try="$ac_compile"
12364case "(($ac_try" in
12365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12366 *) ac_try_echo=$ac_try;;
12367esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012370 ac_status=$?
12371 grep -v '^ *+' conftest.er1 >conftest.err
12372 rm -f conftest.er1
12373 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012375 (exit $ac_status); } && {
12376 test -z "$ac_c_werror_flag" ||
12377 test ! -s conftest.err
12378 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012379 ac_hi=$ac_mid
12380else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012381 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012382sed 's/^/| /' conftest.$ac_ext >&5
12383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012384 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386
12387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012388done
12389case $ac_lo in
12390?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012391'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012392 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012393See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012394echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012395See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012396 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012397 else
12398 ac_cv_sizeof__Bool=0
12399 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012400esac
12401else
12402 cat >conftest.$ac_ext <<_ACEOF
12403/* confdefs.h. */
12404_ACEOF
12405cat confdefs.h >>conftest.$ac_ext
12406cat >>conftest.$ac_ext <<_ACEOF
12407/* end confdefs.h. */
12408$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012409 typedef _Bool ac__type_sizeof_;
12410static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12411static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012412#include <stdio.h>
12413#include <stdlib.h>
12414int
12415main ()
12416{
12417
12418 FILE *f = fopen ("conftest.val", "w");
12419 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012420 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012421 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012422 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012423 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012424 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012425 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012426 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012427 }
12428 else
12429 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012431 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012432 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012433 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012434 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012435 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012436
12437 ;
12438 return 0;
12439}
12440_ACEOF
12441rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012442if { (ac_try="$ac_link"
12443case "(($ac_try" in
12444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12445 *) ac_try_echo=$ac_try;;
12446esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012449 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012451 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012452 { (case "(($ac_try" in
12453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12454 *) ac_try_echo=$ac_try;;
12455esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012457 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012458 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012460 (exit $ac_status); }; }; then
12461 ac_cv_sizeof__Bool=`cat conftest.val`
12462else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012463 echo "$as_me: program exited with status $ac_status" >&5
12464echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012465sed 's/^/| /' conftest.$ac_ext >&5
12466
12467( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012468if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012469 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012470See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012471echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012472See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012473 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012474 else
12475 ac_cv_sizeof__Bool=0
12476 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012478rm -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 +000012479fi
12480rm -f conftest.val
12481fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012482{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12483echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012484
12485
12486
Thomas Woutersb2137042007-02-01 18:02:27 +000012487cat >>confdefs.h <<_ACEOF
12488#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12489_ACEOF
12490
12491
12492fi
12493
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012494{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12495echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012496if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012497 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012498else
12499 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012500/* confdefs.h. */
12501_ACEOF
12502cat confdefs.h >>conftest.$ac_ext
12503cat >>conftest.$ac_ext <<_ACEOF
12504/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012505#ifdef HAVE_STDINT_H
12506 #include <stdint.h>
12507 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012508
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012509typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012510int
12511main ()
12512{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012513if ((ac__type_new_ *) 0)
12514 return 0;
12515if (sizeof (ac__type_new_))
12516 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012517 ;
12518 return 0;
12519}
12520_ACEOF
12521rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012522if { (ac_try="$ac_compile"
12523case "(($ac_try" in
12524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12525 *) ac_try_echo=$ac_try;;
12526esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012528 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012530 grep -v '^ *+' conftest.er1 >conftest.err
12531 rm -f conftest.er1
12532 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534 (exit $ac_status); } && {
12535 test -z "$ac_c_werror_flag" ||
12536 test ! -s conftest.err
12537 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012538 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012539else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012541sed 's/^/| /' conftest.$ac_ext >&5
12542
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012543 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012545
12546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012547fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012548{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12549echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12550if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012551
12552cat >>confdefs.h <<_ACEOF
12553#define HAVE_UINTPTR_T 1
12554_ACEOF
12555
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012556{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12557echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12558if test "${ac_cv_type_uintptr_t+set}" = set; then
12559 echo $ECHO_N "(cached) $ECHO_C" >&6
12560else
12561 cat >conftest.$ac_ext <<_ACEOF
12562/* confdefs.h. */
12563_ACEOF
12564cat confdefs.h >>conftest.$ac_ext
12565cat >>conftest.$ac_ext <<_ACEOF
12566/* end confdefs.h. */
12567$ac_includes_default
12568typedef uintptr_t ac__type_new_;
12569int
12570main ()
12571{
12572if ((ac__type_new_ *) 0)
12573 return 0;
12574if (sizeof (ac__type_new_))
12575 return 0;
12576 ;
12577 return 0;
12578}
12579_ACEOF
12580rm -f conftest.$ac_objext
12581if { (ac_try="$ac_compile"
12582case "(($ac_try" in
12583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12584 *) ac_try_echo=$ac_try;;
12585esac
12586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12587 (eval "$ac_compile") 2>conftest.er1
12588 ac_status=$?
12589 grep -v '^ *+' conftest.er1 >conftest.err
12590 rm -f conftest.er1
12591 cat conftest.err >&5
12592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12593 (exit $ac_status); } && {
12594 test -z "$ac_c_werror_flag" ||
12595 test ! -s conftest.err
12596 } && test -s conftest.$ac_objext; then
12597 ac_cv_type_uintptr_t=yes
12598else
12599 echo "$as_me: failed program was:" >&5
12600sed 's/^/| /' conftest.$ac_ext >&5
12601
12602 ac_cv_type_uintptr_t=no
12603fi
12604
12605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12606fi
12607{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12608echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012610# The cast to long int works around a bug in the HP C Compiler
12611# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12612# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12613# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012614{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12615echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012616if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012617 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012618else
Martin v. Löwis11437992002-04-12 09:54:03 +000012619 if test "$cross_compiling" = yes; then
12620 # Depending upon the size, compute the lo and hi bounds.
12621cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012622/* confdefs.h. */
12623_ACEOF
12624cat confdefs.h >>conftest.$ac_ext
12625cat >>conftest.$ac_ext <<_ACEOF
12626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012627$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012628 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012629int
12630main ()
12631{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012632static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012633test_array [0] = 0
12634
12635 ;
12636 return 0;
12637}
12638_ACEOF
12639rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012640if { (ac_try="$ac_compile"
12641case "(($ac_try" in
12642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12643 *) ac_try_echo=$ac_try;;
12644esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012646 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012648 grep -v '^ *+' conftest.er1 >conftest.err
12649 rm -f conftest.er1
12650 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012652 (exit $ac_status); } && {
12653 test -z "$ac_c_werror_flag" ||
12654 test ! -s conftest.err
12655 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 ac_lo=0 ac_mid=0
12657 while :; do
12658 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012659/* confdefs.h. */
12660_ACEOF
12661cat confdefs.h >>conftest.$ac_ext
12662cat >>conftest.$ac_ext <<_ACEOF
12663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012664$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012665 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012666int
12667main ()
12668{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012669static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012670test_array [0] = 0
12671
12672 ;
12673 return 0;
12674}
12675_ACEOF
12676rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012677if { (ac_try="$ac_compile"
12678case "(($ac_try" in
12679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12680 *) ac_try_echo=$ac_try;;
12681esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012683 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012685 grep -v '^ *+' conftest.er1 >conftest.err
12686 rm -f conftest.er1
12687 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012689 (exit $ac_status); } && {
12690 test -z "$ac_c_werror_flag" ||
12691 test ! -s conftest.err
12692 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012693 ac_hi=$ac_mid; break
12694else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012696sed 's/^/| /' conftest.$ac_ext >&5
12697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012698 ac_lo=`expr $ac_mid + 1`
12699 if test $ac_lo -le $ac_mid; then
12700 ac_lo= ac_hi=
12701 break
12702 fi
12703 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012705
12706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012707 done
12708else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012710sed 's/^/| /' conftest.$ac_ext >&5
12711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012713/* confdefs.h. */
12714_ACEOF
12715cat confdefs.h >>conftest.$ac_ext
12716cat >>conftest.$ac_ext <<_ACEOF
12717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012718$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012719 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012720int
12721main ()
12722{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012723static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012724test_array [0] = 0
12725
12726 ;
12727 return 0;
12728}
12729_ACEOF
12730rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012731if { (ac_try="$ac_compile"
12732case "(($ac_try" in
12733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12734 *) ac_try_echo=$ac_try;;
12735esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012737 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012739 grep -v '^ *+' conftest.er1 >conftest.err
12740 rm -f conftest.er1
12741 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012743 (exit $ac_status); } && {
12744 test -z "$ac_c_werror_flag" ||
12745 test ! -s conftest.err
12746 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 ac_hi=-1 ac_mid=-1
12748 while :; do
12749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012750/* confdefs.h. */
12751_ACEOF
12752cat confdefs.h >>conftest.$ac_ext
12753cat >>conftest.$ac_ext <<_ACEOF
12754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012755$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012756 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012757int
12758main ()
12759{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012760static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012761test_array [0] = 0
12762
12763 ;
12764 return 0;
12765}
12766_ACEOF
12767rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012768if { (ac_try="$ac_compile"
12769case "(($ac_try" in
12770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12771 *) ac_try_echo=$ac_try;;
12772esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012774 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012775 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012776 grep -v '^ *+' conftest.er1 >conftest.err
12777 rm -f conftest.er1
12778 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012780 (exit $ac_status); } && {
12781 test -z "$ac_c_werror_flag" ||
12782 test ! -s conftest.err
12783 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012784 ac_lo=$ac_mid; break
12785else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012787sed 's/^/| /' conftest.$ac_ext >&5
12788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012789 ac_hi=`expr '(' $ac_mid ')' - 1`
12790 if test $ac_mid -le $ac_hi; then
12791 ac_lo= ac_hi=
12792 break
12793 fi
12794 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012796
12797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012798 done
12799else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012800 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012801sed 's/^/| /' conftest.$ac_ext >&5
12802
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012803 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012805
12806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012808
12809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012810# Binary search between lo and hi bounds.
12811while test "x$ac_lo" != "x$ac_hi"; do
12812 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012814/* confdefs.h. */
12815_ACEOF
12816cat confdefs.h >>conftest.$ac_ext
12817cat >>conftest.$ac_ext <<_ACEOF
12818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012819$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012820 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012821int
12822main ()
12823{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012824static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012825test_array [0] = 0
12826
12827 ;
12828 return 0;
12829}
12830_ACEOF
12831rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012832if { (ac_try="$ac_compile"
12833case "(($ac_try" in
12834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12835 *) ac_try_echo=$ac_try;;
12836esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012838 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012840 grep -v '^ *+' conftest.er1 >conftest.err
12841 rm -f conftest.er1
12842 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012844 (exit $ac_status); } && {
12845 test -z "$ac_c_werror_flag" ||
12846 test ! -s conftest.err
12847 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012848 ac_hi=$ac_mid
12849else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012851sed 's/^/| /' conftest.$ac_ext >&5
12852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012853 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012855
12856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012857done
12858case $ac_lo in
12859?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012860'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012861 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012862See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012863echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012864See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012865 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012866 else
12867 ac_cv_sizeof_uintptr_t=0
12868 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012869esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012870else
Martin v. Löwis11437992002-04-12 09:54:03 +000012871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012872/* confdefs.h. */
12873_ACEOF
12874cat confdefs.h >>conftest.$ac_ext
12875cat >>conftest.$ac_ext <<_ACEOF
12876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012877$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012878 typedef uintptr_t ac__type_sizeof_;
12879static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12880static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012881#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012882#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012883int
12884main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012885{
Martin v. Löwis11437992002-04-12 09:54:03 +000012886
12887 FILE *f = fopen ("conftest.val", "w");
12888 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012889 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012890 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012892 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012893 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012894 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012895 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 }
12897 else
12898 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012900 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012901 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012902 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012903 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012904 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012905
12906 ;
12907 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012908}
Martin v. Löwis11437992002-04-12 09:54:03 +000012909_ACEOF
12910rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911if { (ac_try="$ac_link"
12912case "(($ac_try" in
12913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12914 *) ac_try_echo=$ac_try;;
12915esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012918 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012920 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012921 { (case "(($ac_try" in
12922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12923 *) ac_try_echo=$ac_try;;
12924esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012926 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012927 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012929 (exit $ac_status); }; }; then
12930 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012931else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012932 echo "$as_me: program exited with status $ac_status" >&5
12933echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012934sed 's/^/| /' conftest.$ac_ext >&5
12935
Martin v. Löwis11437992002-04-12 09:54:03 +000012936( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012937if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012938 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012939See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012940echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012941See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012942 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943 else
12944 ac_cv_sizeof_uintptr_t=0
12945 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012947rm -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 +000012948fi
12949rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012950fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012951{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12952echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012953
12954
12955
Martin v. Löwis11437992002-04-12 09:54:03 +000012956cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012957#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012958_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012959
Michael W. Hudson54241132001-12-07 15:38:26 +000012960
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012961fi
12962
Thomas Wouters89f507f2006-12-13 04:49:30 +000012963
12964
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012965# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012966{ echo "$as_me:$LINENO: checking size of off_t" >&5
12967echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012968if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012969 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012970else
12971 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012972 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012973else
Martin v. Löwis11437992002-04-12 09:54:03 +000012974 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012975/* confdefs.h. */
12976_ACEOF
12977cat confdefs.h >>conftest.$ac_ext
12978cat >>conftest.$ac_ext <<_ACEOF
12979/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012980#include <stdio.h>
12981#include <sys/types.h>
12982main()
12983{
12984 FILE *f=fopen("conftestval", "w");
12985 if (!f) exit(1);
12986 fprintf(f, "%d\n", sizeof(off_t));
12987 exit(0);
12988}
Martin v. Löwis11437992002-04-12 09:54:03 +000012989_ACEOF
12990rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012991if { (ac_try="$ac_link"
12992case "(($ac_try" in
12993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12994 *) ac_try_echo=$ac_try;;
12995esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012997 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012998 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013000 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013001 { (case "(($ac_try" in
13002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13003 *) ac_try_echo=$ac_try;;
13004esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013006 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013007 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013009 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013010 ac_cv_sizeof_off_t=`cat conftestval`
13011else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013012 echo "$as_me: program exited with status $ac_status" >&5
13013echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013014sed 's/^/| /' conftest.$ac_ext >&5
13015
Martin v. Löwis11437992002-04-12 09:54:03 +000013016( exit $ac_status )
13017ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013019rm -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 +000013020fi
13021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013022
13023
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013024fi
13025
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013026{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13027echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013028
13029cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013030#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013031_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013032
Michael W. Hudson54241132001-12-07 15:38:26 +000013033
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013034{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13035echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013036if test "$have_long_long" = yes
13037then
13038if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013039 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013040
Martin v. Löwis11437992002-04-12 09:54:03 +000013041cat >>confdefs.h <<\_ACEOF
13042#define HAVE_LARGEFILE_SUPPORT 1
13043_ACEOF
13044
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013045 { echo "$as_me:$LINENO: result: yes" >&5
13046echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013047else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013048 { echo "$as_me:$LINENO: result: no" >&5
13049echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013050fi
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013051else
13052 { echo "$as_me:$LINENO: result: no" >&5
13053echo "${ECHO_T}no" >&6; }
13054fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013055
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013056# AC_CHECK_SIZEOF() doesn't include <time.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013057{ echo "$as_me:$LINENO: checking size of time_t" >&5
13058echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013059if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013060 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013061else
13062 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013063 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013064else
Martin v. Löwis11437992002-04-12 09:54:03 +000013065 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013066/* confdefs.h. */
13067_ACEOF
13068cat confdefs.h >>conftest.$ac_ext
13069cat >>conftest.$ac_ext <<_ACEOF
13070/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013071#include <stdio.h>
13072#include <time.h>
13073main()
13074{
13075 FILE *f=fopen("conftestval", "w");
13076 if (!f) exit(1);
13077 fprintf(f, "%d\n", sizeof(time_t));
13078 exit(0);
13079}
Martin v. Löwis11437992002-04-12 09:54:03 +000013080_ACEOF
13081rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013082if { (ac_try="$ac_link"
13083case "(($ac_try" in
13084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13085 *) ac_try_echo=$ac_try;;
13086esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013088 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013089 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013091 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013092 { (case "(($ac_try" in
13093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13094 *) ac_try_echo=$ac_try;;
13095esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013097 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013098 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013100 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013101 ac_cv_sizeof_time_t=`cat conftestval`
13102else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013103 echo "$as_me: program exited with status $ac_status" >&5
13104echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013105sed 's/^/| /' conftest.$ac_ext >&5
13106
Martin v. Löwis11437992002-04-12 09:54:03 +000013107( exit $ac_status )
13108ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013110rm -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 +000013111fi
13112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013113
13114
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013115fi
13116
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013117{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13118echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013119
13120cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013121#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013122_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013123
Michael W. Hudson54241132001-12-07 15:38:26 +000013124
13125
Trent Mick635f6fb2000-08-23 21:33:05 +000013126# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013127ac_save_cc="$CC"
13128if test "$ac_cv_kpthread" = "yes"
13129then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013130elif test "$ac_cv_kthread" = "yes"
13131then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013132elif test "$ac_cv_pthread" = "yes"
13133then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013134fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013135{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13136echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013137have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013138cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013139/* confdefs.h. */
13140_ACEOF
13141cat confdefs.h >>conftest.$ac_ext
13142cat >>conftest.$ac_ext <<_ACEOF
13143/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013144#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013145int
13146main ()
13147{
Guido van Rossum12580492000-09-24 16:47:19 +000013148pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013149 ;
13150 return 0;
13151}
13152_ACEOF
13153rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013154if { (ac_try="$ac_compile"
13155case "(($ac_try" in
13156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13157 *) ac_try_echo=$ac_try;;
13158esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013160 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013162 grep -v '^ *+' conftest.er1 >conftest.err
13163 rm -f conftest.er1
13164 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013166 (exit $ac_status); } && {
13167 test -z "$ac_c_werror_flag" ||
13168 test ! -s conftest.err
13169 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013170 have_pthread_t=yes
13171else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013173sed 's/^/| /' conftest.$ac_ext >&5
13174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013175
Trent Mick635f6fb2000-08-23 21:33:05 +000013176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013177
13178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013179{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13180echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013181if test "$have_pthread_t" = yes ; then
13182 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013183 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
13184echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013185 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013186 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013187else
13188 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013189 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013190else
Martin v. Löwis11437992002-04-12 09:54:03 +000013191 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013192/* confdefs.h. */
13193_ACEOF
13194cat confdefs.h >>conftest.$ac_ext
13195cat >>conftest.$ac_ext <<_ACEOF
13196/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013197#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013198#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013199 main()
13200 {
13201 FILE *f=fopen("conftestval", "w");
13202 if (!f) exit(1);
13203 fprintf(f, "%d\n", sizeof(pthread_t));
13204 exit(0);
13205 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013206_ACEOF
13207rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013208if { (ac_try="$ac_link"
13209case "(($ac_try" in
13210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13211 *) ac_try_echo=$ac_try;;
13212esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013214 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013215 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013217 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013218 { (case "(($ac_try" in
13219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13220 *) ac_try_echo=$ac_try;;
13221esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013223 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013224 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013226 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013227 ac_cv_sizeof_pthread_t=`cat conftestval`
13228else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013229 echo "$as_me: program exited with status $ac_status" >&5
13230echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013231sed 's/^/| /' conftest.$ac_ext >&5
13232
Martin v. Löwis11437992002-04-12 09:54:03 +000013233( exit $ac_status )
13234ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013236rm -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 +000013237fi
13238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013239
13240
Trent Mick635f6fb2000-08-23 21:33:05 +000013241fi
13242
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013243 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13244echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013245
13246cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013247#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013248_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013249
13250fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013251CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013252
Michael W. Hudson54241132001-12-07 15:38:26 +000013253
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013254
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013255
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013256case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013257 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013258 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13259 ;;
13260 Darwin/*)
13261 OTHER_LIBTOOL_OPT=""
13262 ;;
13263esac
13264
13265
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013266ARCH_RUN_32BIT=""
13267
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013268case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013269 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013270 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13271 if test "${enable_universalsdk}"; then
13272 :
13273 else
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013274 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013275 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013276 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013277 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013278 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013279 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
13280 if test ${gcc_version} '<' 4.0
13281 then
13282 LIBTOOL_CRUFT="-lcc_dynamic"
13283 else
13284 LIBTOOL_CRUFT=""
13285 fi
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013286 if test "$cross_compiling" = yes; then
Ronald Oussoren856624d2009-09-08 07:13:53 +000013287 ac_osx_32bit=yes
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013288else
13289 cat >conftest.$ac_ext <<_ACEOF
13290/* confdefs.h. */
13291_ACEOF
13292cat confdefs.h >>conftest.$ac_ext
13293cat >>conftest.$ac_ext <<_ACEOF
13294/* end confdefs.h. */
Ronald Oussoren856624d2009-09-08 07:13:53 +000013295
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013296 #include <unistd.h>
13297 int main(int argc, char*argv[])
13298 {
13299 if (sizeof(long) == 4) {
13300 return 0;
13301 } else {
13302 return 1;
13303 }
Ronald Oussoren856624d2009-09-08 07:13:53 +000013304 }
13305
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013306_ACEOF
13307rm -f conftest$ac_exeext
13308if { (ac_try="$ac_link"
13309case "(($ac_try" in
13310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13311 *) ac_try_echo=$ac_try;;
13312esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013314 (eval "$ac_link") 2>&5
13315 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013317 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13318 { (case "(($ac_try" in
13319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13320 *) ac_try_echo=$ac_try;;
13321esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013323 (eval "$ac_try") 2>&5
13324 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013326 (exit $ac_status); }; }; then
13327 ac_osx_32bit=yes
13328else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013329 echo "$as_me: program exited with status $ac_status" >&5
13330echo "$as_me: failed program was:" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013331sed 's/^/| /' conftest.$ac_ext >&5
13332
13333( exit $ac_status )
13334ac_osx_32bit=no
13335fi
13336rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13337fi
13338
13339
13340
13341 if test "${ac_osx_32bit}" = "yes"; then
13342 case `arch` in
13343 i386)
13344 MACOSX_DEFAULT_ARCH="i386"
13345 ;;
13346 ppc)
13347 MACOSX_DEFAULT_ARCH="ppc"
13348 ;;
13349 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013350 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13351echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013352 { (exit 1); exit 1; }; }
13353 ;;
13354 esac
13355 else
13356 case `arch` in
13357 i386)
13358 MACOSX_DEFAULT_ARCH="x86_64"
13359 ;;
13360 ppc)
13361 MACOSX_DEFAULT_ARCH="ppc64"
13362 ;;
13363 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013364 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13365echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013366 { (exit 1); exit 1; }; }
13367 ;;
13368 esac
13369
13370 #ARCH_RUN_32BIT="true"
13371 fi
13372
13373 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000013374 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013375 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013376esac
13377
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013378{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13379echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013380if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013381then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013382 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013383 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013384 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013385
Martin v. Löwis11437992002-04-12 09:54:03 +000013386cat >>confdefs.h <<\_ACEOF
13387#define WITH_NEXT_FRAMEWORK 1
13388_ACEOF
13389
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013390 { echo "$as_me:$LINENO: result: yes" >&5
13391echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000013392 if test $enable_shared = "yes"
13393 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013394 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
13395echo "$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 +000013396 { (exit 1); exit 1; }; }
13397 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013398else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013399 { echo "$as_me:$LINENO: result: no" >&5
13400echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013401fi
13402
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013403{ echo "$as_me:$LINENO: checking for dyld" >&5
13404echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013405case $ac_sys_system/$ac_sys_release in
13406 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013407
Martin v. Löwis11437992002-04-12 09:54:03 +000013408cat >>confdefs.h <<\_ACEOF
13409#define WITH_DYLD 1
13410_ACEOF
13411
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013412 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13413echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013414 ;;
13415 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013416 { echo "$as_me:$LINENO: result: no" >&5
13417echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013418 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013419esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013420
Guido van Rossum0a516c91994-09-12 10:58:40 +000013421# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013422
Michael W. Hudson54241132001-12-07 15:38:26 +000013423
13424
13425
13426
Guido van Rossum0a516c91994-09-12 10:58:40 +000013427# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013428# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013429{ echo "$as_me:$LINENO: checking SO" >&5
13430echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013431if test -z "$SO"
13432then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013433 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000013434 hp*|HP*)
13435 case `uname -m` in
13436 ia64) SO=.so;;
13437 *) SO=.sl;;
13438 esac
13439 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013440 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013441 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013442 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013443else
13444 # this might also be a termcap variable, see #610332
13445 echo
13446 echo '====================================================================='
13447 echo '+ +'
13448 echo '+ WARNING: You have set SO in your environment. +'
13449 echo '+ Do you really mean to change the extension for shared libraries? +'
13450 echo '+ Continuing in 10 seconds to let you to ponder. +'
13451 echo '+ +'
13452 echo '====================================================================='
13453 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013454fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013455{ echo "$as_me:$LINENO: result: $SO" >&5
13456echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000013457
Georg Brandlb1441c72009-01-03 22:33:39 +000013458
Thomas Wouters477c8d52006-05-27 19:21:47 +000013459cat >>confdefs.h <<_ACEOF
13460#define SHLIB_EXT "$SO"
13461_ACEOF
13462
Guido van Rossum0a516c91994-09-12 10:58:40 +000013463# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013464# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013465# (Shared libraries in this instance are shared modules to be loaded into
13466# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013467{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13468echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013469if test -z "$LDSHARED"
13470then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013471 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013472 AIX*)
13473 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013474 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013475 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013476 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013477 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013478 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000013479 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013480 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013481 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000013482 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000013483 hp*|HP*)
13484 if test "$GCC" = "yes"
13485 then LDSHARED='$(CC) -shared'
13486 else LDSHARED='ld -b';
13487 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013488 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013489 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013490 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13491 if test "$enable_framework" ; then
13492 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013493 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13494 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013495 else
13496 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013497 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013498 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013499 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013500 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13501 if test "$enable_framework" ; then
13502 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013503 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13504 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013505 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013506 # No framework, use the Python app as bundle-loader
13507 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013508 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013509 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013510 Darwin/*)
13511 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13512 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000013513
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013514 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013515 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013516 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013517 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013518 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013519 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13520 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013521 else
13522 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13523 if test "$enable_framework" ; then
13524 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013525 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13526 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013527 else
13528 # No framework, use the Python app as bundle-loader
13529 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13530 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13531 fi
13532 fi
13533 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013534 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013535 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013536 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013537 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013538 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013539 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013540 else
13541 LDSHARED="ld -Bshareable ${LDFLAGS}"
13542 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013543 OpenBSD*)
13544 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13545 then
13546 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13547 else
13548 case `uname -r` in
13549 [01].* | 2.[0-7] | 2.[0-7].*)
13550 LDSHARED="ld -Bshareable ${LDFLAGS}"
13551 ;;
13552 *)
13553 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13554 ;;
13555 esac
13556 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013557 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013558 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013559 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013560 then LDSHARED='$(CC) -shared'
13561 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013562 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013563 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013564 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013565 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013566 *) LDSHARED="ld";;
13567 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013568fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013569{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13570echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013571BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013572# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013573# library (module) -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013574{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13575echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013576if test -z "$CCSHARED"
13577then
Guido van Rossum07397971997-04-29 21:49:50 +000013578 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013579 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013580 then CCSHARED="-fPIC";
13581 elif test `uname -p` = sparc;
13582 then CCSHARED="-xcode=pic32";
13583 else CCSHARED="-Kpic";
13584 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013585 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013586 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013587 else CCSHARED="+z";
13588 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013589 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013590 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013591 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013592 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013593 if test "$GCC" = "yes"
13594 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013595 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013596 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013597 SCO_SV*)
13598 if test "$GCC" = "yes"
13599 then CCSHARED="-fPIC"
13600 else CCSHARED="-Kpic -belf"
13601 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013602 IRIX*/6*) case $CC in
13603 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013604 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013605 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013606 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013607 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013608fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013609{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13610echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013611# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013612# the python executable -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013613{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13614echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013615if test -z "$LINKFORSHARED"
13616then
Guido van Rossum07397971997-04-29 21:49:50 +000013617 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013618 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013619 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013620 LINKFORSHARED="-Wl,-E -Wl,+s";;
13621# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013622 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013623 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013624 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013625 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000013626 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000013627 if test "$enable_framework"
13628 then
Jack Jansenda49e192005-01-07 13:08:22 +000013629 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013630 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013631 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013632 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013633 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013634 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013635 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013636 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13637 then
13638 LINKFORSHARED="-Wl,--export-dynamic"
13639 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013640 SunOS/5*) case $CC in
13641 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013642 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013643 then
13644 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013645 fi;;
13646 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013647 CYGWIN*)
13648 if test $enable_shared = "no"
13649 then
13650 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13651 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013652 QNX*)
13653 # -Wl,-E causes the symbols to be added to the dynamic
13654 # symbol table so that they can be found when a module
13655 # is loaded. -N 2048K causes the stack size to be set
13656 # to 2048 kilobytes so that the stack doesn't overflow
13657 # when running test_compile.py.
13658 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013659 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013660fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013661{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13662echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013663
Michael W. Hudson54241132001-12-07 15:38:26 +000013664
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013665
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013666{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13667echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013668if test ! "$LIBRARY" = "$LDLIBRARY"
13669then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013670 case $ac_sys_system in
13671 CYGWIN*)
13672 # Cygwin needs CCSHARED when building extension DLLs
13673 # but not when building the interpreter DLL.
13674 CFLAGSFORSHARED='';;
13675 *)
13676 CFLAGSFORSHARED='$(CCSHARED)'
13677 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013678fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013679{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13680echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013681
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013682# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13683# library (with --enable-shared).
13684# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013685# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13686# if it is not required, since it creates a dependency of the shared library
13687# to LIBS. This, in turn, means that applications linking the shared libpython
13688# don't need to link LIBS explicitly. The default should be only changed
13689# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013690
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013691{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13692echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013693case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013694 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013695 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013696esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013697{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13698echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013699
13700
Guido van Rossum627b2d71993-12-24 10:39:16 +000013701# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013702
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013703{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13704echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013705if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013706 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013707else
Martin v. Löwis11437992002-04-12 09:54:03 +000013708 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013709LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013710cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013711/* confdefs.h. */
13712_ACEOF
13713cat confdefs.h >>conftest.$ac_ext
13714cat >>conftest.$ac_ext <<_ACEOF
13715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013717/* Override any GCC internal prototype to avoid an error.
13718 Use char because int might match the return type of a GCC
13719 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013720#ifdef __cplusplus
13721extern "C"
13722#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013723char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013724int
13725main ()
13726{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013727return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013728 ;
13729 return 0;
13730}
13731_ACEOF
13732rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013733if { (ac_try="$ac_link"
13734case "(($ac_try" in
13735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13736 *) ac_try_echo=$ac_try;;
13737esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013739 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013741 grep -v '^ *+' conftest.er1 >conftest.err
13742 rm -f conftest.er1
13743 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013745 (exit $ac_status); } && {
13746 test -z "$ac_c_werror_flag" ||
13747 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013748 } && test -s conftest$ac_exeext &&
13749 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013750 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013751else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013753sed 's/^/| /' conftest.$ac_ext >&5
13754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013755 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013757
13758rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013759 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013760LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013761fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013762{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13763echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
13764if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013765 cat >>confdefs.h <<_ACEOF
13766#define HAVE_LIBDL 1
13767_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013768
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013769 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013770
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013771fi
13772 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013773
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013774{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13775echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013776if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013777 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013778else
Martin v. Löwis11437992002-04-12 09:54:03 +000013779 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013780LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013781cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013782/* confdefs.h. */
13783_ACEOF
13784cat confdefs.h >>conftest.$ac_ext
13785cat >>conftest.$ac_ext <<_ACEOF
13786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013788/* Override any GCC internal prototype to avoid an error.
13789 Use char because int might match the return type of a GCC
13790 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013791#ifdef __cplusplus
13792extern "C"
13793#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013794char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013795int
13796main ()
13797{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013799 ;
13800 return 0;
13801}
13802_ACEOF
13803rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013804if { (ac_try="$ac_link"
13805case "(($ac_try" in
13806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13807 *) ac_try_echo=$ac_try;;
13808esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013810 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013812 grep -v '^ *+' conftest.er1 >conftest.err
13813 rm -f conftest.er1
13814 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013816 (exit $ac_status); } && {
13817 test -z "$ac_c_werror_flag" ||
13818 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013819 } && test -s conftest$ac_exeext &&
13820 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013821 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013822else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013824sed 's/^/| /' conftest.$ac_ext >&5
13825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013826 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013828
13829rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013830 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013831LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013832fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013833{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13834echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
13835if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013836 cat >>confdefs.h <<_ACEOF
13837#define HAVE_LIBDLD 1
13838_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013839
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013840 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013841
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013842fi
13843 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013844
Georg Brandlb1441c72009-01-03 22:33:39 +000013845# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013846if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013847 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13848echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013849if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013850 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013851else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013852 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013853cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013854/* confdefs.h. */
13855_ACEOF
13856cat confdefs.h >>conftest.$ac_ext
13857cat >>conftest.$ac_ext <<_ACEOF
13858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013860/* Override any GCC internal prototype to avoid an error.
13861 Use char because int might match the return type of a GCC
13862 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013863#ifdef __cplusplus
13864extern "C"
13865#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013866char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013867int
13868main ()
13869{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013870return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013871 ;
13872 return 0;
13873}
13874_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013875for ac_lib in '' pthread rt posix4; do
13876 if test -z "$ac_lib"; then
13877 ac_res="none required"
13878 else
13879 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013880 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013881 fi
13882 rm -f conftest.$ac_objext conftest$ac_exeext
13883if { (ac_try="$ac_link"
13884case "(($ac_try" in
13885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13886 *) ac_try_echo=$ac_try;;
13887esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013889 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013890 ac_status=$?
13891 grep -v '^ *+' conftest.er1 >conftest.err
13892 rm -f conftest.er1
13893 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013895 (exit $ac_status); } && {
13896 test -z "$ac_c_werror_flag" ||
13897 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013898 } && test -s conftest$ac_exeext &&
13899 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000013901else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013902 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013903sed 's/^/| /' conftest.$ac_ext >&5
13904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013905
Thomas Wouters477c8d52006-05-27 19:21:47 +000013906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907
13908rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13909 conftest$ac_exeext
13910 if test "${ac_cv_search_sem_init+set}" = set; then
13911 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013913done
13914if test "${ac_cv_search_sem_init+set}" = set; then
13915 :
13916else
13917 ac_cv_search_sem_init=no
13918fi
13919rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013920LIBS=$ac_func_search_save_LIBS
13921fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013922{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13923echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013924ac_res=$ac_cv_search_sem_init
13925if test "$ac_res" != no; then
13926 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013927
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013928fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013929 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013930 # posix4 on Solaris 2.6
13931 # pthread (first!) on Linux
13932fi
13933
Martin v. Löwis19d17342003-06-14 21:03:05 +000013934# check if we need libintl for locale functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013935{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13936echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013937if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013938 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000013939else
13940 ac_check_lib_save_LIBS=$LIBS
13941LIBS="-lintl $LIBS"
13942cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013943/* confdefs.h. */
13944_ACEOF
13945cat confdefs.h >>conftest.$ac_ext
13946cat >>conftest.$ac_ext <<_ACEOF
13947/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013949/* Override any GCC internal prototype to avoid an error.
13950 Use char because int might match the return type of a GCC
13951 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013952#ifdef __cplusplus
13953extern "C"
13954#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013955char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013956int
13957main ()
13958{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013959return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013960 ;
13961 return 0;
13962}
13963_ACEOF
13964rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013965if { (ac_try="$ac_link"
13966case "(($ac_try" in
13967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13968 *) ac_try_echo=$ac_try;;
13969esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013971 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013973 grep -v '^ *+' conftest.er1 >conftest.err
13974 rm -f conftest.er1
13975 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013977 (exit $ac_status); } && {
13978 test -z "$ac_c_werror_flag" ||
13979 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013980 } && test -s conftest$ac_exeext &&
13981 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013982 ac_cv_lib_intl_textdomain=yes
13983else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013985sed 's/^/| /' conftest.$ac_ext >&5
13986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013987 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013989
13990rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013991 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013992LIBS=$ac_check_lib_save_LIBS
13993fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013994{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13995echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
13996if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013997
13998cat >>confdefs.h <<\_ACEOF
13999#define WITH_LIBINTL 1
14000_ACEOF
14001
Brett Cannonc6d936e2009-06-07 20:09:53 +000014002 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000014003fi
14004
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014005
14006# checks for system dependent C++ extensions support
14007case "$ac_sys_system" in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014008 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
14009echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014011/* confdefs.h. */
14012_ACEOF
14013cat confdefs.h >>conftest.$ac_ext
14014cat >>conftest.$ac_ext <<_ACEOF
14015/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014016#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014017int
14018main ()
14019{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014020loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000014021 ;
14022 return 0;
14023}
14024_ACEOF
14025rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014026if { (ac_try="$ac_link"
14027case "(($ac_try" in
14028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14029 *) ac_try_echo=$ac_try;;
14030esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014032 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014034 grep -v '^ *+' conftest.er1 >conftest.err
14035 rm -f conftest.er1
14036 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014038 (exit $ac_status); } && {
14039 test -z "$ac_c_werror_flag" ||
14040 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014041 } && test -s conftest$ac_exeext &&
14042 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014043
Martin v. Löwis11437992002-04-12 09:54:03 +000014044cat >>confdefs.h <<\_ACEOF
14045#define AIX_GENUINE_CPLUSPLUS 1
14046_ACEOF
14047
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014048 { echo "$as_me:$LINENO: result: yes" >&5
14049echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014050else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014051 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014052sed 's/^/| /' conftest.$ac_ext >&5
14053
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014054 { echo "$as_me:$LINENO: result: no" >&5
14055echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014057
14058rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014059 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014060 *) ;;
14061esac
14062
Guido van Rossum70c7f481998-03-26 18:44:10 +000014063# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014064{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14065echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014066if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014067 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014068else
Martin v. Löwis11437992002-04-12 09:54:03 +000014069 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014070LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014071cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014072/* confdefs.h. */
14073_ACEOF
14074cat confdefs.h >>conftest.$ac_ext
14075cat >>conftest.$ac_ext <<_ACEOF
14076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014078/* Override any GCC internal prototype to avoid an error.
14079 Use char because int might match the return type of a GCC
14080 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014081#ifdef __cplusplus
14082extern "C"
14083#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014084char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014085int
14086main ()
14087{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014088return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014089 ;
14090 return 0;
14091}
14092_ACEOF
14093rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014094if { (ac_try="$ac_link"
14095case "(($ac_try" in
14096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14097 *) ac_try_echo=$ac_try;;
14098esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014100 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014101 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014102 grep -v '^ *+' conftest.er1 >conftest.err
14103 rm -f conftest.er1
14104 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014106 (exit $ac_status); } && {
14107 test -z "$ac_c_werror_flag" ||
14108 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014109 } && test -s conftest$ac_exeext &&
14110 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014111 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014112else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014114sed 's/^/| /' conftest.$ac_ext >&5
14115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014116 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014118
14119rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014120 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014121LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014122fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014123{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14124echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
14125if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014126 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014127fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014128 # SVR4
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014129{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14130echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014131if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014132 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014133else
Martin v. Löwis11437992002-04-12 09:54:03 +000014134 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014135LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014136cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014137/* confdefs.h. */
14138_ACEOF
14139cat confdefs.h >>conftest.$ac_ext
14140cat >>conftest.$ac_ext <<_ACEOF
14141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014143/* Override any GCC internal prototype to avoid an error.
14144 Use char because int might match the return type of a GCC
14145 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014146#ifdef __cplusplus
14147extern "C"
14148#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014149char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014150int
14151main ()
14152{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014153return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014154 ;
14155 return 0;
14156}
14157_ACEOF
14158rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014159if { (ac_try="$ac_link"
14160case "(($ac_try" in
14161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14162 *) ac_try_echo=$ac_try;;
14163esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014165 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014166 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014167 grep -v '^ *+' conftest.er1 >conftest.err
14168 rm -f conftest.er1
14169 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014171 (exit $ac_status); } && {
14172 test -z "$ac_c_werror_flag" ||
14173 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014174 } && test -s conftest$ac_exeext &&
14175 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014176 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014177else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014179sed 's/^/| /' conftest.$ac_ext >&5
14180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014181 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014183
14184rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014185 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014186LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014187fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014188{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14189echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
14190if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014191 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014192fi
14193 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014194
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014195{ echo "$as_me:$LINENO: checking for --with-libs" >&5
14196echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014198# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014199if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014200 withval=$with_libs;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014201{ echo "$as_me:$LINENO: result: $withval" >&5
14202echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014203LIBS="$withval $LIBS"
14204
14205else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014206 { echo "$as_me:$LINENO: result: no" >&5
14207echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014208fi
14209
Guido van Rossum7f43da71994-08-01 12:15:30 +000014210
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014211# Check for use of the system libffi library
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014212{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14213echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014215# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014216if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014217 withval=$with_system_ffi;
14218fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014219
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014220
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014221{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14222echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014223
Matthias Klose55708cc2009-04-30 08:06:49 +000014224# Check for --with-dbmliborder
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014225{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
14226echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014227
14228# Check whether --with-dbmliborder was given.
14229if test "${with_dbmliborder+set}" = set; then
14230 withval=$with_dbmliborder;
14231if test x$with_dbmliborder = xyes
14232then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014233{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14234echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014235 { (exit 1); exit 1; }; }
14236else
14237 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
14238 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
14239 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014240 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14241echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014242 { (exit 1); exit 1; }; }
14243 fi
14244 done
14245fi
14246fi
14247
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014248{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
14249echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014250
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014251# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014252
14253
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014254{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14255echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014257# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014258if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014259 withval=$with_signal_module;
14260fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014261
14262
14263if test -z "$with_signal_module"
14264then with_signal_module="yes"
14265fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014266{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
14267echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014268
14269if test "${with_signal_module}" = "yes"; then
14270 USE_SIGNAL_MODULE=""
14271 SIGNAL_OBJS=""
14272else
14273 USE_SIGNAL_MODULE="#"
14274 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14275fi
14276
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014277# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014278
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014279USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014280
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014281{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14282echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014283
Guido van Rossumec2f0731997-01-22 20:54:01 +000014284
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014285# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014286if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014287 withval=$with_dec_threads;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014288{ echo "$as_me:$LINENO: result: $withval" >&5
14289echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014290LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014291if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014292 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014293fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014294else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014295 { echo "$as_me:$LINENO: result: no" >&5
14296echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014297fi
14298
Martin v. Löwis11437992002-04-12 09:54:03 +000014299
14300# Templates for things AC_DEFINEd more than once.
14301# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014302
14303
Martin v. Löwis11437992002-04-12 09:54:03 +000014304
14305
14306
14307
14308
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014309{ echo "$as_me:$LINENO: checking for --with-threads" >&5
14310echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014311
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014312# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014313if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014314 withval=$with_threads;
14315fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014316
14317
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014318# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014320# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014321if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014322 withval=$with_thread; with_threads=$with_thread
14323fi
14324
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014325
14326if test -z "$with_threads"
14327then with_threads="yes"
14328fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014329{ echo "$as_me:$LINENO: result: $with_threads" >&5
14330echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014331
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014332
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014333if test "$with_threads" = "no"
14334then
14335 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014336elif test "$ac_cv_pthread_is_default" = yes
14337then
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014339#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014340_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014341
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014342 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014343 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014344#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014345_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014346
14347 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014348 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014349elif test "$ac_cv_kpthread" = "yes"
14350then
14351 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014352 if test "$ac_cv_cxx_thread" = "yes"; then
14353 CXX="$CXX -Kpthread"
14354 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014355 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014356#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014357_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014358
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014359 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014360 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014361elif test "$ac_cv_kthread" = "yes"
14362then
14363 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014364 if test "$ac_cv_cxx_thread" = "yes"; then
14365 CXX="$CXX -Kthread"
14366 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014367 cat >>confdefs.h <<\_ACEOF
14368#define WITH_THREAD 1
14369_ACEOF
14370
14371 posix_threads=yes
14372 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014373elif test "$ac_cv_pthread" = "yes"
14374then
14375 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014376 if test "$ac_cv_cxx_thread" = "yes"; then
14377 CXX="$CXX -pthread"
14378 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014379 cat >>confdefs.h <<\_ACEOF
14380#define WITH_THREAD 1
14381_ACEOF
14382
14383 posix_threads=yes
14384 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014385else
14386 if test ! -z "$with_threads" -a -d "$with_threads"
14387 then LDFLAGS="$LDFLAGS -L$with_threads"
14388 fi
14389 if test ! -z "$withval" -a -d "$withval"
14390 then LDFLAGS="$LDFLAGS -L$withval"
14391 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014392
14393 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014394 # define _POSIX_THREADS in unistd.h. Some apparently don't
14395 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014396 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14397echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014398 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014399/* confdefs.h. */
14400_ACEOF
14401cat confdefs.h >>conftest.$ac_ext
14402cat >>conftest.$ac_ext <<_ACEOF
14403/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014404
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014405#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014406#ifdef _POSIX_THREADS
14407yes
14408#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014409
14410_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014411if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014412 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014413 unistd_defines_pthreads=yes
14414else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014415 unistd_defines_pthreads=no
14416fi
Mark Dickinson875ada42009-11-28 12:52:39 +000014417rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014418
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014419 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14420echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014421
Martin v. Löwis11437992002-04-12 09:54:03 +000014422 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014423#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014424_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014425
Martin v. Löwis11437992002-04-12 09:54:03 +000014426 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014427 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14428echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014429if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014430 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014431fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014432{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14433echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014434else
Martin v. Löwis11437992002-04-12 09:54:03 +000014435 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014436{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14437echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014438cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014439/* confdefs.h. */
14440_ACEOF
14441cat confdefs.h >>conftest.$ac_ext
14442cat >>conftest.$ac_ext <<_ACEOF
14443/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014444$ac_includes_default
14445#include <cthreads.h>
14446_ACEOF
14447rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014448if { (ac_try="$ac_compile"
14449case "(($ac_try" in
14450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14451 *) ac_try_echo=$ac_try;;
14452esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014456 grep -v '^ *+' conftest.er1 >conftest.err
14457 rm -f conftest.er1
14458 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460 (exit $ac_status); } && {
14461 test -z "$ac_c_werror_flag" ||
14462 test ! -s conftest.err
14463 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014464 ac_header_compiler=yes
14465else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014467sed 's/^/| /' conftest.$ac_ext >&5
14468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471
14472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014473{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14474echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014475
14476# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014477{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14478echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014479cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014480/* confdefs.h. */
14481_ACEOF
14482cat confdefs.h >>conftest.$ac_ext
14483cat >>conftest.$ac_ext <<_ACEOF
14484/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014485#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014486_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487if { (ac_try="$ac_cpp conftest.$ac_ext"
14488case "(($ac_try" in
14489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14490 *) ac_try_echo=$ac_try;;
14491esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014493 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014494 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014495 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014496 rm -f conftest.er1
14497 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014499 (exit $ac_status); } >/dev/null && {
14500 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14501 test ! -s conftest.err
14502 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014503 ac_header_preproc=yes
14504else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014506sed 's/^/| /' conftest.$ac_ext >&5
14507
Martin v. Löwis11437992002-04-12 09:54:03 +000014508 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014510
Martin v. Löwis11437992002-04-12 09:54:03 +000014511rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014512{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14513echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014514
14515# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014516case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14517 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014518 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14519echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14520 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14521echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014522 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014523 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014524 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014525 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14526echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
14527 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14528echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14529 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14530echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14531 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14532echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14533 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14534echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
14535 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14536echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014537 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014538## -------------------------------------- ##
14539## Report this to http://bugs.python.org/ ##
14540## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014541_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014542 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014543 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014544esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014545{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14546echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014547if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014548 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014549else
14550 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014551fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014552{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14553echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014554
14555fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014556if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014557 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014558#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014559_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014560
Martin v. Löwis11437992002-04-12 09:54:03 +000014561 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014562#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014563_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014564
Martin v. Löwis11437992002-04-12 09:54:03 +000014565
14566cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014567#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014568_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014569
14570 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014571 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014572else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014573
Martin v. Löwis11437992002-04-12 09:54:03 +000014574 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014575 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14576echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014577if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014578 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014579fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014580{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14581echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014582else
Martin v. Löwis11437992002-04-12 09:54:03 +000014583 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014584{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14585echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014586cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014587/* confdefs.h. */
14588_ACEOF
14589cat confdefs.h >>conftest.$ac_ext
14590cat >>conftest.$ac_ext <<_ACEOF
14591/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014592$ac_includes_default
14593#include <mach/cthreads.h>
14594_ACEOF
14595rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014596if { (ac_try="$ac_compile"
14597case "(($ac_try" in
14598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14599 *) ac_try_echo=$ac_try;;
14600esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014602 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014603 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014604 grep -v '^ *+' conftest.er1 >conftest.err
14605 rm -f conftest.er1
14606 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014608 (exit $ac_status); } && {
14609 test -z "$ac_c_werror_flag" ||
14610 test ! -s conftest.err
14611 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014612 ac_header_compiler=yes
14613else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014615sed 's/^/| /' conftest.$ac_ext >&5
14616
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014617 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014619
14620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014621{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14622echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014623
14624# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014625{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14626echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014627cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014628/* confdefs.h. */
14629_ACEOF
14630cat confdefs.h >>conftest.$ac_ext
14631cat >>conftest.$ac_ext <<_ACEOF
14632/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014633#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014634_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014635if { (ac_try="$ac_cpp conftest.$ac_ext"
14636case "(($ac_try" in
14637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14638 *) ac_try_echo=$ac_try;;
14639esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014641 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014642 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014643 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014644 rm -f conftest.er1
14645 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014647 (exit $ac_status); } >/dev/null && {
14648 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14649 test ! -s conftest.err
14650 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014651 ac_header_preproc=yes
14652else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014654sed 's/^/| /' conftest.$ac_ext >&5
14655
Martin v. Löwis11437992002-04-12 09:54:03 +000014656 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014658
Martin v. Löwis11437992002-04-12 09:54:03 +000014659rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014660{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14661echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014662
14663# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014664case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14665 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014666 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14667echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14668 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14669echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014670 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014671 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014672 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014673 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14674echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
14675 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14676echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14677 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14678echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14679 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14680echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14681 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14682echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
14683 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14684echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014685 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014686## -------------------------------------- ##
14687## Report this to http://bugs.python.org/ ##
14688## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014689_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014690 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014691 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014692esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014693{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14694echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014695if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014696 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014697else
14698 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014699fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014700{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14701echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014702
14703fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014704if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014705 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014706#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014707_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014708
Martin v. Löwis11437992002-04-12 09:54:03 +000014709 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014710#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014711_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014712
Martin v. Löwis11437992002-04-12 09:54:03 +000014713
14714cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014715#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014716_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014717
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014718 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014719else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014720
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014721 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14722echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014723
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014724# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014725if test "${with_pth+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014726 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14727echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014728 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014729#define WITH_THREAD 1
14730_ACEOF
14731
14732
14733cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014734#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014735_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014736
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014737 LIBS="-lpth $LIBS"
14738 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014739else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014740 { echo "$as_me:$LINENO: result: no" >&5
14741echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014742
14743 # Just looking for pthread_create in libpthread is not enough:
14744 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14745 # So we really have to include pthread.h, and then link.
14746 _libs=$LIBS
14747 LIBS="$LIBS -lpthread"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014748 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14749echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014751/* confdefs.h. */
14752_ACEOF
14753cat confdefs.h >>conftest.$ac_ext
14754cat >>conftest.$ac_ext <<_ACEOF
14755/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014756#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014757
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014758void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014759int
14760main ()
14761{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014762
14763pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014764 ;
14765 return 0;
14766}
14767_ACEOF
14768rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014769if { (ac_try="$ac_link"
14770case "(($ac_try" in
14771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14772 *) ac_try_echo=$ac_try;;
14773esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014775 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014777 grep -v '^ *+' conftest.er1 >conftest.err
14778 rm -f conftest.er1
14779 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014781 (exit $ac_status); } && {
14782 test -z "$ac_c_werror_flag" ||
14783 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014784 } && test -s conftest$ac_exeext &&
14785 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014786
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014787 { echo "$as_me:$LINENO: result: yes" >&5
14788echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014789 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014790#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014791_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014792
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014793 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014794 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014795else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014797sed 's/^/| /' conftest.$ac_ext >&5
14798
Martin v. Löwis11437992002-04-12 09:54:03 +000014799
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014800 LIBS=$_libs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014801 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14802echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014803if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014804 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014805else
Martin v. Löwis11437992002-04-12 09:54:03 +000014806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014807/* confdefs.h. */
14808_ACEOF
14809cat confdefs.h >>conftest.$ac_ext
14810cat >>conftest.$ac_ext <<_ACEOF
14811/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014812/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14813 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14814#define pthread_detach innocuous_pthread_detach
14815
Guido van Rossumad678af1998-10-02 14:42:15 +000014816/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014817 which can conflict with char pthread_detach (); below.
14818 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014819 <limits.h> exists even on freestanding compilers. */
14820
14821#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014822# include <limits.h>
14823#else
14824# include <assert.h>
14825#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014826
14827#undef pthread_detach
14828
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014829/* Override any GCC internal prototype to avoid an error.
14830 Use char because int might match the return type of a GCC
14831 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014832#ifdef __cplusplus
14833extern "C"
14834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014835char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014836/* The GNU C library defines this for functions which it implements
14837 to always fail with ENOSYS. Some functions are actually named
14838 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014839#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014840choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014841#endif
14842
Skip Montanaro6dead952003-09-25 14:50:04 +000014843int
14844main ()
14845{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014846return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014847 ;
14848 return 0;
14849}
14850_ACEOF
14851rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014852if { (ac_try="$ac_link"
14853case "(($ac_try" in
14854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14855 *) ac_try_echo=$ac_try;;
14856esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014858 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014859 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014860 grep -v '^ *+' conftest.er1 >conftest.err
14861 rm -f conftest.er1
14862 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014864 (exit $ac_status); } && {
14865 test -z "$ac_c_werror_flag" ||
14866 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014867 } && test -s conftest$ac_exeext &&
14868 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014869 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014870else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014872sed 's/^/| /' conftest.$ac_ext >&5
14873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014874 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014876
14877rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014878 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014879fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014880{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14881echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
14882if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014883 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014884#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014885_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014886
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014887 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014888 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014889else
Guido van Rossumad678af1998-10-02 14:42:15 +000014890
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014891 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014892 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14893echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014894if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014895 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014896fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014897{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14898echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014899else
14900 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014901{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14902echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014903cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014904/* confdefs.h. */
14905_ACEOF
14906cat confdefs.h >>conftest.$ac_ext
14907cat >>conftest.$ac_ext <<_ACEOF
14908/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014909$ac_includes_default
14910#include <atheos/threads.h>
14911_ACEOF
14912rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913if { (ac_try="$ac_compile"
14914case "(($ac_try" in
14915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14916 *) ac_try_echo=$ac_try;;
14917esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014919 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014920 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014921 grep -v '^ *+' conftest.er1 >conftest.err
14922 rm -f conftest.er1
14923 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014925 (exit $ac_status); } && {
14926 test -z "$ac_c_werror_flag" ||
14927 test ! -s conftest.err
14928 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014929 ac_header_compiler=yes
14930else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014932sed 's/^/| /' conftest.$ac_ext >&5
14933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014936
14937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014938{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14939echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014940
14941# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014942{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14943echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014944cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014945/* confdefs.h. */
14946_ACEOF
14947cat confdefs.h >>conftest.$ac_ext
14948cat >>conftest.$ac_ext <<_ACEOF
14949/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014950#include <atheos/threads.h>
14951_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014952if { (ac_try="$ac_cpp conftest.$ac_ext"
14953case "(($ac_try" in
14954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14955 *) ac_try_echo=$ac_try;;
14956esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014958 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014959 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014960 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014961 rm -f conftest.er1
14962 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014964 (exit $ac_status); } >/dev/null && {
14965 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14966 test ! -s conftest.err
14967 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014968 ac_header_preproc=yes
14969else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014971sed 's/^/| /' conftest.$ac_ext >&5
14972
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014973 ac_header_preproc=no
14974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014975
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014976rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014977{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14978echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014979
14980# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014981case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14982 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014983 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14984echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14985 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14986echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014987 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014988 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014989 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014990 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14991echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
14992 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14993echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14994 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14995echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14996 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14997echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14998 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14999echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
15000 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
15001echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015003## -------------------------------------- ##
15004## Report this to http://bugs.python.org/ ##
15005## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015006_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015007 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015008 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015009esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015010{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15011echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015012if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015013 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015014else
15015 ac_cv_header_atheos_threads_h=$ac_header_preproc
15016fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015017{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15018echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015019
15020fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015021if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015022 cat >>confdefs.h <<\_ACEOF
15023#define WITH_THREAD 1
15024_ACEOF
15025
15026
15027cat >>confdefs.h <<\_ACEOF
15028#define ATHEOS_THREADS 1
15029_ACEOF
15030
15031 THREADOBJ="Python/thread.o"
15032else
15033
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015034 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15035echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015036if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015037 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015038else
Martin v. Löwis11437992002-04-12 09:54:03 +000015039 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015040LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015041cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015042/* confdefs.h. */
15043_ACEOF
15044cat confdefs.h >>conftest.$ac_ext
15045cat >>conftest.$ac_ext <<_ACEOF
15046/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048/* Override any GCC internal prototype to avoid an error.
15049 Use char because int might match the return type of a GCC
15050 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015051#ifdef __cplusplus
15052extern "C"
15053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015054char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015055int
15056main ()
15057{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015059 ;
15060 return 0;
15061}
15062_ACEOF
15063rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015064if { (ac_try="$ac_link"
15065case "(($ac_try" in
15066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15067 *) ac_try_echo=$ac_try;;
15068esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015070 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015071 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015072 grep -v '^ *+' conftest.er1 >conftest.err
15073 rm -f conftest.er1
15074 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015076 (exit $ac_status); } && {
15077 test -z "$ac_c_werror_flag" ||
15078 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015079 } && test -s conftest$ac_exeext &&
15080 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015081 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015082else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015083 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015084sed 's/^/| /' conftest.$ac_ext >&5
15085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015086 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015088
15089rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015090 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015091LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015092fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015093{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15094echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
15095if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015096 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015097#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015098_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015099
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015100 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015101 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015102 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015103else
Greg Steinadf63d62000-07-05 10:38:09 +000015104
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015105 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15106echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015107if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015108 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015109else
Martin v. Löwis11437992002-04-12 09:54:03 +000015110 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015111LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015112cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015113/* confdefs.h. */
15114_ACEOF
15115cat confdefs.h >>conftest.$ac_ext
15116cat >>conftest.$ac_ext <<_ACEOF
15117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015119/* Override any GCC internal prototype to avoid an error.
15120 Use char because int might match the return type of a GCC
15121 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015122#ifdef __cplusplus
15123extern "C"
15124#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015125char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015126int
15127main ()
15128{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015129return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015130 ;
15131 return 0;
15132}
15133_ACEOF
15134rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015135if { (ac_try="$ac_link"
15136case "(($ac_try" in
15137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15138 *) ac_try_echo=$ac_try;;
15139esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015142 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015143 grep -v '^ *+' conftest.er1 >conftest.err
15144 rm -f conftest.er1
15145 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015147 (exit $ac_status); } && {
15148 test -z "$ac_c_werror_flag" ||
15149 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015150 } && test -s conftest$ac_exeext &&
15151 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015152 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015153else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015155sed 's/^/| /' conftest.$ac_ext >&5
15156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015157 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015159
15160rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015161 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015162LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015163fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015164{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15165echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
15166if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015167 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015168#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015169_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015170
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015171 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015172 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015173 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015174else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015175
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015176 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15177echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015178if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015179 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015180else
Martin v. Löwis11437992002-04-12 09:54:03 +000015181 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015182LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015183cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015184/* confdefs.h. */
15185_ACEOF
15186cat confdefs.h >>conftest.$ac_ext
15187cat >>conftest.$ac_ext <<_ACEOF
15188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015190/* Override any GCC internal prototype to avoid an error.
15191 Use char because int might match the return type of a GCC
15192 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015193#ifdef __cplusplus
15194extern "C"
15195#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015196char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015197int
15198main ()
15199{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015200return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 ;
15202 return 0;
15203}
15204_ACEOF
15205rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015206if { (ac_try="$ac_link"
15207case "(($ac_try" in
15208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15209 *) ac_try_echo=$ac_try;;
15210esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015212 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015214 grep -v '^ *+' conftest.er1 >conftest.err
15215 rm -f conftest.er1
15216 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015218 (exit $ac_status); } && {
15219 test -z "$ac_c_werror_flag" ||
15220 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015221 } && test -s conftest$ac_exeext &&
15222 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015223 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015224else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015226sed 's/^/| /' conftest.$ac_ext >&5
15227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015228 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015230
15231rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015232 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015233LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015234fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015235{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15236echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
15237if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015238 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015239#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015240_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015241
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015242 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015243 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015244 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015245else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015246
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015247 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15248echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015249if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015250 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015251else
Martin v. Löwis11437992002-04-12 09:54:03 +000015252 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015253LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015254cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015255/* confdefs.h. */
15256_ACEOF
15257cat confdefs.h >>conftest.$ac_ext
15258cat >>conftest.$ac_ext <<_ACEOF
15259/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015261/* Override any GCC internal prototype to avoid an error.
15262 Use char because int might match the return type of a GCC
15263 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015264#ifdef __cplusplus
15265extern "C"
15266#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015267char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015268int
15269main ()
15270{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015271return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015272 ;
15273 return 0;
15274}
15275_ACEOF
15276rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015277if { (ac_try="$ac_link"
15278case "(($ac_try" in
15279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15280 *) ac_try_echo=$ac_try;;
15281esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015283 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015284 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015285 grep -v '^ *+' conftest.er1 >conftest.err
15286 rm -f conftest.er1
15287 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015289 (exit $ac_status); } && {
15290 test -z "$ac_c_werror_flag" ||
15291 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015292 } && test -s conftest$ac_exeext &&
15293 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015294 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015295else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015297sed 's/^/| /' conftest.$ac_ext >&5
15298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015299 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015301
15302rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015303 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015304LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015305fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015306{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15307echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
15308if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015309 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015310#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015311_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015312
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015313 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015314 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015315 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015316else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015317
Martin v. Löwis130fb172001-07-19 11:00:41 +000015318 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015319fi
15320
Guido van Rossum627b2d71993-12-24 10:39:16 +000015321
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015322fi
15323
Guido van Rossum0be3e491997-05-22 20:33:33 +000015324fi
15325
Guido van Rossum49545951997-12-02 19:28:29 +000015326fi
15327
Guido van Rossumb93a8621998-05-07 13:27:32 +000015328fi
15329
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015330
Michael W. Hudson54241132001-12-07 15:38:26 +000015331fi
15332
Martin v. Löwisf90ae202002-06-11 06:22:31 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015337fi
15338
Martin v. Löwis11437992002-04-12 09:54:03 +000015339fi
15340
15341
15342fi
15343
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015344
Michael W. Hudson54241132001-12-07 15:38:26 +000015345
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015346 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15347echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015348if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015349 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015350else
Martin v. Löwis11437992002-04-12 09:54:03 +000015351 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015352LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015353cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015354/* confdefs.h. */
15355_ACEOF
15356cat confdefs.h >>conftest.$ac_ext
15357cat >>conftest.$ac_ext <<_ACEOF
15358/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015360/* Override any GCC internal prototype to avoid an error.
15361 Use char because int might match the return type of a GCC
15362 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015363#ifdef __cplusplus
15364extern "C"
15365#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015366char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015367int
15368main ()
15369{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015370return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015371 ;
15372 return 0;
15373}
15374_ACEOF
15375rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015376if { (ac_try="$ac_link"
15377case "(($ac_try" in
15378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15379 *) ac_try_echo=$ac_try;;
15380esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015382 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015384 grep -v '^ *+' conftest.er1 >conftest.err
15385 rm -f conftest.er1
15386 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015388 (exit $ac_status); } && {
15389 test -z "$ac_c_werror_flag" ||
15390 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015391 } && test -s conftest$ac_exeext &&
15392 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015393 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015394else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015395 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015396sed 's/^/| /' conftest.$ac_ext >&5
15397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015398 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015400
15401rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015402 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015403LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015404fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015405{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15406echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
15407if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015408 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015409#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015410_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015411
Martin v. Löwis130fb172001-07-19 11:00:41 +000015412 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015413 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015414 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015415fi
15416
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015417
Neal Norwitza978ab02002-11-02 16:58:05 +000015418 if test "$posix_threads" != "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015419 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15420echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015421if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015422 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015423else
Martin v. Löwis11437992002-04-12 09:54:03 +000015424 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015425LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015426cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015427/* confdefs.h. */
15428_ACEOF
15429cat confdefs.h >>conftest.$ac_ext
15430cat >>conftest.$ac_ext <<_ACEOF
15431/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015433/* Override any GCC internal prototype to avoid an error.
15434 Use char because int might match the return type of a GCC
15435 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015436#ifdef __cplusplus
15437extern "C"
15438#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015439char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015440int
15441main ()
15442{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015443return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015444 ;
15445 return 0;
15446}
15447_ACEOF
15448rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015449if { (ac_try="$ac_link"
15450case "(($ac_try" in
15451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15452 *) ac_try_echo=$ac_try;;
15453esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015455 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015457 grep -v '^ *+' conftest.er1 >conftest.err
15458 rm -f conftest.er1
15459 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015461 (exit $ac_status); } && {
15462 test -z "$ac_c_werror_flag" ||
15463 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015464 } && test -s conftest$ac_exeext &&
15465 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015466 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015467else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015469sed 's/^/| /' conftest.$ac_ext >&5
15470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015471 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015473
15474rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015475 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015476LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015477fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015478{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15479echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
15480if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015481 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015482#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015483_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015484
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015485 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015486 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015487 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015488fi
15489
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015490 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015491
Martin v. Löwis130fb172001-07-19 11:00:41 +000015492 if test "$USE_THREAD_MODULE" != "#"
15493 then
15494 # If the above checks didn't disable threads, (at least) OSF1
15495 # needs this '-threads' argument during linking.
15496 case $ac_sys_system in
15497 OSF1) LDLAST=-threads;;
15498 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015499 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015500fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015501
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015502if test "$posix_threads" = "yes"; then
15503 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015504
15505cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015506#define _POSIX_THREADS 1
15507_ACEOF
15508
15509 fi
15510
15511 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15512 case $ac_sys_system/$ac_sys_release in
15513 SunOS/5.6)
15514cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015515#define HAVE_PTHREAD_DESTRUCTOR 1
15516_ACEOF
15517
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015518 ;;
15519 SunOS/5.8)
15520cat >>confdefs.h <<\_ACEOF
15521#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15522_ACEOF
15523
15524 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000015525 AIX/5)
15526cat >>confdefs.h <<\_ACEOF
15527#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15528_ACEOF
15529
15530 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015531 esac
15532
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015533 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15534echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015535 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015536 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015537else
15538 if test "$cross_compiling" = yes; then
15539 ac_cv_pthread_system_supported=no
15540else
15541 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015542/* confdefs.h. */
15543_ACEOF
15544cat confdefs.h >>conftest.$ac_ext
15545cat >>conftest.$ac_ext <<_ACEOF
15546/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015547#include <pthread.h>
15548 void *foo(void *parm) {
15549 return NULL;
15550 }
15551 main() {
15552 pthread_attr_t attr;
15553 pthread_t id;
15554 if (pthread_attr_init(&attr)) exit(-1);
15555 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15556 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15557 exit(0);
15558 }
15559_ACEOF
15560rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015561if { (ac_try="$ac_link"
15562case "(($ac_try" in
15563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15564 *) ac_try_echo=$ac_try;;
15565esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015567 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015568 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015570 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015571 { (case "(($ac_try" in
15572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15573 *) ac_try_echo=$ac_try;;
15574esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015576 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015577 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015579 (exit $ac_status); }; }; then
15580 ac_cv_pthread_system_supported=yes
15581else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015582 echo "$as_me: program exited with status $ac_status" >&5
15583echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015584sed 's/^/| /' conftest.$ac_ext >&5
15585
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015586( exit $ac_status )
15587ac_cv_pthread_system_supported=no
15588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015589rm -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 +000015590fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015592
15593
Guido van Rossum627b2d71993-12-24 10:39:16 +000015594fi
15595
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015596 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15597echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015598 if test "$ac_cv_pthread_system_supported" = "yes"; then
15599
15600cat >>confdefs.h <<\_ACEOF
15601#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15602_ACEOF
15603
15604 fi
15605
15606for ac_func in pthread_sigmask
15607do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015608as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15609{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15610echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015611if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015612 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015613else
15614 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015615/* confdefs.h. */
15616_ACEOF
15617cat confdefs.h >>conftest.$ac_ext
15618cat >>conftest.$ac_ext <<_ACEOF
15619/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015620/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15621 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15622#define $ac_func innocuous_$ac_func
15623
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015624/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015625 which can conflict with char $ac_func (); below.
15626 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015627 <limits.h> exists even on freestanding compilers. */
15628
15629#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015630# include <limits.h>
15631#else
15632# include <assert.h>
15633#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015634
15635#undef $ac_func
15636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015637/* Override any GCC internal prototype to avoid an error.
15638 Use char because int might match the return type of a GCC
15639 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015640#ifdef __cplusplus
15641extern "C"
15642#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015643char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015644/* The GNU C library defines this for functions which it implements
15645 to always fail with ENOSYS. Some functions are actually named
15646 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015647#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015648choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015649#endif
15650
Skip Montanaro6dead952003-09-25 14:50:04 +000015651int
15652main ()
15653{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015654return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015655 ;
15656 return 0;
15657}
15658_ACEOF
15659rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015660if { (ac_try="$ac_link"
15661case "(($ac_try" in
15662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15663 *) ac_try_echo=$ac_try;;
15664esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015666 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015668 grep -v '^ *+' conftest.er1 >conftest.err
15669 rm -f conftest.er1
15670 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015672 (exit $ac_status); } && {
15673 test -z "$ac_c_werror_flag" ||
15674 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015675 } && test -s conftest$ac_exeext &&
15676 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015677 eval "$as_ac_var=yes"
15678else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015680sed 's/^/| /' conftest.$ac_ext >&5
15681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015682 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015684
15685rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015686 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015687fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015688ac_res=`eval echo '${'$as_ac_var'}'`
15689 { echo "$as_me:$LINENO: result: $ac_res" >&5
15690echo "${ECHO_T}$ac_res" >&6; }
15691if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015692 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015693#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015694_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015695 case $ac_sys_system in
15696 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015697
Jason Tishlerfac083d2003-07-22 15:20:49 +000015698cat >>confdefs.h <<\_ACEOF
15699#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15700_ACEOF
15701
15702 ;;
15703 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015704fi
15705done
15706
15707fi
15708
15709
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015710# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015711
15712
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015713{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15714echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015715# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015716if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015717 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015718 no)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015719 { echo "$as_me:$LINENO: result: no" >&5
15720echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015721 ipv6=no
15722 ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015723 *) { echo "$as_me:$LINENO: result: yes" >&5
15724echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015725 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015726#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015727_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015728
15729 ipv6=yes
15730 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015731 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015732else
Martin v. Löwis11437992002-04-12 09:54:03 +000015733
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015734 if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015735 { echo "$as_me:$LINENO: result: no" >&5
15736echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015737 ipv6=no
15738
15739else
Martin v. Löwis11437992002-04-12 09:54:03 +000015740 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015741/* confdefs.h. */
15742_ACEOF
15743cat confdefs.h >>conftest.$ac_ext
15744cat >>conftest.$ac_ext <<_ACEOF
15745/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015746 /* AF_INET6 available check */
15747#include <sys/types.h>
15748#include <sys/socket.h>
15749main()
15750{
15751 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15752 exit(1);
15753 else
15754 exit(0);
15755}
15756
Martin v. Löwis11437992002-04-12 09:54:03 +000015757_ACEOF
15758rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015759if { (ac_try="$ac_link"
15760case "(($ac_try" in
15761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15762 *) ac_try_echo=$ac_try;;
15763esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015765 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015766 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015768 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015769 { (case "(($ac_try" in
15770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15771 *) ac_try_echo=$ac_try;;
15772esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015774 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015775 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015777 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015778 { echo "$as_me:$LINENO: result: yes" >&5
15779echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015780 ipv6=yes
15781else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015782 echo "$as_me: program exited with status $ac_status" >&5
15783echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015784sed 's/^/| /' conftest.$ac_ext >&5
15785
Martin v. Löwis11437992002-04-12 09:54:03 +000015786( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015787{ echo "$as_me:$LINENO: result: no" >&5
15788echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015789 ipv6=no
15790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015791rm -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 +000015792fi
15793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015794
15795
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015796if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015797 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15798echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015800/* confdefs.h. */
15801_ACEOF
15802cat confdefs.h >>conftest.$ac_ext
15803cat >>conftest.$ac_ext <<_ACEOF
15804/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015805#include <sys/types.h>
15806#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015807int
15808main ()
15809{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015810struct sockaddr_in6 x;
15811x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015812 ;
15813 return 0;
15814}
15815_ACEOF
15816rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015817if { (ac_try="$ac_compile"
15818case "(($ac_try" in
15819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15820 *) ac_try_echo=$ac_try;;
15821esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015823 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015824 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015825 grep -v '^ *+' conftest.er1 >conftest.err
15826 rm -f conftest.er1
15827 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015829 (exit $ac_status); } && {
15830 test -z "$ac_c_werror_flag" ||
15831 test ! -s conftest.err
15832 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015833 { echo "$as_me:$LINENO: result: yes" >&5
15834echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015835 ipv6=yes
15836else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015838sed 's/^/| /' conftest.$ac_ext >&5
15839
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015840 { echo "$as_me:$LINENO: result: no" >&5
15841echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015842 ipv6=no
15843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015844
15845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015846fi
15847
15848if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015849 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015850#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015851_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015852
15853fi
15854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015855fi
15856
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015857
15858ipv6type=unknown
15859ipv6lib=none
15860ipv6trylibc=no
15861
15862if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015863 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15864echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015865 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15866 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015867 case $i in
15868 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015870/* confdefs.h. */
15871_ACEOF
15872cat confdefs.h >>conftest.$ac_ext
15873cat >>conftest.$ac_ext <<_ACEOF
15874/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015875
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015876#include <netinet/in.h>
15877#ifdef IPV6_INRIA_VERSION
15878yes
15879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015880_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015881if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015882 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015883 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015884fi
Mark Dickinson875ada42009-11-28 12:52:39 +000015885rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015886
15887 ;;
15888 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015890/* confdefs.h. */
15891_ACEOF
15892cat confdefs.h >>conftest.$ac_ext
15893cat >>conftest.$ac_ext <<_ACEOF
15894/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015895
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015896#include <netinet/in.h>
15897#ifdef __KAME__
15898yes
15899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015900_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015901if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015902 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015903 ipv6type=$i;
15904 ipv6lib=inet6
15905 ipv6libdir=/usr/local/v6/lib
15906 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015907fi
Mark Dickinson875ada42009-11-28 12:52:39 +000015908rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015909
15910 ;;
15911 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015912 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015913/* confdefs.h. */
15914_ACEOF
15915cat confdefs.h >>conftest.$ac_ext
15916cat >>conftest.$ac_ext <<_ACEOF
15917/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015918
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015919#include <features.h>
15920#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15921yes
15922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015923_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015925 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015926 ipv6type=$i;
15927 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015928fi
Mark Dickinson875ada42009-11-28 12:52:39 +000015929rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015930
15931 ;;
15932 linux-inet6)
15933 if test -d /usr/inet6; then
15934 ipv6type=$i
15935 ipv6lib=inet6
15936 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015937 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015938 fi
15939 ;;
15940 solaris)
15941 if test -f /etc/netconfig; then
15942 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15943 ipv6type=$i
15944 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015945 fi
15946 fi
15947 ;;
15948 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015949 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015950/* confdefs.h. */
15951_ACEOF
15952cat confdefs.h >>conftest.$ac_ext
15953cat >>conftest.$ac_ext <<_ACEOF
15954/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015955
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015956#include <sys/param.h>
15957#ifdef _TOSHIBA_INET6
15958yes
15959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015960_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015961if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015962 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015963 ipv6type=$i;
15964 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015965 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015966fi
Mark Dickinson875ada42009-11-28 12:52:39 +000015967rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015968
15969 ;;
15970 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015972/* confdefs.h. */
15973_ACEOF
15974cat confdefs.h >>conftest.$ac_ext
15975cat >>conftest.$ac_ext <<_ACEOF
15976/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015977
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015978#include </usr/local/v6/include/sys/v6config.h>
15979#ifdef __V6D__
15980yes
15981#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015982_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015983if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015984 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015985 ipv6type=$i;
15986 ipv6lib=v6;
15987 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015988 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015989fi
Mark Dickinson875ada42009-11-28 12:52:39 +000015990rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015991
15992 ;;
15993 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015995/* confdefs.h. */
15996_ACEOF
15997cat confdefs.h >>conftest.$ac_ext
15998cat >>conftest.$ac_ext <<_ACEOF
15999/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016000
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016001#include <sys/param.h>
16002#ifdef _ZETA_MINAMI_INET6
16003yes
16004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016005_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016007 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016008 ipv6type=$i;
16009 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016010 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016011fi
Mark Dickinson875ada42009-11-28 12:52:39 +000016012rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016013
16014 ;;
16015 esac
16016 if test "$ipv6type" != "unknown"; then
16017 break
16018 fi
16019 done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016020 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16021echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016022fi
16023
16024if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16025 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16026 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16027 echo "using lib$ipv6lib"
16028 else
16029 if test $ipv6trylibc = "yes"; then
16030 echo "using libc"
16031 else
16032 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16033 echo "You need to fetch lib$ipv6lib.a from appropriate"
16034 echo 'ipv6 kit and compile beforehand.'
16035 exit 1
16036 fi
16037 fi
16038fi
16039
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016040{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16041echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016042cat >conftest.$ac_ext <<_ACEOF
16043/* confdefs.h. */
16044_ACEOF
16045cat confdefs.h >>conftest.$ac_ext
16046cat >>conftest.$ac_ext <<_ACEOF
16047/* end confdefs.h. */
16048#include <Carbon/Carbon.h>
16049int
16050main ()
16051{
16052FSIORefNum fRef = 0
16053 ;
16054 return 0;
16055}
16056_ACEOF
16057rm -f conftest.$ac_objext
16058if { (ac_try="$ac_compile"
16059case "(($ac_try" in
16060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16061 *) ac_try_echo=$ac_try;;
16062esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016064 (eval "$ac_compile") 2>conftest.er1
16065 ac_status=$?
16066 grep -v '^ *+' conftest.er1 >conftest.err
16067 rm -f conftest.er1
16068 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016070 (exit $ac_status); } && {
16071 test -z "$ac_c_werror_flag" ||
16072 test ! -s conftest.err
16073 } && test -s conftest.$ac_objext; then
16074
16075cat >>confdefs.h <<\_ACEOF
16076#define HAVE_OSX105_SDK 1
16077_ACEOF
16078
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016079 { echo "$as_me:$LINENO: result: yes" >&5
16080echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016081else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016082 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016083sed 's/^/| /' conftest.$ac_ext >&5
16084
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016085 { echo "$as_me:$LINENO: result: no" >&5
16086echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016087
16088fi
16089
16090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16091
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016092# Check for --with-doc-strings
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016093{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16094echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016095
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016096# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016097if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016098 withval=$with_doc_strings;
16099fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016100
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016101
16102if test -z "$with_doc_strings"
16103then with_doc_strings="yes"
16104fi
16105if test "$with_doc_strings" != "no"
16106then
16107
16108cat >>confdefs.h <<\_ACEOF
16109#define WITH_DOC_STRINGS 1
16110_ACEOF
16111
16112fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016113{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16114echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016115
Neil Schemenauera35c6882001-02-27 04:45:05 +000016116# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016117{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16118echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016119
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016120# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016121if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016122 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016123if test "$withval" != no
16124then
16125
16126cat >>confdefs.h <<\_ACEOF
16127#define WITH_TSC 1
16128_ACEOF
16129
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016130 { echo "$as_me:$LINENO: result: yes" >&5
16131echo "${ECHO_T}yes" >&6; }
16132else { echo "$as_me:$LINENO: result: no" >&5
16133echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016134fi
16135else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016136 { echo "$as_me:$LINENO: result: no" >&5
16137echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016138fi
16139
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016140
16141# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016142{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16143echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016145# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016146if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016147 withval=$with_pymalloc;
16148fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016149
Neil Schemenauera35c6882001-02-27 04:45:05 +000016150
Neil Schemenauer16c22972002-03-22 15:34:49 +000016151if test -z "$with_pymalloc"
16152then with_pymalloc="yes"
16153fi
16154if test "$with_pymalloc" != "no"
16155then
Martin v. Löwis11437992002-04-12 09:54:03 +000016156
16157cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016158#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016159_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016160
16161fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016162{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16163echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016164
Barry Warsawef82cd72000-06-30 16:21:01 +000016165# Check for --with-wctype-functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016166{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16167echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016169# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016170if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016171 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016172if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016173then
16174
16175cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016176#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016177_ACEOF
16178
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016179 { echo "$as_me:$LINENO: result: yes" >&5
16180echo "${ECHO_T}yes" >&6; }
16181else { echo "$as_me:$LINENO: result: no" >&5
16182echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016183fi
16184else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016185 { echo "$as_me:$LINENO: result: no" >&5
16186echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016187fi
16188
Barry Warsawef82cd72000-06-30 16:21:01 +000016189
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016190# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016191
Guido van Rossum98935bf2001-09-05 19:13:16 +000016192DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016193
Guido van Rossume97ee181999-12-20 21:27:22 +000016194# the dlopen() function means we might want to use dynload_shlib.o. some
16195# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016196
Thomas Wouters3a584202000-08-05 23:28:51 +000016197for ac_func in dlopen
16198do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016199as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16200{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16201echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016202if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016203 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016204else
Martin v. Löwis11437992002-04-12 09:54:03 +000016205 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016206/* confdefs.h. */
16207_ACEOF
16208cat confdefs.h >>conftest.$ac_ext
16209cat >>conftest.$ac_ext <<_ACEOF
16210/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016211/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16212 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16213#define $ac_func innocuous_$ac_func
16214
Guido van Rossume97ee181999-12-20 21:27:22 +000016215/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016216 which can conflict with char $ac_func (); below.
16217 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016218 <limits.h> exists even on freestanding compilers. */
16219
16220#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016221# include <limits.h>
16222#else
16223# include <assert.h>
16224#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016225
16226#undef $ac_func
16227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016228/* Override any GCC internal prototype to avoid an error.
16229 Use char because int might match the return type of a GCC
16230 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016231#ifdef __cplusplus
16232extern "C"
16233#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016234char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016235/* The GNU C library defines this for functions which it implements
16236 to always fail with ENOSYS. Some functions are actually named
16237 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016238#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016239choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016240#endif
16241
Skip Montanaro6dead952003-09-25 14:50:04 +000016242int
16243main ()
16244{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016245return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016246 ;
16247 return 0;
16248}
16249_ACEOF
16250rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016251if { (ac_try="$ac_link"
16252case "(($ac_try" in
16253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16254 *) ac_try_echo=$ac_try;;
16255esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016257 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016258 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016259 grep -v '^ *+' conftest.er1 >conftest.err
16260 rm -f conftest.er1
16261 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016263 (exit $ac_status); } && {
16264 test -z "$ac_c_werror_flag" ||
16265 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016266 } && test -s conftest$ac_exeext &&
16267 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016268 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016269else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016270 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016271sed 's/^/| /' conftest.$ac_ext >&5
16272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016273 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016275
16276rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016277 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016278fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016279ac_res=`eval echo '${'$as_ac_var'}'`
16280 { echo "$as_me:$LINENO: result: $ac_res" >&5
16281echo "${ECHO_T}$ac_res" >&6; }
16282if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016283 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016284#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016285_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016286
Guido van Rossume97ee181999-12-20 21:27:22 +000016287fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016288done
Guido van Rossume97ee181999-12-20 21:27:22 +000016289
Michael W. Hudson54241132001-12-07 15:38:26 +000016290
Guido van Rossume97ee181999-12-20 21:27:22 +000016291# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16292# loading of modules.
16293
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016294{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16295echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016296if test -z "$DYNLOADFILE"
16297then
16298 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016299 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16300 if test "$ac_cv_func_dlopen" = yes
16301 then DYNLOADFILE="dynload_shlib.o"
16302 else DYNLOADFILE="dynload_aix.o"
16303 fi
16304 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016305 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016306 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16307 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016308 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016309 *)
16310 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16311 # out any dynamic loading
16312 if test "$ac_cv_func_dlopen" = yes
16313 then DYNLOADFILE="dynload_shlib.o"
16314 else DYNLOADFILE="dynload_stub.o"
16315 fi
16316 ;;
16317 esac
16318fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016319{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16320echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016321if test "$DYNLOADFILE" != "dynload_stub.o"
16322then
Martin v. Löwis11437992002-04-12 09:54:03 +000016323
16324cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016325#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016326_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016327
16328fi
16329
Neil Schemenauer4e425612001-06-19 15:44:15 +000016330# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16331
Michael W. Hudson54241132001-12-07 15:38:26 +000016332
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016333{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16334echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016335if test -z "$MACHDEP_OBJS"
16336then
Jack Jansene578a632001-08-15 01:27:14 +000016337 MACHDEP_OBJS=$extra_machdep_objs
16338else
16339 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016340fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016341{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16342echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016343
Guido van Rossum627b2d71993-12-24 10:39:16 +000016344# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
Martin v. Löwisd6320502004-08-12 13:45:08 +000016416
Martin v. Löwisc3001752005-01-23 09:27:24 +000016417
16418
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016419
16420
Thomas Wouterscf297e42007-02-23 15:07:44 +000016421
16422
Gregory P. Smith25523d22007-09-03 16:44:55 +000016423
Christian Heimes4e30a842007-11-30 22:12:06 +000016424
Martin v. Löwis92fab752008-03-08 10:40:41 +000016425
Martin v. Löwis823725e2008-03-24 13:39:54 +000016426
16427
Benjamin Peterson965ce872009-04-05 21:24:58 +000016428
16429
16430
16431
Martin v. Löwis011e8422009-05-05 04:43:17 +000016432
Martin v. Löwis113a0852009-05-29 17:25:39 +000016433
Martin v. Löwis823725e2008-03-24 13:39:54 +000016434for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16435 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016436 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016437 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000016438 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016439 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016440 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000016441 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
16442 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016443 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000016444 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016445 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000016446 truncate uname unsetenv utimes waitpid wait3 wait4 \
16447 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016448do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016449as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16450{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16451echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016452if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016453 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016454else
Martin v. Löwis11437992002-04-12 09:54:03 +000016455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016456/* confdefs.h. */
16457_ACEOF
16458cat confdefs.h >>conftest.$ac_ext
16459cat >>conftest.$ac_ext <<_ACEOF
16460/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016461/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16462 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16463#define $ac_func innocuous_$ac_func
16464
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016465/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016466 which can conflict with char $ac_func (); below.
16467 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016468 <limits.h> exists even on freestanding compilers. */
16469
16470#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016471# include <limits.h>
16472#else
16473# include <assert.h>
16474#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016475
16476#undef $ac_func
16477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016478/* Override any GCC internal prototype to avoid an error.
16479 Use char because int might match the return type of a GCC
16480 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016481#ifdef __cplusplus
16482extern "C"
16483#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016484char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016485/* The GNU C library defines this for functions which it implements
16486 to always fail with ENOSYS. Some functions are actually named
16487 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016488#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016489choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016490#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016491
Skip Montanaro6dead952003-09-25 14:50:04 +000016492int
16493main ()
16494{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016495return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016496 ;
16497 return 0;
16498}
16499_ACEOF
16500rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016501if { (ac_try="$ac_link"
16502case "(($ac_try" in
16503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16504 *) ac_try_echo=$ac_try;;
16505esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016507 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016509 grep -v '^ *+' conftest.er1 >conftest.err
16510 rm -f conftest.er1
16511 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016513 (exit $ac_status); } && {
16514 test -z "$ac_c_werror_flag" ||
16515 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016516 } && test -s conftest$ac_exeext &&
16517 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016518 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016519else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016521sed 's/^/| /' conftest.$ac_ext >&5
16522
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016523 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016525
16526rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016527 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016528fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016529ac_res=`eval echo '${'$as_ac_var'}'`
16530 { echo "$as_me:$LINENO: result: $ac_res" >&5
16531echo "${ECHO_T}$ac_res" >&6; }
16532if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016533 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016534#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016535_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016536
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016537fi
16538done
16539
Michael W. Hudson54241132001-12-07 15:38:26 +000016540
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016541# For some functions, having a definition is not sufficient, since
16542# we want to take their address.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016543{ echo "$as_me:$LINENO: checking for chroot" >&5
16544echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016545cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016546/* confdefs.h. */
16547_ACEOF
16548cat confdefs.h >>conftest.$ac_ext
16549cat >>conftest.$ac_ext <<_ACEOF
16550/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016551#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016552int
16553main ()
16554{
16555void *x=chroot
16556 ;
16557 return 0;
16558}
16559_ACEOF
16560rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016561if { (ac_try="$ac_compile"
16562case "(($ac_try" in
16563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16564 *) ac_try_echo=$ac_try;;
16565esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016567 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016568 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016569 grep -v '^ *+' conftest.er1 >conftest.err
16570 rm -f conftest.er1
16571 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016573 (exit $ac_status); } && {
16574 test -z "$ac_c_werror_flag" ||
16575 test ! -s conftest.err
16576 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016577
16578cat >>confdefs.h <<\_ACEOF
16579#define HAVE_CHROOT 1
16580_ACEOF
16581
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016582 { echo "$as_me:$LINENO: result: yes" >&5
16583echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016584else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016586sed 's/^/| /' conftest.$ac_ext >&5
16587
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016588 { echo "$as_me:$LINENO: result: no" >&5
16589echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016590
16591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016592
16593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016594{ echo "$as_me:$LINENO: checking for link" >&5
16595echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016596cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016597/* confdefs.h. */
16598_ACEOF
16599cat confdefs.h >>conftest.$ac_ext
16600cat >>conftest.$ac_ext <<_ACEOF
16601/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016602#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016603int
16604main ()
16605{
16606void *x=link
16607 ;
16608 return 0;
16609}
16610_ACEOF
16611rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016612if { (ac_try="$ac_compile"
16613case "(($ac_try" in
16614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16615 *) ac_try_echo=$ac_try;;
16616esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016618 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016620 grep -v '^ *+' conftest.er1 >conftest.err
16621 rm -f conftest.er1
16622 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016624 (exit $ac_status); } && {
16625 test -z "$ac_c_werror_flag" ||
16626 test ! -s conftest.err
16627 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016628
16629cat >>confdefs.h <<\_ACEOF
16630#define HAVE_LINK 1
16631_ACEOF
16632
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016633 { echo "$as_me:$LINENO: result: yes" >&5
16634echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016635else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016637sed 's/^/| /' conftest.$ac_ext >&5
16638
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016639 { echo "$as_me:$LINENO: result: no" >&5
16640echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016641
16642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016643
16644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016645{ echo "$as_me:$LINENO: checking for symlink" >&5
16646echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016647cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016648/* confdefs.h. */
16649_ACEOF
16650cat confdefs.h >>conftest.$ac_ext
16651cat >>conftest.$ac_ext <<_ACEOF
16652/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016653#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016654int
16655main ()
16656{
16657void *x=symlink
16658 ;
16659 return 0;
16660}
16661_ACEOF
16662rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016663if { (ac_try="$ac_compile"
16664case "(($ac_try" in
16665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16666 *) ac_try_echo=$ac_try;;
16667esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016671 grep -v '^ *+' conftest.er1 >conftest.err
16672 rm -f conftest.er1
16673 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016675 (exit $ac_status); } && {
16676 test -z "$ac_c_werror_flag" ||
16677 test ! -s conftest.err
16678 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016679
16680cat >>confdefs.h <<\_ACEOF
16681#define HAVE_SYMLINK 1
16682_ACEOF
16683
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016684 { echo "$as_me:$LINENO: result: yes" >&5
16685echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016686else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016688sed 's/^/| /' conftest.$ac_ext >&5
16689
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016690 { echo "$as_me:$LINENO: result: no" >&5
16691echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016692
16693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016694
16695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016696{ echo "$as_me:$LINENO: checking for fchdir" >&5
16697echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016698cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016699/* confdefs.h. */
16700_ACEOF
16701cat confdefs.h >>conftest.$ac_ext
16702cat >>conftest.$ac_ext <<_ACEOF
16703/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016704#include <unistd.h>
16705int
16706main ()
16707{
16708void *x=fchdir
16709 ;
16710 return 0;
16711}
16712_ACEOF
16713rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016714if { (ac_try="$ac_compile"
16715case "(($ac_try" in
16716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16717 *) ac_try_echo=$ac_try;;
16718esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016720 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016722 grep -v '^ *+' conftest.er1 >conftest.err
16723 rm -f conftest.er1
16724 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016726 (exit $ac_status); } && {
16727 test -z "$ac_c_werror_flag" ||
16728 test ! -s conftest.err
16729 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016730
16731cat >>confdefs.h <<\_ACEOF
16732#define HAVE_FCHDIR 1
16733_ACEOF
16734
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016735 { echo "$as_me:$LINENO: result: yes" >&5
16736echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016737else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016739sed 's/^/| /' conftest.$ac_ext >&5
16740
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016741 { echo "$as_me:$LINENO: result: no" >&5
16742echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016743
16744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016745
16746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016747{ echo "$as_me:$LINENO: checking for fsync" >&5
16748echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016749cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016750/* confdefs.h. */
16751_ACEOF
16752cat confdefs.h >>conftest.$ac_ext
16753cat >>conftest.$ac_ext <<_ACEOF
16754/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016755#include <unistd.h>
16756int
16757main ()
16758{
16759void *x=fsync
16760 ;
16761 return 0;
16762}
16763_ACEOF
16764rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016765if { (ac_try="$ac_compile"
16766case "(($ac_try" in
16767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16768 *) ac_try_echo=$ac_try;;
16769esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016771 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016773 grep -v '^ *+' conftest.er1 >conftest.err
16774 rm -f conftest.er1
16775 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016777 (exit $ac_status); } && {
16778 test -z "$ac_c_werror_flag" ||
16779 test ! -s conftest.err
16780 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016781
16782cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016783#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016784_ACEOF
16785
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016786 { echo "$as_me:$LINENO: result: yes" >&5
16787echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016788else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016790sed 's/^/| /' conftest.$ac_ext >&5
16791
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016792 { echo "$as_me:$LINENO: result: no" >&5
16793echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016794
16795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016796
16797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016798{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16799echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016800cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016801/* confdefs.h. */
16802_ACEOF
16803cat confdefs.h >>conftest.$ac_ext
16804cat >>conftest.$ac_ext <<_ACEOF
16805/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016806#include <unistd.h>
16807int
16808main ()
16809{
16810void *x=fdatasync
16811 ;
16812 return 0;
16813}
16814_ACEOF
16815rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016816if { (ac_try="$ac_compile"
16817case "(($ac_try" in
16818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16819 *) ac_try_echo=$ac_try;;
16820esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016822 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016824 grep -v '^ *+' conftest.er1 >conftest.err
16825 rm -f conftest.er1
16826 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016828 (exit $ac_status); } && {
16829 test -z "$ac_c_werror_flag" ||
16830 test ! -s conftest.err
16831 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016832
16833cat >>confdefs.h <<\_ACEOF
16834#define HAVE_FDATASYNC 1
16835_ACEOF
16836
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016837 { echo "$as_me:$LINENO: result: yes" >&5
16838echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016839else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016841sed 's/^/| /' conftest.$ac_ext >&5
16842
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016843 { echo "$as_me:$LINENO: result: no" >&5
16844echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016845
16846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016847
16848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016849{ echo "$as_me:$LINENO: checking for epoll" >&5
16850echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016851cat >conftest.$ac_ext <<_ACEOF
16852/* confdefs.h. */
16853_ACEOF
16854cat confdefs.h >>conftest.$ac_ext
16855cat >>conftest.$ac_ext <<_ACEOF
16856/* end confdefs.h. */
16857#include <sys/epoll.h>
16858int
16859main ()
16860{
16861void *x=epoll_create
16862 ;
16863 return 0;
16864}
16865_ACEOF
16866rm -f conftest.$ac_objext
16867if { (ac_try="$ac_compile"
16868case "(($ac_try" in
16869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16870 *) ac_try_echo=$ac_try;;
16871esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016873 (eval "$ac_compile") 2>conftest.er1
16874 ac_status=$?
16875 grep -v '^ *+' conftest.er1 >conftest.err
16876 rm -f conftest.er1
16877 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016879 (exit $ac_status); } && {
16880 test -z "$ac_c_werror_flag" ||
16881 test ! -s conftest.err
16882 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016883
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016884cat >>confdefs.h <<\_ACEOF
16885#define HAVE_EPOLL 1
16886_ACEOF
16887
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016888 { echo "$as_me:$LINENO: result: yes" >&5
16889echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016890else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016891 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016892sed 's/^/| /' conftest.$ac_ext >&5
16893
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016894 { echo "$as_me:$LINENO: result: no" >&5
16895echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016896
16897fi
16898
16899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016900{ echo "$as_me:$LINENO: checking for kqueue" >&5
16901echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016902cat >conftest.$ac_ext <<_ACEOF
16903/* confdefs.h. */
16904_ACEOF
16905cat confdefs.h >>conftest.$ac_ext
16906cat >>conftest.$ac_ext <<_ACEOF
16907/* end confdefs.h. */
16908
16909#include <sys/types.h>
16910#include <sys/event.h>
16911
16912int
16913main ()
16914{
16915int x=kqueue()
16916 ;
16917 return 0;
16918}
16919_ACEOF
16920rm -f conftest.$ac_objext
16921if { (ac_try="$ac_compile"
16922case "(($ac_try" in
16923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16924 *) ac_try_echo=$ac_try;;
16925esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016927 (eval "$ac_compile") 2>conftest.er1
16928 ac_status=$?
16929 grep -v '^ *+' conftest.er1 >conftest.err
16930 rm -f conftest.er1
16931 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016933 (exit $ac_status); } && {
16934 test -z "$ac_c_werror_flag" ||
16935 test ! -s conftest.err
16936 } && test -s conftest.$ac_objext; then
16937
16938cat >>confdefs.h <<\_ACEOF
16939#define HAVE_KQUEUE 1
16940_ACEOF
16941
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016942 { echo "$as_me:$LINENO: result: yes" >&5
16943echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016944else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016945 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016946sed 's/^/| /' conftest.$ac_ext >&5
16947
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016948 { echo "$as_me:$LINENO: result: no" >&5
16949echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016950
16951fi
16952
16953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016954# On some systems (eg. FreeBSD 5), we would find a definition of the
16955# functions ctermid_r, setgroups in the library, but no prototype
16956# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16957# address to avoid compiler warnings and potential miscompilations
16958# because of the missing prototypes.
16959
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016960{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16961echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016962cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016963/* confdefs.h. */
16964_ACEOF
16965cat confdefs.h >>conftest.$ac_ext
16966cat >>conftest.$ac_ext <<_ACEOF
16967/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016968
16969#include "confdefs.h"
16970#include <stdio.h>
16971
Martin v. Löwisd5843682002-11-21 20:41:28 +000016972int
16973main ()
16974{
16975void* p = ctermid_r
16976 ;
16977 return 0;
16978}
16979_ACEOF
16980rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016981if { (ac_try="$ac_compile"
16982case "(($ac_try" in
16983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16984 *) ac_try_echo=$ac_try;;
16985esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016987 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016989 grep -v '^ *+' conftest.er1 >conftest.err
16990 rm -f conftest.er1
16991 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016993 (exit $ac_status); } && {
16994 test -z "$ac_c_werror_flag" ||
16995 test ! -s conftest.err
16996 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016997
16998cat >>confdefs.h <<\_ACEOF
16999#define HAVE_CTERMID_R 1
17000_ACEOF
17001
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017002 { echo "$as_me:$LINENO: result: yes" >&5
17003echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017004else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017006sed 's/^/| /' conftest.$ac_ext >&5
17007
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017008 { echo "$as_me:$LINENO: result: no" >&5
17009echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017010
17011fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17014
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017015{ echo "$as_me:$LINENO: checking for flock" >&5
17016echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017017cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017018/* confdefs.h. */
17019_ACEOF
17020cat confdefs.h >>conftest.$ac_ext
17021cat >>conftest.$ac_ext <<_ACEOF
17022/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017023
17024#include "confdefs.h"
17025#include <sys/file.h>
17026
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017027int
17028main ()
17029{
17030void* p = flock
17031 ;
17032 return 0;
17033}
17034_ACEOF
17035rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017036if { (ac_try="$ac_compile"
17037case "(($ac_try" in
17038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17039 *) ac_try_echo=$ac_try;;
17040esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017042 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017044 grep -v '^ *+' conftest.er1 >conftest.err
17045 rm -f conftest.er1
17046 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017048 (exit $ac_status); } && {
17049 test -z "$ac_c_werror_flag" ||
17050 test ! -s conftest.err
17051 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017052
17053cat >>confdefs.h <<\_ACEOF
17054#define HAVE_FLOCK 1
17055_ACEOF
17056
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017057 { echo "$as_me:$LINENO: result: yes" >&5
17058echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017059else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017061sed 's/^/| /' conftest.$ac_ext >&5
17062
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017063 { echo "$as_me:$LINENO: result: no" >&5
17064echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017065
17066fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17069
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017070{ echo "$as_me:$LINENO: checking for getpagesize" >&5
17071echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017072cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017073/* confdefs.h. */
17074_ACEOF
17075cat confdefs.h >>conftest.$ac_ext
17076cat >>conftest.$ac_ext <<_ACEOF
17077/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017078
17079#include "confdefs.h"
17080#include <unistd.h>
17081
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017082int
17083main ()
17084{
17085void* p = getpagesize
17086 ;
17087 return 0;
17088}
17089_ACEOF
17090rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017091if { (ac_try="$ac_compile"
17092case "(($ac_try" in
17093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17094 *) ac_try_echo=$ac_try;;
17095esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017097 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017098 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017099 grep -v '^ *+' conftest.er1 >conftest.err
17100 rm -f conftest.er1
17101 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017103 (exit $ac_status); } && {
17104 test -z "$ac_c_werror_flag" ||
17105 test ! -s conftest.err
17106 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017107
17108cat >>confdefs.h <<\_ACEOF
17109#define HAVE_GETPAGESIZE 1
17110_ACEOF
17111
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017112 { echo "$as_me:$LINENO: result: yes" >&5
17113echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017114else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017116sed 's/^/| /' conftest.$ac_ext >&5
17117
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017118 { echo "$as_me:$LINENO: result: no" >&5
17119echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017120
17121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017122
17123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017124
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017125for ac_prog in true
17126do
17127 # Extract the first word of "$ac_prog", so it can be a program name with args.
17128set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017129{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17130echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017131if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017132 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017133else
17134 if test -n "$TRUE"; then
17135 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17136else
17137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17138for as_dir in $PATH
17139do
17140 IFS=$as_save_IFS
17141 test -z "$as_dir" && as_dir=.
17142 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017143 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 +000017144 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017145 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017146 break 2
17147 fi
17148done
17149done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017150IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017151
17152fi
17153fi
17154TRUE=$ac_cv_prog_TRUE
17155if test -n "$TRUE"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017156 { echo "$as_me:$LINENO: result: $TRUE" >&5
17157echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017158else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017159 { echo "$as_me:$LINENO: result: no" >&5
17160echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017161fi
17162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017163
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017164 test -n "$TRUE" && break
17165done
17166test -n "$TRUE" || TRUE="/bin/true"
17167
17168
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017169{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17170echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017171if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017172 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017173else
17174 ac_check_lib_save_LIBS=$LIBS
17175LIBS="-lc $LIBS"
17176cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017177/* confdefs.h. */
17178_ACEOF
17179cat confdefs.h >>conftest.$ac_ext
17180cat >>conftest.$ac_ext <<_ACEOF
17181/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017183/* Override any GCC internal prototype to avoid an error.
17184 Use char because int might match the return type of a GCC
17185 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017186#ifdef __cplusplus
17187extern "C"
17188#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017189char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017190int
17191main ()
17192{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017193return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017194 ;
17195 return 0;
17196}
17197_ACEOF
17198rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017199if { (ac_try="$ac_link"
17200case "(($ac_try" in
17201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17202 *) ac_try_echo=$ac_try;;
17203esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017205 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017207 grep -v '^ *+' conftest.er1 >conftest.err
17208 rm -f conftest.er1
17209 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017211 (exit $ac_status); } && {
17212 test -z "$ac_c_werror_flag" ||
17213 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017214 } && test -s conftest$ac_exeext &&
17215 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017216 ac_cv_lib_c_inet_aton=yes
17217else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017219sed 's/^/| /' conftest.$ac_ext >&5
17220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017221 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017223
17224rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017225 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017226LIBS=$ac_check_lib_save_LIBS
17227fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017228{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17229echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
17230if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017231 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017232else
17233
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017234{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17235echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017236if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017237 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017238else
17239 ac_check_lib_save_LIBS=$LIBS
17240LIBS="-lresolv $LIBS"
17241cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017242/* confdefs.h. */
17243_ACEOF
17244cat confdefs.h >>conftest.$ac_ext
17245cat >>conftest.$ac_ext <<_ACEOF
17246/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017248/* Override any GCC internal prototype to avoid an error.
17249 Use char because int might match the return type of a GCC
17250 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017251#ifdef __cplusplus
17252extern "C"
17253#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017254char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017255int
17256main ()
17257{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017258return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017259 ;
17260 return 0;
17261}
17262_ACEOF
17263rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017264if { (ac_try="$ac_link"
17265case "(($ac_try" in
17266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17267 *) ac_try_echo=$ac_try;;
17268esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017270 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017272 grep -v '^ *+' conftest.er1 >conftest.err
17273 rm -f conftest.er1
17274 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017276 (exit $ac_status); } && {
17277 test -z "$ac_c_werror_flag" ||
17278 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017279 } && test -s conftest$ac_exeext &&
17280 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017281 ac_cv_lib_resolv_inet_aton=yes
17282else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017283 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017284sed 's/^/| /' conftest.$ac_ext >&5
17285
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017286 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017288
17289rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017290 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017291LIBS=$ac_check_lib_save_LIBS
17292fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017293{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17294echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
17295if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017296 cat >>confdefs.h <<_ACEOF
17297#define HAVE_LIBRESOLV 1
17298_ACEOF
17299
17300 LIBS="-lresolv $LIBS"
17301
17302fi
17303
17304
17305fi
17306
17307
Christian Heimesd0764e22007-12-04 15:00:33 +000017308# On Tru64, chflags seems to be present, but calling it will
17309# exit Python
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017310{ echo "$as_me:$LINENO: checking for chflags" >&5
17311echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017312if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017313 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017314See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017315echo "$as_me: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017316See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017317 { (exit 1); exit 1; }; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017318else
17319 cat >conftest.$ac_ext <<_ACEOF
17320/* confdefs.h. */
17321_ACEOF
17322cat confdefs.h >>conftest.$ac_ext
17323cat >>conftest.$ac_ext <<_ACEOF
17324/* end confdefs.h. */
17325
17326#include <sys/stat.h>
17327#include <unistd.h>
17328int main(int argc, char*argv[])
17329{
17330 if(chflags(argv[0], 0) != 0)
17331 return 1;
17332 return 0;
17333}
17334
17335_ACEOF
17336rm -f conftest$ac_exeext
17337if { (ac_try="$ac_link"
17338case "(($ac_try" in
17339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17340 *) ac_try_echo=$ac_try;;
17341esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017343 (eval "$ac_link") 2>&5
17344 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017346 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17347 { (case "(($ac_try" in
17348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17349 *) ac_try_echo=$ac_try;;
17350esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017352 (eval "$ac_try") 2>&5
17353 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017355 (exit $ac_status); }; }; then
17356
17357cat >>confdefs.h <<\_ACEOF
17358#define HAVE_CHFLAGS 1
17359_ACEOF
17360
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017361 { echo "$as_me:$LINENO: result: yes" >&5
17362echo "${ECHO_T}yes" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017363else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017364 echo "$as_me: program exited with status $ac_status" >&5
17365echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017366sed 's/^/| /' conftest.$ac_ext >&5
17367
17368( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017369{ echo "$as_me:$LINENO: result: no" >&5
17370echo "${ECHO_T}no" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017371
17372fi
17373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17374fi
17375
17376
17377
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017378{ echo "$as_me:$LINENO: checking for lchflags" >&5
17379echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017380if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017381 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017382See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017383echo "$as_me: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017384See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017385 { (exit 1); exit 1; }; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017386else
17387 cat >conftest.$ac_ext <<_ACEOF
17388/* confdefs.h. */
17389_ACEOF
17390cat confdefs.h >>conftest.$ac_ext
17391cat >>conftest.$ac_ext <<_ACEOF
17392/* end confdefs.h. */
17393
17394#include <sys/stat.h>
17395#include <unistd.h>
17396int main(int argc, char*argv[])
17397{
17398 if(lchflags(argv[0], 0) != 0)
17399 return 1;
17400 return 0;
17401}
17402
17403_ACEOF
17404rm -f conftest$ac_exeext
17405if { (ac_try="$ac_link"
17406case "(($ac_try" in
17407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17408 *) ac_try_echo=$ac_try;;
17409esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017411 (eval "$ac_link") 2>&5
17412 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017414 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17415 { (case "(($ac_try" in
17416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17417 *) ac_try_echo=$ac_try;;
17418esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017420 (eval "$ac_try") 2>&5
17421 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017423 (exit $ac_status); }; }; then
17424
17425cat >>confdefs.h <<\_ACEOF
17426#define HAVE_LCHFLAGS 1
17427_ACEOF
17428
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017429 { echo "$as_me:$LINENO: result: yes" >&5
17430echo "${ECHO_T}yes" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017431else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017432 echo "$as_me: program exited with status $ac_status" >&5
17433echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017434sed 's/^/| /' conftest.$ac_ext >&5
17435
17436( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017437{ echo "$as_me:$LINENO: result: no" >&5
17438echo "${ECHO_T}no" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017439
17440fi
17441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17442fi
17443
17444
17445
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017446case $ac_sys_system/$ac_sys_release in
17447Darwin/*)
17448 _CUR_CFLAGS="${CFLAGS}"
17449 _CUR_LDFLAGS="${LDFLAGS}"
17450 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17451 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17452 ;;
17453esac
17454
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017455{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17456echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017457if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017458 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017459else
17460 ac_check_lib_save_LIBS=$LIBS
17461LIBS="-lz $LIBS"
17462cat >conftest.$ac_ext <<_ACEOF
17463/* confdefs.h. */
17464_ACEOF
17465cat confdefs.h >>conftest.$ac_ext
17466cat >>conftest.$ac_ext <<_ACEOF
17467/* end confdefs.h. */
17468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017469/* Override any GCC internal prototype to avoid an error.
17470 Use char because int might match the return type of a GCC
17471 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017472#ifdef __cplusplus
17473extern "C"
17474#endif
17475char inflateCopy ();
17476int
17477main ()
17478{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017479return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017480 ;
17481 return 0;
17482}
17483_ACEOF
17484rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017485if { (ac_try="$ac_link"
17486case "(($ac_try" in
17487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17488 *) ac_try_echo=$ac_try;;
17489esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017491 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017492 ac_status=$?
17493 grep -v '^ *+' conftest.er1 >conftest.err
17494 rm -f conftest.er1
17495 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017497 (exit $ac_status); } && {
17498 test -z "$ac_c_werror_flag" ||
17499 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017500 } && test -s conftest$ac_exeext &&
17501 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017502 ac_cv_lib_z_inflateCopy=yes
17503else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017504 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017505sed 's/^/| /' conftest.$ac_ext >&5
17506
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017507 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017509
17510rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017511 conftest$ac_exeext conftest.$ac_ext
17512LIBS=$ac_check_lib_save_LIBS
17513fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017514{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17515echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
17516if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017517
17518cat >>confdefs.h <<\_ACEOF
17519#define HAVE_ZLIB_COPY 1
17520_ACEOF
17521
17522fi
17523
17524
17525case $ac_sys_system/$ac_sys_release in
17526Darwin/*)
17527 CFLAGS="${_CUR_CFLAGS}"
17528 LDFLAGS="${_CUR_LDFLAGS}"
17529 ;;
17530esac
17531
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017532{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17533echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017534cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017535/* confdefs.h. */
17536_ACEOF
17537cat confdefs.h >>conftest.$ac_ext
17538cat >>conftest.$ac_ext <<_ACEOF
17539/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017540
17541#include "confdefs.h"
17542#include <netdb.h>
17543
Martin v. Löwise9416172003-05-03 10:12:45 +000017544int
17545main ()
17546{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017547void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017548 ;
17549 return 0;
17550}
17551_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017552rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017553if { (ac_try="$ac_link"
17554case "(($ac_try" in
17555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17556 *) ac_try_echo=$ac_try;;
17557esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017559 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017561 grep -v '^ *+' conftest.er1 >conftest.err
17562 rm -f conftest.er1
17563 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017565 (exit $ac_status); } && {
17566 test -z "$ac_c_werror_flag" ||
17567 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017568 } && test -s conftest$ac_exeext &&
17569 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017570
17571cat >>confdefs.h <<\_ACEOF
17572#define HAVE_HSTRERROR 1
17573_ACEOF
17574
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017575 { echo "$as_me:$LINENO: result: yes" >&5
17576echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017577else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017579sed 's/^/| /' conftest.$ac_ext >&5
17580
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017581 { echo "$as_me:$LINENO: result: no" >&5
17582echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017583
17584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017585
17586rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017587 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017588
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017589{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17590echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017591cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017592/* confdefs.h. */
17593_ACEOF
17594cat confdefs.h >>conftest.$ac_ext
17595cat >>conftest.$ac_ext <<_ACEOF
17596/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017597
17598#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017599#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017600#include <sys/socket.h>
17601#include <netinet/in.h>
17602#include <arpa/inet.h>
17603
Martin v. Löwise9416172003-05-03 10:12:45 +000017604int
17605main ()
17606{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017607void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017608 ;
17609 return 0;
17610}
17611_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017612rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017613if { (ac_try="$ac_link"
17614case "(($ac_try" in
17615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17616 *) ac_try_echo=$ac_try;;
17617esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017619 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017621 grep -v '^ *+' conftest.er1 >conftest.err
17622 rm -f conftest.er1
17623 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017625 (exit $ac_status); } && {
17626 test -z "$ac_c_werror_flag" ||
17627 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017628 } && test -s conftest$ac_exeext &&
17629 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017630
17631cat >>confdefs.h <<\_ACEOF
17632#define HAVE_INET_ATON 1
17633_ACEOF
17634
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017635 { echo "$as_me:$LINENO: result: yes" >&5
17636echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017637else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017639sed 's/^/| /' conftest.$ac_ext >&5
17640
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017641 { echo "$as_me:$LINENO: result: no" >&5
17642echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017643
17644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017645
17646rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017647 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017648
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017649{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17650echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017651cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017652/* confdefs.h. */
17653_ACEOF
17654cat confdefs.h >>conftest.$ac_ext
17655cat >>conftest.$ac_ext <<_ACEOF
17656/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017657
17658#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017659#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017660#include <sys/socket.h>
17661#include <netinet/in.h>
17662#include <arpa/inet.h>
17663
Martin v. Löwise9416172003-05-03 10:12:45 +000017664int
17665main ()
17666{
17667void* p = inet_pton
17668 ;
17669 return 0;
17670}
17671_ACEOF
17672rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017673if { (ac_try="$ac_compile"
17674case "(($ac_try" in
17675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17676 *) ac_try_echo=$ac_try;;
17677esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017679 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017680 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017681 grep -v '^ *+' conftest.er1 >conftest.err
17682 rm -f conftest.er1
17683 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017685 (exit $ac_status); } && {
17686 test -z "$ac_c_werror_flag" ||
17687 test ! -s conftest.err
17688 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017689
17690cat >>confdefs.h <<\_ACEOF
17691#define HAVE_INET_PTON 1
17692_ACEOF
17693
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017694 { echo "$as_me:$LINENO: result: yes" >&5
17695echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017696else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017698sed 's/^/| /' conftest.$ac_ext >&5
17699
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017700 { echo "$as_me:$LINENO: result: no" >&5
17701echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017702
17703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017704
17705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017706
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017707# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017708{ echo "$as_me:$LINENO: checking for setgroups" >&5
17709echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017710cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017711/* confdefs.h. */
17712_ACEOF
17713cat confdefs.h >>conftest.$ac_ext
17714cat >>conftest.$ac_ext <<_ACEOF
17715/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017716
17717#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017718#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017719#ifdef HAVE_GRP_H
17720#include <grp.h>
17721#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017722
Martin v. Löwisd5843682002-11-21 20:41:28 +000017723int
17724main ()
17725{
17726void* p = setgroups
17727 ;
17728 return 0;
17729}
17730_ACEOF
17731rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017732if { (ac_try="$ac_compile"
17733case "(($ac_try" in
17734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17735 *) ac_try_echo=$ac_try;;
17736esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017738 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017740 grep -v '^ *+' conftest.er1 >conftest.err
17741 rm -f conftest.er1
17742 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017744 (exit $ac_status); } && {
17745 test -z "$ac_c_werror_flag" ||
17746 test ! -s conftest.err
17747 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017748
17749cat >>confdefs.h <<\_ACEOF
17750#define HAVE_SETGROUPS 1
17751_ACEOF
17752
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017753 { echo "$as_me:$LINENO: result: yes" >&5
17754echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017755else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017757sed 's/^/| /' conftest.$ac_ext >&5
17758
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017759 { echo "$as_me:$LINENO: result: no" >&5
17760echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017761
17762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017763
17764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017765
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017766# check for openpty and forkpty
17767
Martin v. Löwis11437992002-04-12 09:54:03 +000017768
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017769for ac_func in openpty
17770do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017771as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17772{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17773echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017774if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017775 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017776else
Martin v. Löwis11437992002-04-12 09:54:03 +000017777 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017778/* confdefs.h. */
17779_ACEOF
17780cat confdefs.h >>conftest.$ac_ext
17781cat >>conftest.$ac_ext <<_ACEOF
17782/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017783/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17784 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17785#define $ac_func innocuous_$ac_func
17786
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017787/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017788 which can conflict with char $ac_func (); below.
17789 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017790 <limits.h> exists even on freestanding compilers. */
17791
17792#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017793# include <limits.h>
17794#else
17795# include <assert.h>
17796#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017797
17798#undef $ac_func
17799
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017800/* Override any GCC internal prototype to avoid an error.
17801 Use char because int might match the return type of a GCC
17802 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017803#ifdef __cplusplus
17804extern "C"
17805#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017806char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017807/* The GNU C library defines this for functions which it implements
17808 to always fail with ENOSYS. Some functions are actually named
17809 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017810#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017811choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017812#endif
17813
Skip Montanaro6dead952003-09-25 14:50:04 +000017814int
17815main ()
17816{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017817return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017818 ;
17819 return 0;
17820}
17821_ACEOF
17822rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017823if { (ac_try="$ac_link"
17824case "(($ac_try" in
17825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17826 *) ac_try_echo=$ac_try;;
17827esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017829 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017831 grep -v '^ *+' conftest.er1 >conftest.err
17832 rm -f conftest.er1
17833 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017835 (exit $ac_status); } && {
17836 test -z "$ac_c_werror_flag" ||
17837 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017838 } && test -s conftest$ac_exeext &&
17839 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017840 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017841else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017843sed 's/^/| /' conftest.$ac_ext >&5
17844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017845 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017847
17848rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017849 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017850fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017851ac_res=`eval echo '${'$as_ac_var'}'`
17852 { echo "$as_me:$LINENO: result: $ac_res" >&5
17853echo "${ECHO_T}$ac_res" >&6; }
17854if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017855 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017856#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017857_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017858
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017859else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017860 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17861echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017862if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017863 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017864else
Martin v. Löwis11437992002-04-12 09:54:03 +000017865 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017866LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017867cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017868/* confdefs.h. */
17869_ACEOF
17870cat confdefs.h >>conftest.$ac_ext
17871cat >>conftest.$ac_ext <<_ACEOF
17872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017874/* Override any GCC internal prototype to avoid an error.
17875 Use char because int might match the return type of a GCC
17876 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017877#ifdef __cplusplus
17878extern "C"
17879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017880char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017881int
17882main ()
17883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017884return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017885 ;
17886 return 0;
17887}
17888_ACEOF
17889rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017890if { (ac_try="$ac_link"
17891case "(($ac_try" in
17892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17893 *) ac_try_echo=$ac_try;;
17894esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017896 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017897 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017898 grep -v '^ *+' conftest.er1 >conftest.err
17899 rm -f conftest.er1
17900 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902 (exit $ac_status); } && {
17903 test -z "$ac_c_werror_flag" ||
17904 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017905 } && test -s conftest$ac_exeext &&
17906 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017907 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017908else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017910sed 's/^/| /' conftest.$ac_ext >&5
17911
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017912 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017914
17915rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017916 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017917LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017918fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017919{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17920echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
17921if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017922 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017923#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017924_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017925 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017926else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017927 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17928echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017929if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017930 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017931else
17932 ac_check_lib_save_LIBS=$LIBS
17933LIBS="-lbsd $LIBS"
17934cat >conftest.$ac_ext <<_ACEOF
17935/* confdefs.h. */
17936_ACEOF
17937cat confdefs.h >>conftest.$ac_ext
17938cat >>conftest.$ac_ext <<_ACEOF
17939/* end confdefs.h. */
17940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017941/* Override any GCC internal prototype to avoid an error.
17942 Use char because int might match the return type of a GCC
17943 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017944#ifdef __cplusplus
17945extern "C"
17946#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017947char openpty ();
17948int
17949main ()
17950{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017951return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017952 ;
17953 return 0;
17954}
17955_ACEOF
17956rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017957if { (ac_try="$ac_link"
17958case "(($ac_try" in
17959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17960 *) ac_try_echo=$ac_try;;
17961esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017963 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017964 ac_status=$?
17965 grep -v '^ *+' conftest.er1 >conftest.err
17966 rm -f conftest.er1
17967 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017969 (exit $ac_status); } && {
17970 test -z "$ac_c_werror_flag" ||
17971 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017972 } && test -s conftest$ac_exeext &&
17973 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017974 ac_cv_lib_bsd_openpty=yes
17975else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017976 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017977sed 's/^/| /' conftest.$ac_ext >&5
17978
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017979 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017980fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017981
17982rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017983 conftest$ac_exeext conftest.$ac_ext
17984LIBS=$ac_check_lib_save_LIBS
17985fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017986{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17987echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
17988if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017989 cat >>confdefs.h <<\_ACEOF
17990#define HAVE_OPENPTY 1
17991_ACEOF
17992 LIBS="$LIBS -lbsd"
17993fi
17994
17995
17996fi
17997
Fred Drake8cef4cf2000-06-28 16:40:38 +000017998
17999fi
18000done
18001
Martin v. Löwis11437992002-04-12 09:54:03 +000018002
Fred Drake8cef4cf2000-06-28 16:40:38 +000018003for ac_func in forkpty
18004do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018005as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18006{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18007echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018008if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018009 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018010else
Martin v. Löwis11437992002-04-12 09:54:03 +000018011 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018012/* confdefs.h. */
18013_ACEOF
18014cat confdefs.h >>conftest.$ac_ext
18015cat >>conftest.$ac_ext <<_ACEOF
18016/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018017/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18018 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18019#define $ac_func innocuous_$ac_func
18020
Fred Drake8cef4cf2000-06-28 16:40:38 +000018021/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018022 which can conflict with char $ac_func (); below.
18023 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018024 <limits.h> exists even on freestanding compilers. */
18025
18026#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018027# include <limits.h>
18028#else
18029# include <assert.h>
18030#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018031
18032#undef $ac_func
18033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018034/* Override any GCC internal prototype to avoid an error.
18035 Use char because int might match the return type of a GCC
18036 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018037#ifdef __cplusplus
18038extern "C"
18039#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018040char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018041/* The GNU C library defines this for functions which it implements
18042 to always fail with ENOSYS. Some functions are actually named
18043 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018044#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018045choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018046#endif
18047
Skip Montanaro6dead952003-09-25 14:50:04 +000018048int
18049main ()
18050{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018051return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018052 ;
18053 return 0;
18054}
18055_ACEOF
18056rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018057if { (ac_try="$ac_link"
18058case "(($ac_try" in
18059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18060 *) ac_try_echo=$ac_try;;
18061esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018063 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018065 grep -v '^ *+' conftest.er1 >conftest.err
18066 rm -f conftest.er1
18067 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018069 (exit $ac_status); } && {
18070 test -z "$ac_c_werror_flag" ||
18071 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018072 } && test -s conftest$ac_exeext &&
18073 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018074 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018075else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018076 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018077sed 's/^/| /' conftest.$ac_ext >&5
18078
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018079 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018081
18082rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018083 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018084fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018085ac_res=`eval echo '${'$as_ac_var'}'`
18086 { echo "$as_me:$LINENO: result: $ac_res" >&5
18087echo "${ECHO_T}$ac_res" >&6; }
18088if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018089 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018090#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018091_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018092
Fred Drake8cef4cf2000-06-28 16:40:38 +000018093else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018094 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18095echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018096if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018097 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018098else
Martin v. Löwis11437992002-04-12 09:54:03 +000018099 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018100LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018101cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018102/* confdefs.h. */
18103_ACEOF
18104cat confdefs.h >>conftest.$ac_ext
18105cat >>conftest.$ac_ext <<_ACEOF
18106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018108/* Override any GCC internal prototype to avoid an error.
18109 Use char because int might match the return type of a GCC
18110 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018111#ifdef __cplusplus
18112extern "C"
18113#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018114char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018115int
18116main ()
18117{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018118return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018119 ;
18120 return 0;
18121}
18122_ACEOF
18123rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018124if { (ac_try="$ac_link"
18125case "(($ac_try" in
18126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18127 *) ac_try_echo=$ac_try;;
18128esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018130 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018131 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018132 grep -v '^ *+' conftest.er1 >conftest.err
18133 rm -f conftest.er1
18134 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018136 (exit $ac_status); } && {
18137 test -z "$ac_c_werror_flag" ||
18138 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018139 } && test -s conftest$ac_exeext &&
18140 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018141 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018142else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018143 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018144sed 's/^/| /' conftest.$ac_ext >&5
18145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018146 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018148
18149rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018150 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018151LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018152fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018153{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18154echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
18155if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018156 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018157#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018158_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018159 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018160else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018161 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18162echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018163if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018164 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018165else
18166 ac_check_lib_save_LIBS=$LIBS
18167LIBS="-lbsd $LIBS"
18168cat >conftest.$ac_ext <<_ACEOF
18169/* confdefs.h. */
18170_ACEOF
18171cat confdefs.h >>conftest.$ac_ext
18172cat >>conftest.$ac_ext <<_ACEOF
18173/* end confdefs.h. */
18174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018175/* Override any GCC internal prototype to avoid an error.
18176 Use char because int might match the return type of a GCC
18177 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018178#ifdef __cplusplus
18179extern "C"
18180#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018181char forkpty ();
18182int
18183main ()
18184{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018185return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018186 ;
18187 return 0;
18188}
18189_ACEOF
18190rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018191if { (ac_try="$ac_link"
18192case "(($ac_try" in
18193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18194 *) ac_try_echo=$ac_try;;
18195esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018197 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018198 ac_status=$?
18199 grep -v '^ *+' conftest.er1 >conftest.err
18200 rm -f conftest.er1
18201 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018203 (exit $ac_status); } && {
18204 test -z "$ac_c_werror_flag" ||
18205 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018206 } && test -s conftest$ac_exeext &&
18207 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018208 ac_cv_lib_bsd_forkpty=yes
18209else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018210 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018211sed 's/^/| /' conftest.$ac_ext >&5
18212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018213 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018215
18216rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018217 conftest$ac_exeext conftest.$ac_ext
18218LIBS=$ac_check_lib_save_LIBS
18219fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018220{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18221echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
18222if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018223 cat >>confdefs.h <<\_ACEOF
18224#define HAVE_FORKPTY 1
18225_ACEOF
18226 LIBS="$LIBS -lbsd"
18227fi
18228
18229
18230fi
18231
Fred Drake8cef4cf2000-06-28 16:40:38 +000018232
18233fi
18234done
18235
Jack Jansendd19cf82001-12-06 22:36:17 +000018236
Christian Heimesb186d002008-03-18 15:15:01 +000018237# Stuff for expat.
18238
18239for ac_func in memmove
18240do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018241as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18242{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18243echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000018244if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018245 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000018246else
18247 cat >conftest.$ac_ext <<_ACEOF
18248/* confdefs.h. */
18249_ACEOF
18250cat confdefs.h >>conftest.$ac_ext
18251cat >>conftest.$ac_ext <<_ACEOF
18252/* end confdefs.h. */
18253/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18254 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18255#define $ac_func innocuous_$ac_func
18256
18257/* System header to define __stub macros and hopefully few prototypes,
18258 which can conflict with char $ac_func (); below.
18259 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18260 <limits.h> exists even on freestanding compilers. */
18261
18262#ifdef __STDC__
18263# include <limits.h>
18264#else
18265# include <assert.h>
18266#endif
18267
18268#undef $ac_func
18269
18270/* Override any GCC internal prototype to avoid an error.
18271 Use char because int might match the return type of a GCC
18272 builtin and then its argument prototype would still apply. */
18273#ifdef __cplusplus
18274extern "C"
18275#endif
18276char $ac_func ();
18277/* The GNU C library defines this for functions which it implements
18278 to always fail with ENOSYS. Some functions are actually named
18279 something starting with __ and the normal name is an alias. */
18280#if defined __stub_$ac_func || defined __stub___$ac_func
18281choke me
18282#endif
18283
18284int
18285main ()
18286{
18287return $ac_func ();
18288 ;
18289 return 0;
18290}
18291_ACEOF
18292rm -f conftest.$ac_objext conftest$ac_exeext
18293if { (ac_try="$ac_link"
18294case "(($ac_try" in
18295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18296 *) ac_try_echo=$ac_try;;
18297esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018299 (eval "$ac_link") 2>conftest.er1
18300 ac_status=$?
18301 grep -v '^ *+' conftest.er1 >conftest.err
18302 rm -f conftest.er1
18303 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018305 (exit $ac_status); } && {
18306 test -z "$ac_c_werror_flag" ||
18307 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018308 } && test -s conftest$ac_exeext &&
18309 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000018310 eval "$as_ac_var=yes"
18311else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018312 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018313sed 's/^/| /' conftest.$ac_ext >&5
18314
18315 eval "$as_ac_var=no"
18316fi
18317
18318rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18319 conftest$ac_exeext conftest.$ac_ext
18320fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018321ac_res=`eval echo '${'$as_ac_var'}'`
18322 { echo "$as_me:$LINENO: result: $ac_res" >&5
18323echo "${ECHO_T}$ac_res" >&6; }
18324if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000018325 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018326#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000018327_ACEOF
18328
18329fi
18330done
18331
18332
Michael W. Hudson54241132001-12-07 15:38:26 +000018333# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018334
18335
18336
18337
18338
18339
Fred Drake8cef4cf2000-06-28 16:40:38 +000018340for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18341do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018342as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18343{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18344echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018345if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018346 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018347else
Martin v. Löwis11437992002-04-12 09:54:03 +000018348 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018349/* confdefs.h. */
18350_ACEOF
18351cat confdefs.h >>conftest.$ac_ext
18352cat >>conftest.$ac_ext <<_ACEOF
18353/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018354/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18355 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18356#define $ac_func innocuous_$ac_func
18357
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018358/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018359 which can conflict with char $ac_func (); below.
18360 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018361 <limits.h> exists even on freestanding compilers. */
18362
18363#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018364# include <limits.h>
18365#else
18366# include <assert.h>
18367#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018368
18369#undef $ac_func
18370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018371/* Override any GCC internal prototype to avoid an error.
18372 Use char because int might match the return type of a GCC
18373 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018374#ifdef __cplusplus
18375extern "C"
18376#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018377char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018378/* The GNU C library defines this for functions which it implements
18379 to always fail with ENOSYS. Some functions are actually named
18380 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018381#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018382choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018383#endif
18384
Skip Montanaro6dead952003-09-25 14:50:04 +000018385int
18386main ()
18387{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018388return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018389 ;
18390 return 0;
18391}
18392_ACEOF
18393rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018394if { (ac_try="$ac_link"
18395case "(($ac_try" in
18396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18397 *) ac_try_echo=$ac_try;;
18398esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018400 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018402 grep -v '^ *+' conftest.er1 >conftest.err
18403 rm -f conftest.er1
18404 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018406 (exit $ac_status); } && {
18407 test -z "$ac_c_werror_flag" ||
18408 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018409 } && test -s conftest$ac_exeext &&
18410 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018411 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018412else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018414sed 's/^/| /' conftest.$ac_ext >&5
18415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018416 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018418
18419rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018420 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018421fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018422ac_res=`eval echo '${'$as_ac_var'}'`
18423 { echo "$as_me:$LINENO: result: $ac_res" >&5
18424echo "${ECHO_T}$ac_res" >&6; }
18425if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018426 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018427#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018428_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018429
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018430fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018431done
18432
Michael W. Hudson54241132001-12-07 15:38:26 +000018433
Martin v. Löwis11437992002-04-12 09:54:03 +000018434
18435
18436
Christian Heimesb186d002008-03-18 15:15:01 +000018437for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018438do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018439as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18440{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18441echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018442if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018443 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018444else
Martin v. Löwis11437992002-04-12 09:54:03 +000018445 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018446/* confdefs.h. */
18447_ACEOF
18448cat confdefs.h >>conftest.$ac_ext
18449cat >>conftest.$ac_ext <<_ACEOF
18450/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018451/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18452 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18453#define $ac_func innocuous_$ac_func
18454
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018455/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018456 which can conflict with char $ac_func (); below.
18457 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018458 <limits.h> exists even on freestanding compilers. */
18459
18460#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018461# include <limits.h>
18462#else
18463# include <assert.h>
18464#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018465
18466#undef $ac_func
18467
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018468/* Override any GCC internal prototype to avoid an error.
18469 Use char because int might match the return type of a GCC
18470 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018471#ifdef __cplusplus
18472extern "C"
18473#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018474char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018475/* The GNU C library defines this for functions which it implements
18476 to always fail with ENOSYS. Some functions are actually named
18477 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018478#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018479choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018480#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018481
Skip Montanaro6dead952003-09-25 14:50:04 +000018482int
18483main ()
18484{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018485return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018486 ;
18487 return 0;
18488}
18489_ACEOF
18490rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018491if { (ac_try="$ac_link"
18492case "(($ac_try" in
18493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18494 *) ac_try_echo=$ac_try;;
18495esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018497 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018499 grep -v '^ *+' conftest.er1 >conftest.err
18500 rm -f conftest.er1
18501 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018503 (exit $ac_status); } && {
18504 test -z "$ac_c_werror_flag" ||
18505 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018506 } && test -s conftest$ac_exeext &&
18507 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018508 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018509else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018511sed 's/^/| /' conftest.$ac_ext >&5
18512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018513 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018515
18516rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018517 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018518fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018519ac_res=`eval echo '${'$as_ac_var'}'`
18520 { echo "$as_me:$LINENO: result: $ac_res" >&5
18521echo "${ECHO_T}$ac_res" >&6; }
18522if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018523 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018524#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018525_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018526
Martin v. Löwis1142de32002-03-29 16:28:31 +000018527else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018528 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018529 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018530 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18531 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018532esac
18533
Martin v. Löwis1142de32002-03-29 16:28:31 +000018534fi
18535done
18536
18537
Martin v. Löwis11437992002-04-12 09:54:03 +000018538
Martin v. Löwis1142de32002-03-29 16:28:31 +000018539for ac_func in getpgrp
18540do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018541as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18542{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18543echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018544if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018545 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018546else
Martin v. Löwis11437992002-04-12 09:54:03 +000018547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018548/* confdefs.h. */
18549_ACEOF
18550cat confdefs.h >>conftest.$ac_ext
18551cat >>conftest.$ac_ext <<_ACEOF
18552/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018553/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18554 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18555#define $ac_func innocuous_$ac_func
18556
Martin v. Löwis1142de32002-03-29 16:28:31 +000018557/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018558 which can conflict with char $ac_func (); below.
18559 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018560 <limits.h> exists even on freestanding compilers. */
18561
18562#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018563# include <limits.h>
18564#else
18565# include <assert.h>
18566#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018567
18568#undef $ac_func
18569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018570/* Override any GCC internal prototype to avoid an error.
18571 Use char because int might match the return type of a GCC
18572 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018573#ifdef __cplusplus
18574extern "C"
18575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018576char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018577/* The GNU C library defines this for functions which it implements
18578 to always fail with ENOSYS. Some functions are actually named
18579 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018580#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018581choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018582#endif
18583
Skip Montanaro6dead952003-09-25 14:50:04 +000018584int
18585main ()
18586{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018587return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018588 ;
18589 return 0;
18590}
18591_ACEOF
18592rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018593if { (ac_try="$ac_link"
18594case "(($ac_try" in
18595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18596 *) ac_try_echo=$ac_try;;
18597esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018599 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018600 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018601 grep -v '^ *+' conftest.er1 >conftest.err
18602 rm -f conftest.er1
18603 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018605 (exit $ac_status); } && {
18606 test -z "$ac_c_werror_flag" ||
18607 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018608 } && test -s conftest$ac_exeext &&
18609 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018610 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018611else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018613sed 's/^/| /' conftest.$ac_ext >&5
18614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018615 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018617
18618rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018619 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018620fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018621ac_res=`eval echo '${'$as_ac_var'}'`
18622 { echo "$as_me:$LINENO: result: $ac_res" >&5
18623echo "${ECHO_T}$ac_res" >&6; }
18624if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018625 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018626#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018627_ACEOF
18628 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018629/* confdefs.h. */
18630_ACEOF
18631cat confdefs.h >>conftest.$ac_ext
18632cat >>conftest.$ac_ext <<_ACEOF
18633/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018634#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018635int
18636main ()
18637{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018638getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018639 ;
18640 return 0;
18641}
18642_ACEOF
18643rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018644if { (ac_try="$ac_compile"
18645case "(($ac_try" in
18646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18647 *) ac_try_echo=$ac_try;;
18648esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018650 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018651 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018652 grep -v '^ *+' conftest.er1 >conftest.err
18653 rm -f conftest.er1
18654 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018656 (exit $ac_status); } && {
18657 test -z "$ac_c_werror_flag" ||
18658 test ! -s conftest.err
18659 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018660
18661cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018662#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018663_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018664
Martin v. Löwis11437992002-04-12 09:54:03 +000018665
Guido van Rossumf78abae1997-01-21 22:02:36 +000018666else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018668sed 's/^/| /' conftest.$ac_ext >&5
18669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018670
Guido van Rossum627b2d71993-12-24 10:39:16 +000018671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018672
18673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018674
Guido van Rossum627b2d71993-12-24 10:39:16 +000018675fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018676done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018677
Jack Jansen150753c2003-03-29 22:07:47 +000018678
18679for ac_func in setpgrp
18680do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018681as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18682{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18683echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018684if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018685 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018686else
Martin v. Löwis11437992002-04-12 09:54:03 +000018687 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018688/* confdefs.h. */
18689_ACEOF
18690cat confdefs.h >>conftest.$ac_ext
18691cat >>conftest.$ac_ext <<_ACEOF
18692/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018693/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18694 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18695#define $ac_func innocuous_$ac_func
18696
Jack Jansen150753c2003-03-29 22:07:47 +000018697/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018698 which can conflict with char $ac_func (); below.
18699 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018700 <limits.h> exists even on freestanding compilers. */
18701
18702#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018703# include <limits.h>
18704#else
18705# include <assert.h>
18706#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018707
18708#undef $ac_func
18709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018710/* Override any GCC internal prototype to avoid an error.
18711 Use char because int might match the return type of a GCC
18712 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018713#ifdef __cplusplus
18714extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018715#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018716char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018717/* The GNU C library defines this for functions which it implements
18718 to always fail with ENOSYS. Some functions are actually named
18719 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018720#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018721choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018722#endif
18723
Skip Montanaro6dead952003-09-25 14:50:04 +000018724int
18725main ()
18726{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018727return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018728 ;
18729 return 0;
18730}
18731_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018732rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018733if { (ac_try="$ac_link"
18734case "(($ac_try" in
18735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18736 *) ac_try_echo=$ac_try;;
18737esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018739 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018741 grep -v '^ *+' conftest.er1 >conftest.err
18742 rm -f conftest.er1
18743 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018745 (exit $ac_status); } && {
18746 test -z "$ac_c_werror_flag" ||
18747 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018748 } && test -s conftest$ac_exeext &&
18749 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018750 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018751else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018753sed 's/^/| /' conftest.$ac_ext >&5
18754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018755 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018757
18758rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018759 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018760fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018761ac_res=`eval echo '${'$as_ac_var'}'`
18762 { echo "$as_me:$LINENO: result: $ac_res" >&5
18763echo "${ECHO_T}$ac_res" >&6; }
18764if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000018765 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018766#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000018767_ACEOF
18768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018769/* confdefs.h. */
18770_ACEOF
18771cat confdefs.h >>conftest.$ac_ext
18772cat >>conftest.$ac_ext <<_ACEOF
18773/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018774#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018775int
18776main ()
18777{
18778setpgrp(0,0);
18779 ;
18780 return 0;
18781}
18782_ACEOF
18783rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018784if { (ac_try="$ac_compile"
18785case "(($ac_try" in
18786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18787 *) ac_try_echo=$ac_try;;
18788esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018790 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018791 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018792 grep -v '^ *+' conftest.er1 >conftest.err
18793 rm -f conftest.er1
18794 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018796 (exit $ac_status); } && {
18797 test -z "$ac_c_werror_flag" ||
18798 test ! -s conftest.err
18799 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018800
18801cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018802#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018803_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018804
Jack Jansen150753c2003-03-29 22:07:47 +000018805
18806else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018808sed 's/^/| /' conftest.$ac_ext >&5
18809
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018810
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018812
18813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018814
18815fi
18816done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018817
Martin v. Löwis11437992002-04-12 09:54:03 +000018818
Thomas Wouters3a584202000-08-05 23:28:51 +000018819for ac_func in gettimeofday
18820do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018821as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18822{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18823echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018824if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018825 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018826else
Martin v. Löwis11437992002-04-12 09:54:03 +000018827 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018828/* confdefs.h. */
18829_ACEOF
18830cat confdefs.h >>conftest.$ac_ext
18831cat >>conftest.$ac_ext <<_ACEOF
18832/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018833/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18834 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18835#define $ac_func innocuous_$ac_func
18836
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018837/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018838 which can conflict with char $ac_func (); below.
18839 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018840 <limits.h> exists even on freestanding compilers. */
18841
18842#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018843# include <limits.h>
18844#else
18845# include <assert.h>
18846#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018847
18848#undef $ac_func
18849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018850/* Override any GCC internal prototype to avoid an error.
18851 Use char because int might match the return type of a GCC
18852 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018853#ifdef __cplusplus
18854extern "C"
18855#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018856char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018857/* The GNU C library defines this for functions which it implements
18858 to always fail with ENOSYS. Some functions are actually named
18859 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018860#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018861choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018862#endif
18863
Skip Montanaro6dead952003-09-25 14:50:04 +000018864int
18865main ()
18866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018867return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018868 ;
18869 return 0;
18870}
18871_ACEOF
18872rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018873if { (ac_try="$ac_link"
18874case "(($ac_try" in
18875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18876 *) ac_try_echo=$ac_try;;
18877esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018879 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018881 grep -v '^ *+' conftest.er1 >conftest.err
18882 rm -f conftest.er1
18883 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018885 (exit $ac_status); } && {
18886 test -z "$ac_c_werror_flag" ||
18887 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018888 } && test -s conftest$ac_exeext &&
18889 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018890 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018891else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018893sed 's/^/| /' conftest.$ac_ext >&5
18894
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018895 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018897
18898rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018899 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018900fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018901ac_res=`eval echo '${'$as_ac_var'}'`
18902 { echo "$as_me:$LINENO: result: $ac_res" >&5
18903echo "${ECHO_T}$ac_res" >&6; }
18904if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018905 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018906#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018907_ACEOF
18908 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018909/* confdefs.h. */
18910_ACEOF
18911cat confdefs.h >>conftest.$ac_ext
18912cat >>conftest.$ac_ext <<_ACEOF
18913/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018914#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018915int
18916main ()
18917{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018918gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018919 ;
18920 return 0;
18921}
18922_ACEOF
18923rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018924if { (ac_try="$ac_compile"
18925case "(($ac_try" in
18926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18927 *) ac_try_echo=$ac_try;;
18928esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018930 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018931 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018932 grep -v '^ *+' conftest.er1 >conftest.err
18933 rm -f conftest.er1
18934 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018936 (exit $ac_status); } && {
18937 test -z "$ac_c_werror_flag" ||
18938 test ! -s conftest.err
18939 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018940 :
18941else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018943sed 's/^/| /' conftest.$ac_ext >&5
18944
Martin v. Löwis11437992002-04-12 09:54:03 +000018945
18946cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018947#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018948_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018949
Martin v. Löwis11437992002-04-12 09:54:03 +000018950
Guido van Rossum627b2d71993-12-24 10:39:16 +000018951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018952
18953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018954
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018955fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018956done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018957
Michael W. Hudson54241132001-12-07 15:38:26 +000018958
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018959{ echo "$as_me:$LINENO: checking for major" >&5
18960echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018961cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018962/* confdefs.h. */
18963_ACEOF
18964cat confdefs.h >>conftest.$ac_ext
18965cat >>conftest.$ac_ext <<_ACEOF
18966/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018967
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018968#if defined(MAJOR_IN_MKDEV)
18969#include <sys/mkdev.h>
18970#elif defined(MAJOR_IN_SYSMACROS)
18971#include <sys/sysmacros.h>
18972#else
18973#include <sys/types.h>
18974#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018975
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018976int
18977main ()
18978{
18979
18980 makedev(major(0),minor(0));
18981
18982 ;
18983 return 0;
18984}
18985_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018986rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018987if { (ac_try="$ac_link"
18988case "(($ac_try" in
18989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18990 *) ac_try_echo=$ac_try;;
18991esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018993 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018995 grep -v '^ *+' conftest.er1 >conftest.err
18996 rm -f conftest.er1
18997 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018999 (exit $ac_status); } && {
19000 test -z "$ac_c_werror_flag" ||
19001 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019002 } && test -s conftest$ac_exeext &&
19003 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019004
19005
19006cat >>confdefs.h <<\_ACEOF
19007#define HAVE_DEVICE_MACROS 1
19008_ACEOF
19009
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019010 { echo "$as_me:$LINENO: result: yes" >&5
19011echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019012
19013else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019015sed 's/^/| /' conftest.$ac_ext >&5
19016
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019017
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019018 { echo "$as_me:$LINENO: result: no" >&5
19019echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019020
19021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019022
19023rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019024 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019025
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019026# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019027# for [no]getaddrinfo in netdb.h.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019028{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19029echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019030cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019031/* confdefs.h. */
19032_ACEOF
19033cat confdefs.h >>conftest.$ac_ext
19034cat >>conftest.$ac_ext <<_ACEOF
19035/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019036
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019037#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019038#include <sys/socket.h>
19039#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019040#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019041
Martin v. Löwis11437992002-04-12 09:54:03 +000019042int
19043main ()
19044{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019045
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019046getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019047
Martin v. Löwis11437992002-04-12 09:54:03 +000019048 ;
19049 return 0;
19050}
19051_ACEOF
19052rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019053if { (ac_try="$ac_link"
19054case "(($ac_try" in
19055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19056 *) ac_try_echo=$ac_try;;
19057esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019059 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019061 grep -v '^ *+' conftest.er1 >conftest.err
19062 rm -f conftest.er1
19063 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019065 (exit $ac_status); } && {
19066 test -z "$ac_c_werror_flag" ||
19067 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019068 } && test -s conftest$ac_exeext &&
19069 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019070
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019071{ echo "$as_me:$LINENO: result: yes" >&5
19072echo "${ECHO_T}yes" >&6; }
19073{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19074echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019075if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019076 { echo "$as_me:$LINENO: result: buggy" >&5
19077echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019078buggygetaddrinfo=yes
19079else
Martin v. Löwis11437992002-04-12 09:54:03 +000019080 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019081/* confdefs.h. */
19082_ACEOF
19083cat confdefs.h >>conftest.$ac_ext
19084cat >>conftest.$ac_ext <<_ACEOF
19085/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019086
19087#include <sys/types.h>
19088#include <netdb.h>
19089#include <string.h>
19090#include <sys/socket.h>
19091#include <netinet/in.h>
19092
19093main()
19094{
19095 int passive, gaierr, inet4 = 0, inet6 = 0;
19096 struct addrinfo hints, *ai, *aitop;
19097 char straddr[INET6_ADDRSTRLEN], strport[16];
19098
19099 for (passive = 0; passive <= 1; passive++) {
19100 memset(&hints, 0, sizeof(hints));
19101 hints.ai_family = AF_UNSPEC;
19102 hints.ai_flags = passive ? AI_PASSIVE : 0;
19103 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019104 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019105 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19106 (void)gai_strerror(gaierr);
19107 goto bad;
19108 }
19109 for (ai = aitop; ai; ai = ai->ai_next) {
19110 if (ai->ai_addr == NULL ||
19111 ai->ai_addrlen == 0 ||
19112 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19113 straddr, sizeof(straddr), strport, sizeof(strport),
19114 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19115 goto bad;
19116 }
19117 switch (ai->ai_family) {
19118 case AF_INET:
19119 if (strcmp(strport, "54321") != 0) {
19120 goto bad;
19121 }
19122 if (passive) {
19123 if (strcmp(straddr, "0.0.0.0") != 0) {
19124 goto bad;
19125 }
19126 } else {
19127 if (strcmp(straddr, "127.0.0.1") != 0) {
19128 goto bad;
19129 }
19130 }
19131 inet4++;
19132 break;
19133 case AF_INET6:
19134 if (strcmp(strport, "54321") != 0) {
19135 goto bad;
19136 }
19137 if (passive) {
19138 if (strcmp(straddr, "::") != 0) {
19139 goto bad;
19140 }
19141 } else {
19142 if (strcmp(straddr, "::1") != 0) {
19143 goto bad;
19144 }
19145 }
19146 inet6++;
19147 break;
19148 case AF_UNSPEC:
19149 goto bad;
19150 break;
19151 default:
19152 /* another family support? */
19153 break;
19154 }
19155 }
19156 }
19157
19158 if (!(inet4 == 0 || inet4 == 2))
19159 goto bad;
19160 if (!(inet6 == 0 || inet6 == 2))
19161 goto bad;
19162
19163 if (aitop)
19164 freeaddrinfo(aitop);
19165 exit(0);
19166
19167 bad:
19168 if (aitop)
19169 freeaddrinfo(aitop);
19170 exit(1);
19171}
19172
Martin v. Löwis11437992002-04-12 09:54:03 +000019173_ACEOF
19174rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019175if { (ac_try="$ac_link"
19176case "(($ac_try" in
19177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19178 *) ac_try_echo=$ac_try;;
19179esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019181 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019182 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019184 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019185 { (case "(($ac_try" in
19186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19187 *) ac_try_echo=$ac_try;;
19188esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019190 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019191 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019193 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019194 { echo "$as_me:$LINENO: result: good" >&5
19195echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019196buggygetaddrinfo=no
19197else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019198 echo "$as_me: program exited with status $ac_status" >&5
19199echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019200sed 's/^/| /' conftest.$ac_ext >&5
19201
Martin v. Löwis11437992002-04-12 09:54:03 +000019202( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019203{ echo "$as_me:$LINENO: result: buggy" >&5
19204echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019205buggygetaddrinfo=yes
19206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019207rm -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 +000019208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019209
19210
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019211else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019213sed 's/^/| /' conftest.$ac_ext >&5
19214
Martin v. Löwis11437992002-04-12 09:54:03 +000019215
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019216{ echo "$as_me:$LINENO: result: no" >&5
19217echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019218buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019219
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019221
19222rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019223 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019224
19225if test "$buggygetaddrinfo" = "yes"; then
19226 if test "$ipv6" = "yes"; then
19227 echo 'Fatal: You must get working getaddrinfo() function.'
19228 echo ' or you can specify "--disable-ipv6"'.
19229 exit 1
19230 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019231else
Martin v. Löwis11437992002-04-12 09:54:03 +000019232
19233cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019234#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019235_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019236
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019237fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019238
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019239for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019240do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019241as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19242{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19243echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019244if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019245 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019246else
Martin v. Löwis11437992002-04-12 09:54:03 +000019247 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019248/* confdefs.h. */
19249_ACEOF
19250cat confdefs.h >>conftest.$ac_ext
19251cat >>conftest.$ac_ext <<_ACEOF
19252/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019253/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19254 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19255#define $ac_func innocuous_$ac_func
19256
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019257/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019258 which can conflict with char $ac_func (); below.
19259 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019260 <limits.h> exists even on freestanding compilers. */
19261
19262#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019263# include <limits.h>
19264#else
19265# include <assert.h>
19266#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019267
19268#undef $ac_func
19269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019270/* Override any GCC internal prototype to avoid an error.
19271 Use char because int might match the return type of a GCC
19272 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019273#ifdef __cplusplus
19274extern "C"
19275#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019276char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019277/* The GNU C library defines this for functions which it implements
19278 to always fail with ENOSYS. Some functions are actually named
19279 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019280#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019281choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019282#endif
19283
Skip Montanaro6dead952003-09-25 14:50:04 +000019284int
19285main ()
19286{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019287return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019288 ;
19289 return 0;
19290}
19291_ACEOF
19292rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019293if { (ac_try="$ac_link"
19294case "(($ac_try" in
19295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19296 *) ac_try_echo=$ac_try;;
19297esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019299 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019301 grep -v '^ *+' conftest.er1 >conftest.err
19302 rm -f conftest.er1
19303 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019305 (exit $ac_status); } && {
19306 test -z "$ac_c_werror_flag" ||
19307 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019308 } && test -s conftest$ac_exeext &&
19309 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019310 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019311else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019313sed 's/^/| /' conftest.$ac_ext >&5
19314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019315 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019317
19318rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019319 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019320fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019321ac_res=`eval echo '${'$as_ac_var'}'`
19322 { echo "$as_me:$LINENO: result: $ac_res" >&5
19323echo "${ECHO_T}$ac_res" >&6; }
19324if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019325 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019326#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019327_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019328
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019329fi
19330done
19331
Michael W. Hudson54241132001-12-07 15:38:26 +000019332
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019333# checks for structures
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019334{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19335echo $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 +000019336if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019337 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019338else
Martin v. Löwis11437992002-04-12 09:54:03 +000019339 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019340/* confdefs.h. */
19341_ACEOF
19342cat confdefs.h >>conftest.$ac_ext
19343cat >>conftest.$ac_ext <<_ACEOF
19344/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019345#include <sys/types.h>
19346#include <sys/time.h>
19347#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019348
Martin v. Löwis11437992002-04-12 09:54:03 +000019349int
19350main ()
19351{
19352if ((struct tm *) 0)
19353return 0;
19354 ;
19355 return 0;
19356}
19357_ACEOF
19358rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019359if { (ac_try="$ac_compile"
19360case "(($ac_try" in
19361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19362 *) ac_try_echo=$ac_try;;
19363esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019365 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019367 grep -v '^ *+' conftest.er1 >conftest.err
19368 rm -f conftest.er1
19369 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019371 (exit $ac_status); } && {
19372 test -z "$ac_c_werror_flag" ||
19373 test ! -s conftest.err
19374 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019375 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019376else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019378sed 's/^/| /' conftest.$ac_ext >&5
19379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019380 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019382
19383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019384fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019385{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19386echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019387if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019388
19389cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019390#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019391_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019392
19393fi
19394
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019395{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19396echo $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 +000019397if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019398 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019399else
Martin v. Löwis11437992002-04-12 09:54:03 +000019400 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019401/* confdefs.h. */
19402_ACEOF
19403cat confdefs.h >>conftest.$ac_ext
19404cat >>conftest.$ac_ext <<_ACEOF
19405/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019406#include <sys/types.h>
19407#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019408
Martin v. Löwis11437992002-04-12 09:54:03 +000019409int
19410main ()
19411{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019412struct tm tm;
19413 int *p = &tm.tm_sec;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019414 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019415 ;
19416 return 0;
19417}
19418_ACEOF
19419rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019420if { (ac_try="$ac_compile"
19421case "(($ac_try" in
19422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19423 *) ac_try_echo=$ac_try;;
19424esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019426 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019427 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019428 grep -v '^ *+' conftest.er1 >conftest.err
19429 rm -f conftest.er1
19430 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019432 (exit $ac_status); } && {
19433 test -z "$ac_c_werror_flag" ||
19434 test ! -s conftest.err
19435 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019436 ac_cv_struct_tm=time.h
19437else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019439sed 's/^/| /' conftest.$ac_ext >&5
19440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019441 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019442fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019443
19444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019445fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019446{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19447echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019448if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019449
19450cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019451#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019452_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019453
19454fi
19455
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019456{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19457echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019458if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019459 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019460else
Martin v. Löwis11437992002-04-12 09:54:03 +000019461 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019462/* confdefs.h. */
19463_ACEOF
19464cat confdefs.h >>conftest.$ac_ext
19465cat >>conftest.$ac_ext <<_ACEOF
19466/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019467#include <sys/types.h>
19468#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019469
19470
Martin v. Löwis11437992002-04-12 09:54:03 +000019471int
19472main ()
19473{
19474static struct tm ac_aggr;
19475if (ac_aggr.tm_zone)
19476return 0;
19477 ;
19478 return 0;
19479}
19480_ACEOF
19481rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019482if { (ac_try="$ac_compile"
19483case "(($ac_try" in
19484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19485 *) ac_try_echo=$ac_try;;
19486esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019490 grep -v '^ *+' conftest.er1 >conftest.err
19491 rm -f conftest.er1
19492 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019494 (exit $ac_status); } && {
19495 test -z "$ac_c_werror_flag" ||
19496 test ! -s conftest.err
19497 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019498 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019499else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019501sed 's/^/| /' conftest.$ac_ext >&5
19502
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019503 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019504/* confdefs.h. */
19505_ACEOF
19506cat confdefs.h >>conftest.$ac_ext
19507cat >>conftest.$ac_ext <<_ACEOF
19508/* end confdefs.h. */
19509#include <sys/types.h>
19510#include <$ac_cv_struct_tm>
19511
19512
19513int
19514main ()
19515{
19516static struct tm ac_aggr;
19517if (sizeof ac_aggr.tm_zone)
19518return 0;
19519 ;
19520 return 0;
19521}
19522_ACEOF
19523rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019524if { (ac_try="$ac_compile"
19525case "(($ac_try" in
19526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19527 *) ac_try_echo=$ac_try;;
19528esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019530 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019532 grep -v '^ *+' conftest.er1 >conftest.err
19533 rm -f conftest.er1
19534 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019536 (exit $ac_status); } && {
19537 test -z "$ac_c_werror_flag" ||
19538 test ! -s conftest.err
19539 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019540 ac_cv_member_struct_tm_tm_zone=yes
19541else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019542 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019543sed 's/^/| /' conftest.$ac_ext >&5
19544
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019545 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019547
19548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019549fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019550
19551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019552fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019553{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19554echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
19555if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019556
19557cat >>confdefs.h <<_ACEOF
19558#define HAVE_STRUCT_TM_TM_ZONE 1
19559_ACEOF
19560
19561
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019562fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019563
Martin v. Löwis11437992002-04-12 09:54:03 +000019564if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19565
19566cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019567#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019568_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019569
19570else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019571 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19572echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019573if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019574 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019575else
19576 cat >conftest.$ac_ext <<_ACEOF
19577/* confdefs.h. */
19578_ACEOF
19579cat confdefs.h >>conftest.$ac_ext
19580cat >>conftest.$ac_ext <<_ACEOF
19581/* end confdefs.h. */
19582#include <time.h>
19583
19584int
19585main ()
19586{
19587#ifndef tzname
19588 (void) tzname;
19589#endif
19590
19591 ;
19592 return 0;
19593}
19594_ACEOF
19595rm -f conftest.$ac_objext
19596if { (ac_try="$ac_compile"
19597case "(($ac_try" in
19598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19599 *) ac_try_echo=$ac_try;;
19600esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019602 (eval "$ac_compile") 2>conftest.er1
19603 ac_status=$?
19604 grep -v '^ *+' conftest.er1 >conftest.err
19605 rm -f conftest.er1
19606 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019608 (exit $ac_status); } && {
19609 test -z "$ac_c_werror_flag" ||
19610 test ! -s conftest.err
19611 } && test -s conftest.$ac_objext; then
19612 ac_cv_have_decl_tzname=yes
19613else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019614 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019615sed 's/^/| /' conftest.$ac_ext >&5
19616
19617 ac_cv_have_decl_tzname=no
19618fi
19619
19620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19621fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019622{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19623echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19624if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019625
19626cat >>confdefs.h <<_ACEOF
19627#define HAVE_DECL_TZNAME 1
19628_ACEOF
19629
19630
19631else
19632 cat >>confdefs.h <<_ACEOF
19633#define HAVE_DECL_TZNAME 0
19634_ACEOF
19635
19636
19637fi
19638
19639
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019640 { echo "$as_me:$LINENO: checking for tzname" >&5
19641echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019642if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019643 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019644else
Martin v. Löwis11437992002-04-12 09:54:03 +000019645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019646/* confdefs.h. */
19647_ACEOF
19648cat confdefs.h >>conftest.$ac_ext
19649cat >>conftest.$ac_ext <<_ACEOF
19650/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019651#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019652#if !HAVE_DECL_TZNAME
19653extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019654#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019655
Martin v. Löwis11437992002-04-12 09:54:03 +000019656int
19657main ()
19658{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019659return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019660 ;
19661 return 0;
19662}
19663_ACEOF
19664rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019665if { (ac_try="$ac_link"
19666case "(($ac_try" in
19667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19668 *) ac_try_echo=$ac_try;;
19669esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019671 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019672 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019673 grep -v '^ *+' conftest.er1 >conftest.err
19674 rm -f conftest.er1
19675 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019677 (exit $ac_status); } && {
19678 test -z "$ac_c_werror_flag" ||
19679 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019680 } && test -s conftest$ac_exeext &&
19681 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019682 ac_cv_var_tzname=yes
19683else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019685sed 's/^/| /' conftest.$ac_ext >&5
19686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019687 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019689
19690rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019691 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019692fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019693{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19694echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019695 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019696
19697cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019698#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019699_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019700
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019701 fi
19702fi
19703
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019704{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19705echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019706if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019707 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019708else
19709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019710/* confdefs.h. */
19711_ACEOF
19712cat confdefs.h >>conftest.$ac_ext
19713cat >>conftest.$ac_ext <<_ACEOF
19714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019715$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019716int
19717main ()
19718{
19719static struct stat ac_aggr;
19720if (ac_aggr.st_rdev)
19721return 0;
19722 ;
19723 return 0;
19724}
19725_ACEOF
19726rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019727if { (ac_try="$ac_compile"
19728case "(($ac_try" in
19729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19730 *) ac_try_echo=$ac_try;;
19731esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019735 grep -v '^ *+' conftest.er1 >conftest.err
19736 rm -f conftest.er1
19737 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019739 (exit $ac_status); } && {
19740 test -z "$ac_c_werror_flag" ||
19741 test ! -s conftest.err
19742 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019743 ac_cv_member_struct_stat_st_rdev=yes
19744else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019746sed 's/^/| /' conftest.$ac_ext >&5
19747
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019748 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019749/* confdefs.h. */
19750_ACEOF
19751cat confdefs.h >>conftest.$ac_ext
19752cat >>conftest.$ac_ext <<_ACEOF
19753/* end confdefs.h. */
19754$ac_includes_default
19755int
19756main ()
19757{
19758static struct stat ac_aggr;
19759if (sizeof ac_aggr.st_rdev)
19760return 0;
19761 ;
19762 return 0;
19763}
19764_ACEOF
19765rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019766if { (ac_try="$ac_compile"
19767case "(($ac_try" in
19768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19769 *) ac_try_echo=$ac_try;;
19770esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019772 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019774 grep -v '^ *+' conftest.er1 >conftest.err
19775 rm -f conftest.er1
19776 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019778 (exit $ac_status); } && {
19779 test -z "$ac_c_werror_flag" ||
19780 test ! -s conftest.err
19781 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019782 ac_cv_member_struct_stat_st_rdev=yes
19783else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019785sed 's/^/| /' conftest.$ac_ext >&5
19786
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019787 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019789
19790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019792
19793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019794fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019795{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19796echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
19797if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019798
19799cat >>confdefs.h <<_ACEOF
19800#define HAVE_STRUCT_STAT_ST_RDEV 1
19801_ACEOF
19802
19803
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019804fi
19805
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019806{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19807echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019808if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019809 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019810else
Martin v. Löwis11437992002-04-12 09:54:03 +000019811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019812/* confdefs.h. */
19813_ACEOF
19814cat confdefs.h >>conftest.$ac_ext
19815cat >>conftest.$ac_ext <<_ACEOF
19816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019817$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019818int
19819main ()
19820{
19821static struct stat ac_aggr;
19822if (ac_aggr.st_blksize)
19823return 0;
19824 ;
19825 return 0;
19826}
19827_ACEOF
19828rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019829if { (ac_try="$ac_compile"
19830case "(($ac_try" in
19831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19832 *) ac_try_echo=$ac_try;;
19833esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019835 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019836 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019837 grep -v '^ *+' conftest.er1 >conftest.err
19838 rm -f conftest.er1
19839 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019841 (exit $ac_status); } && {
19842 test -z "$ac_c_werror_flag" ||
19843 test ! -s conftest.err
19844 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019845 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019846else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019848sed 's/^/| /' conftest.$ac_ext >&5
19849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019850 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019851/* confdefs.h. */
19852_ACEOF
19853cat confdefs.h >>conftest.$ac_ext
19854cat >>conftest.$ac_ext <<_ACEOF
19855/* end confdefs.h. */
19856$ac_includes_default
19857int
19858main ()
19859{
19860static struct stat ac_aggr;
19861if (sizeof ac_aggr.st_blksize)
19862return 0;
19863 ;
19864 return 0;
19865}
19866_ACEOF
19867rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019868if { (ac_try="$ac_compile"
19869case "(($ac_try" in
19870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19871 *) ac_try_echo=$ac_try;;
19872esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019874 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019876 grep -v '^ *+' conftest.er1 >conftest.err
19877 rm -f conftest.er1
19878 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019880 (exit $ac_status); } && {
19881 test -z "$ac_c_werror_flag" ||
19882 test ! -s conftest.err
19883 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019884 ac_cv_member_struct_stat_st_blksize=yes
19885else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019887sed 's/^/| /' conftest.$ac_ext >&5
19888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019889 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019891
19892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019893fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019894
19895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019896fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019897{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
19898echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
19899if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019900
Martin v. Löwis11437992002-04-12 09:54:03 +000019901cat >>confdefs.h <<_ACEOF
19902#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19903_ACEOF
19904
19905
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019906fi
19907
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019908{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19909echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019910if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019911 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019912else
19913 cat >conftest.$ac_ext <<_ACEOF
19914/* confdefs.h. */
19915_ACEOF
19916cat confdefs.h >>conftest.$ac_ext
19917cat >>conftest.$ac_ext <<_ACEOF
19918/* end confdefs.h. */
19919$ac_includes_default
19920int
19921main ()
19922{
19923static struct stat ac_aggr;
19924if (ac_aggr.st_flags)
19925return 0;
19926 ;
19927 return 0;
19928}
19929_ACEOF
19930rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019931if { (ac_try="$ac_compile"
19932case "(($ac_try" in
19933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19934 *) ac_try_echo=$ac_try;;
19935esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019937 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019938 ac_status=$?
19939 grep -v '^ *+' conftest.er1 >conftest.err
19940 rm -f conftest.er1
19941 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019943 (exit $ac_status); } && {
19944 test -z "$ac_c_werror_flag" ||
19945 test ! -s conftest.err
19946 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019947 ac_cv_member_struct_stat_st_flags=yes
19948else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019949 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019950sed 's/^/| /' conftest.$ac_ext >&5
19951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019952 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019953/* confdefs.h. */
19954_ACEOF
19955cat confdefs.h >>conftest.$ac_ext
19956cat >>conftest.$ac_ext <<_ACEOF
19957/* end confdefs.h. */
19958$ac_includes_default
19959int
19960main ()
19961{
19962static struct stat ac_aggr;
19963if (sizeof ac_aggr.st_flags)
19964return 0;
19965 ;
19966 return 0;
19967}
19968_ACEOF
19969rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019970if { (ac_try="$ac_compile"
19971case "(($ac_try" in
19972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19973 *) ac_try_echo=$ac_try;;
19974esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019976 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019977 ac_status=$?
19978 grep -v '^ *+' conftest.er1 >conftest.err
19979 rm -f conftest.er1
19980 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019982 (exit $ac_status); } && {
19983 test -z "$ac_c_werror_flag" ||
19984 test ! -s conftest.err
19985 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019986 ac_cv_member_struct_stat_st_flags=yes
19987else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019988 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019989sed 's/^/| /' conftest.$ac_ext >&5
19990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019991 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019993
19994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019996
19997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019998fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019999{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20000echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
20001if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020002
20003cat >>confdefs.h <<_ACEOF
20004#define HAVE_STRUCT_STAT_ST_FLAGS 1
20005_ACEOF
20006
20007
20008fi
20009
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020010{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20011echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020012if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020013 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020014else
20015 cat >conftest.$ac_ext <<_ACEOF
20016/* confdefs.h. */
20017_ACEOF
20018cat confdefs.h >>conftest.$ac_ext
20019cat >>conftest.$ac_ext <<_ACEOF
20020/* end confdefs.h. */
20021$ac_includes_default
20022int
20023main ()
20024{
20025static struct stat ac_aggr;
20026if (ac_aggr.st_gen)
20027return 0;
20028 ;
20029 return 0;
20030}
20031_ACEOF
20032rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020033if { (ac_try="$ac_compile"
20034case "(($ac_try" in
20035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20036 *) ac_try_echo=$ac_try;;
20037esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020039 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020040 ac_status=$?
20041 grep -v '^ *+' conftest.er1 >conftest.err
20042 rm -f conftest.er1
20043 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020045 (exit $ac_status); } && {
20046 test -z "$ac_c_werror_flag" ||
20047 test ! -s conftest.err
20048 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020049 ac_cv_member_struct_stat_st_gen=yes
20050else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020051 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020052sed 's/^/| /' conftest.$ac_ext >&5
20053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020054 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020055/* confdefs.h. */
20056_ACEOF
20057cat confdefs.h >>conftest.$ac_ext
20058cat >>conftest.$ac_ext <<_ACEOF
20059/* end confdefs.h. */
20060$ac_includes_default
20061int
20062main ()
20063{
20064static struct stat ac_aggr;
20065if (sizeof ac_aggr.st_gen)
20066return 0;
20067 ;
20068 return 0;
20069}
20070_ACEOF
20071rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020072if { (ac_try="$ac_compile"
20073case "(($ac_try" in
20074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20075 *) ac_try_echo=$ac_try;;
20076esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020078 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020079 ac_status=$?
20080 grep -v '^ *+' conftest.er1 >conftest.err
20081 rm -f conftest.er1
20082 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020084 (exit $ac_status); } && {
20085 test -z "$ac_c_werror_flag" ||
20086 test ! -s conftest.err
20087 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020088 ac_cv_member_struct_stat_st_gen=yes
20089else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020090 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020091sed 's/^/| /' conftest.$ac_ext >&5
20092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020093 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020095
20096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020098
20099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020100fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020101{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20102echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
20103if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020104
20105cat >>confdefs.h <<_ACEOF
20106#define HAVE_STRUCT_STAT_ST_GEN 1
20107_ACEOF
20108
20109
20110fi
20111
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020112{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20113echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020114if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020115 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020116else
20117 cat >conftest.$ac_ext <<_ACEOF
20118/* confdefs.h. */
20119_ACEOF
20120cat confdefs.h >>conftest.$ac_ext
20121cat >>conftest.$ac_ext <<_ACEOF
20122/* end confdefs.h. */
20123$ac_includes_default
20124int
20125main ()
20126{
20127static struct stat ac_aggr;
20128if (ac_aggr.st_birthtime)
20129return 0;
20130 ;
20131 return 0;
20132}
20133_ACEOF
20134rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020135if { (ac_try="$ac_compile"
20136case "(($ac_try" in
20137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20138 *) ac_try_echo=$ac_try;;
20139esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020141 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020142 ac_status=$?
20143 grep -v '^ *+' conftest.er1 >conftest.err
20144 rm -f conftest.er1
20145 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020147 (exit $ac_status); } && {
20148 test -z "$ac_c_werror_flag" ||
20149 test ! -s conftest.err
20150 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020151 ac_cv_member_struct_stat_st_birthtime=yes
20152else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020153 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020154sed 's/^/| /' conftest.$ac_ext >&5
20155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020156 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020157/* confdefs.h. */
20158_ACEOF
20159cat confdefs.h >>conftest.$ac_ext
20160cat >>conftest.$ac_ext <<_ACEOF
20161/* end confdefs.h. */
20162$ac_includes_default
20163int
20164main ()
20165{
20166static struct stat ac_aggr;
20167if (sizeof ac_aggr.st_birthtime)
20168return 0;
20169 ;
20170 return 0;
20171}
20172_ACEOF
20173rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020174if { (ac_try="$ac_compile"
20175case "(($ac_try" in
20176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20177 *) ac_try_echo=$ac_try;;
20178esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020180 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020181 ac_status=$?
20182 grep -v '^ *+' conftest.er1 >conftest.err
20183 rm -f conftest.er1
20184 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020186 (exit $ac_status); } && {
20187 test -z "$ac_c_werror_flag" ||
20188 test ! -s conftest.err
20189 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020190 ac_cv_member_struct_stat_st_birthtime=yes
20191else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020192 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020193sed 's/^/| /' conftest.$ac_ext >&5
20194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020195 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020197
20198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020200
20201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020202fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020203{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20204echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
20205if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020206
20207cat >>confdefs.h <<_ACEOF
20208#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20209_ACEOF
20210
20211
20212fi
20213
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020214{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20215echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020216if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020217 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020218else
Martin v. Löwis11437992002-04-12 09:54:03 +000020219 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020220/* confdefs.h. */
20221_ACEOF
20222cat confdefs.h >>conftest.$ac_ext
20223cat >>conftest.$ac_ext <<_ACEOF
20224/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020225$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020226int
20227main ()
20228{
20229static struct stat ac_aggr;
20230if (ac_aggr.st_blocks)
20231return 0;
20232 ;
20233 return 0;
20234}
20235_ACEOF
20236rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020237if { (ac_try="$ac_compile"
20238case "(($ac_try" in
20239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20240 *) ac_try_echo=$ac_try;;
20241esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020243 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020245 grep -v '^ *+' conftest.er1 >conftest.err
20246 rm -f conftest.er1
20247 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020249 (exit $ac_status); } && {
20250 test -z "$ac_c_werror_flag" ||
20251 test ! -s conftest.err
20252 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020253 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020254else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020255 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020256sed 's/^/| /' conftest.$ac_ext >&5
20257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020258 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020259/* confdefs.h. */
20260_ACEOF
20261cat confdefs.h >>conftest.$ac_ext
20262cat >>conftest.$ac_ext <<_ACEOF
20263/* end confdefs.h. */
20264$ac_includes_default
20265int
20266main ()
20267{
20268static struct stat ac_aggr;
20269if (sizeof ac_aggr.st_blocks)
20270return 0;
20271 ;
20272 return 0;
20273}
20274_ACEOF
20275rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020276if { (ac_try="$ac_compile"
20277case "(($ac_try" in
20278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20279 *) ac_try_echo=$ac_try;;
20280esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020282 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020283 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020284 grep -v '^ *+' conftest.er1 >conftest.err
20285 rm -f conftest.er1
20286 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020288 (exit $ac_status); } && {
20289 test -z "$ac_c_werror_flag" ||
20290 test ! -s conftest.err
20291 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020292 ac_cv_member_struct_stat_st_blocks=yes
20293else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020295sed 's/^/| /' conftest.$ac_ext >&5
20296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020297 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020299
20300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020302
20303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020304fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020305{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20306echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
20307if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020308
Martin v. Löwis11437992002-04-12 09:54:03 +000020309cat >>confdefs.h <<_ACEOF
20310#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20311_ACEOF
20312
20313
20314cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020315#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020316_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020317
20318else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020319 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020320 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020321 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20322 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020323esac
20324
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020325fi
20326
Michael W. Hudson54241132001-12-07 15:38:26 +000020327
Martin v. Löwis11437992002-04-12 09:54:03 +000020328
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020329{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20330echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020331if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020332 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020333else
Martin v. Löwis11437992002-04-12 09:54:03 +000020334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020335/* confdefs.h. */
20336_ACEOF
20337cat confdefs.h >>conftest.$ac_ext
20338cat >>conftest.$ac_ext <<_ACEOF
20339/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020340#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020341int
20342main ()
20343{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020344return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020345 ;
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öwis11437992002-04-12 09:54:03 +000020357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020358 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
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020366 ac_cv_header_time_altzone=yes
20367else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020369sed 's/^/| /' conftest.$ac_ext >&5
20370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020371 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000020372fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20375fi
20376
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020377{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20378echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020379if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020380
20381cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020382#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020383_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020384
20385fi
20386
Guido van Rossumda88dad1995-01-26 00:46:29 +000020387was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020388{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20389echo $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 +000020390cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020391/* confdefs.h. */
20392_ACEOF
20393cat confdefs.h >>conftest.$ac_ext
20394cat >>conftest.$ac_ext <<_ACEOF
20395/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020396
20397#include <sys/types.h>
20398#include <sys/select.h>
20399#include <sys/time.h>
20400
Martin v. Löwis11437992002-04-12 09:54:03 +000020401int
20402main ()
20403{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020404;
Martin v. Löwis11437992002-04-12 09:54:03 +000020405 ;
20406 return 0;
20407}
20408_ACEOF
20409rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020410if { (ac_try="$ac_compile"
20411case "(($ac_try" in
20412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20413 *) ac_try_echo=$ac_try;;
20414esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020416 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020417 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020418 grep -v '^ *+' conftest.er1 >conftest.err
20419 rm -f conftest.er1
20420 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020422 (exit $ac_status); } && {
20423 test -z "$ac_c_werror_flag" ||
20424 test ! -s conftest.err
20425 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020426
20427
20428cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020429#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020430_ACEOF
20431
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020432 was_it_defined=yes
20433
Guido van Rossumf78abae1997-01-21 22:02:36 +000020434else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020436sed 's/^/| /' conftest.$ac_ext >&5
20437
Thomas Wouters477c8d52006-05-27 19:21:47 +000020438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020439fi
20440
20441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020442{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20443echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020444
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020445{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20446echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020447if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020448 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020449else
Martin v. Löwis11437992002-04-12 09:54:03 +000020450 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020451/* confdefs.h. */
20452_ACEOF
20453cat confdefs.h >>conftest.$ac_ext
20454cat >>conftest.$ac_ext <<_ACEOF
20455/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020456
20457# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020458int
20459main ()
20460{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020461struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020462 ;
20463 return 0;
20464}
20465_ACEOF
20466rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020467if { (ac_try="$ac_compile"
20468case "(($ac_try" in
20469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20470 *) ac_try_echo=$ac_try;;
20471esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020473 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020474 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020475 grep -v '^ *+' conftest.er1 >conftest.err
20476 rm -f conftest.er1
20477 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020479 (exit $ac_status); } && {
20480 test -z "$ac_c_werror_flag" ||
20481 test ! -s conftest.err
20482 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020483 ac_cv_struct_addrinfo=yes
20484else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020486sed 's/^/| /' conftest.$ac_ext >&5
20487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020488 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020489fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020490
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20492fi
20493
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020494{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20495echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020496if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020497
20498cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020499#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020500_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020501
20502fi
20503
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020504{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20505echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020506if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020507 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020508else
Martin v. Löwis11437992002-04-12 09:54:03 +000020509 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020510/* confdefs.h. */
20511_ACEOF
20512cat confdefs.h >>conftest.$ac_ext
20513cat >>conftest.$ac_ext <<_ACEOF
20514/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020515
20516# include <sys/types.h>
20517# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020518int
20519main ()
20520{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020521struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020522 ;
20523 return 0;
20524}
20525_ACEOF
20526rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020527if { (ac_try="$ac_compile"
20528case "(($ac_try" in
20529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20530 *) ac_try_echo=$ac_try;;
20531esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020533 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020535 grep -v '^ *+' conftest.er1 >conftest.err
20536 rm -f conftest.er1
20537 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020539 (exit $ac_status); } && {
20540 test -z "$ac_c_werror_flag" ||
20541 test ! -s conftest.err
20542 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020543 ac_cv_struct_sockaddr_storage=yes
20544else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020546sed 's/^/| /' conftest.$ac_ext >&5
20547
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020548 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020549fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20552fi
20553
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020554{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20555echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020556if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020557
20558cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020559#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020560_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020561
20562fi
20563
Guido van Rossum627b2d71993-12-24 10:39:16 +000020564# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020565
Michael W. Hudson54241132001-12-07 15:38:26 +000020566
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020567{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20568echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020569if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020570 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020571else
Martin v. Löwis11437992002-04-12 09:54:03 +000020572 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020573/* confdefs.h. */
20574_ACEOF
20575cat confdefs.h >>conftest.$ac_ext
20576cat >>conftest.$ac_ext <<_ACEOF
20577/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020578$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020579int
20580main ()
20581{
20582static int test_array [1 - 2 * !(((char) -1) < 0)];
20583test_array [0] = 0
20584
20585 ;
20586 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020587}
Martin v. Löwis11437992002-04-12 09:54:03 +000020588_ACEOF
20589rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020590if { (ac_try="$ac_compile"
20591case "(($ac_try" in
20592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20593 *) ac_try_echo=$ac_try;;
20594esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020596 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020597 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020598 grep -v '^ *+' conftest.er1 >conftest.err
20599 rm -f conftest.er1
20600 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020602 (exit $ac_status); } && {
20603 test -z "$ac_c_werror_flag" ||
20604 test ! -s conftest.err
20605 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020606 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020607else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020609sed 's/^/| /' conftest.$ac_ext >&5
20610
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020611 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020613
20614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020615fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020616{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20617echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020618if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020619 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020620#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020621_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020622
20623fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020624
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020625{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20626echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020627if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020628 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020629else
20630 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020631/* confdefs.h. */
20632_ACEOF
20633cat confdefs.h >>conftest.$ac_ext
20634cat >>conftest.$ac_ext <<_ACEOF
20635/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020636
Martin v. Löwis11437992002-04-12 09:54:03 +000020637int
20638main ()
20639{
20640/* FIXME: Include the comments suggested by Paul. */
20641#ifndef __cplusplus
20642 /* Ultrix mips cc rejects this. */
20643 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020644 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020645 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020646 char const *const *pcpcc;
20647 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020648 /* NEC SVR4.0.2 mips cc rejects this. */
20649 struct point {int x, y;};
20650 static struct point const zero = {0,0};
20651 /* AIX XL C 1.02.0.0 rejects this.
20652 It does not let you subtract one const X* pointer from another in
20653 an arm of an if-expression whose if-part is not a constant
20654 expression */
20655 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020656 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020657 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020658 ++pcpcc;
20659 ppc = (char**) pcpcc;
20660 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020661 { /* SCO 3.2v4 cc rejects this. */
20662 char *t;
20663 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020664
Martin v. Löwis11437992002-04-12 09:54:03 +000020665 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020666 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020667 }
20668 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20669 int x[] = {25, 17};
20670 const int *foo = &x[0];
20671 ++foo;
20672 }
20673 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20674 typedef const int *iptr;
20675 iptr p = 0;
20676 ++p;
20677 }
20678 { /* AIX XL C 1.02.0.0 rejects this saying
20679 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20680 struct s { int j; const int *ap[3]; };
20681 struct s *b; b->j = 5;
20682 }
20683 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20684 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020685 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020686 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020687 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020688#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020689
Martin v. Löwis11437992002-04-12 09:54:03 +000020690 ;
20691 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020692}
Martin v. Löwis11437992002-04-12 09:54:03 +000020693_ACEOF
20694rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020695if { (ac_try="$ac_compile"
20696case "(($ac_try" in
20697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20698 *) ac_try_echo=$ac_try;;
20699esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020701 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020703 grep -v '^ *+' conftest.er1 >conftest.err
20704 rm -f conftest.er1
20705 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020707 (exit $ac_status); } && {
20708 test -z "$ac_c_werror_flag" ||
20709 test ! -s conftest.err
20710 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020711 ac_cv_c_const=yes
20712else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020714sed 's/^/| /' conftest.$ac_ext >&5
20715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020716 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020718
20719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020720fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020721{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20722echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020723if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020724
20725cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020726#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000020727_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020728
20729fi
20730
Michael W. Hudson54241132001-12-07 15:38:26 +000020731
Guido van Rossumda88dad1995-01-26 00:46:29 +000020732works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020733{ echo "$as_me:$LINENO: checking for working volatile" >&5
20734echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020735cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020736/* confdefs.h. */
20737_ACEOF
20738cat confdefs.h >>conftest.$ac_ext
20739cat >>conftest.$ac_ext <<_ACEOF
20740/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020741
Martin v. Löwis11437992002-04-12 09:54:03 +000020742int
20743main ()
20744{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020745volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020746 ;
20747 return 0;
20748}
20749_ACEOF
20750rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020751if { (ac_try="$ac_compile"
20752case "(($ac_try" in
20753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20754 *) ac_try_echo=$ac_try;;
20755esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020757 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020758 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020759 grep -v '^ *+' conftest.er1 >conftest.err
20760 rm -f conftest.er1
20761 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020763 (exit $ac_status); } && {
20764 test -z "$ac_c_werror_flag" ||
20765 test ! -s conftest.err
20766 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020767 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020768else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020769 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020770sed 's/^/| /' conftest.$ac_ext >&5
20771
Martin v. Löwis11437992002-04-12 09:54:03 +000020772
20773cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020774#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000020775_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020776
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020777
Guido van Rossum627b2d71993-12-24 10:39:16 +000020778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020779
20780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020781{ echo "$as_me:$LINENO: result: $works" >&5
20782echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020783
Guido van Rossumda88dad1995-01-26 00:46:29 +000020784works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020785{ echo "$as_me:$LINENO: checking for working signed char" >&5
20786echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020787cat >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. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020793
Martin v. Löwis11437992002-04-12 09:54:03 +000020794int
20795main ()
20796{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020797signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020798 ;
20799 return 0;
20800}
20801_ACEOF
20802rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020803if { (ac_try="$ac_compile"
20804case "(($ac_try" in
20805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20806 *) ac_try_echo=$ac_try;;
20807esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020811 grep -v '^ *+' conftest.er1 >conftest.err
20812 rm -f conftest.er1
20813 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020815 (exit $ac_status); } && {
20816 test -z "$ac_c_werror_flag" ||
20817 test ! -s conftest.err
20818 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020819 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020820else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020822sed 's/^/| /' conftest.$ac_ext >&5
20823
Martin v. Löwis11437992002-04-12 09:54:03 +000020824
20825cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020826#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000020827_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000020828
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020829
Guido van Rossum7f43da71994-08-01 12:15:30 +000020830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020831
20832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020833{ echo "$as_me:$LINENO: result: $works" >&5
20834echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020835
Guido van Rossumda88dad1995-01-26 00:46:29 +000020836have_prototypes=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020837{ echo "$as_me:$LINENO: checking for prototypes" >&5
20838echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020839cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020840/* confdefs.h. */
20841_ACEOF
20842cat confdefs.h >>conftest.$ac_ext
20843cat >>conftest.$ac_ext <<_ACEOF
20844/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020845int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020846int
20847main ()
20848{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020849return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000020850 ;
20851 return 0;
20852}
20853_ACEOF
20854rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020855if { (ac_try="$ac_compile"
20856case "(($ac_try" in
20857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20858 *) ac_try_echo=$ac_try;;
20859esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020861 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020863 grep -v '^ *+' conftest.er1 >conftest.err
20864 rm -f conftest.er1
20865 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020867 (exit $ac_status); } && {
20868 test -z "$ac_c_werror_flag" ||
20869 test ! -s conftest.err
20870 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020871
20872
20873cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020874#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020875_ACEOF
20876
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020877 have_prototypes=yes
20878
Guido van Rossumf78abae1997-01-21 22:02:36 +000020879else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020881sed 's/^/| /' conftest.$ac_ext >&5
20882
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020883
Guido van Rossum7f43da71994-08-01 12:15:30 +000020884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020885
20886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020887{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
20888echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020889
Guido van Rossumda88dad1995-01-26 00:46:29 +000020890works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020891{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
20892echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020893cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020894/* confdefs.h. */
20895_ACEOF
20896cat confdefs.h >>conftest.$ac_ext
20897cat >>conftest.$ac_ext <<_ACEOF
20898/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020899
20900#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000020901int foo(int x, ...) {
20902 va_list va;
20903 va_start(va, x);
20904 va_arg(va, int);
20905 va_arg(va, char *);
20906 va_arg(va, double);
20907 return 0;
20908}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020909
Martin v. Löwis11437992002-04-12 09:54:03 +000020910int
20911main ()
20912{
Guido van Rossum90eea071996-08-30 20:58:57 +000020913return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020914 ;
20915 return 0;
20916}
20917_ACEOF
20918rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020919if { (ac_try="$ac_compile"
20920case "(($ac_try" in
20921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20922 *) ac_try_echo=$ac_try;;
20923esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020927 grep -v '^ *+' conftest.er1 >conftest.err
20928 rm -f conftest.er1
20929 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020931 (exit $ac_status); } && {
20932 test -z "$ac_c_werror_flag" ||
20933 test ! -s conftest.err
20934 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020935
20936
20937cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020938#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020939_ACEOF
20940
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020941 works=yes
20942
Guido van Rossumf78abae1997-01-21 22:02:36 +000020943else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020944 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020945sed 's/^/| /' conftest.$ac_ext >&5
20946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020947
Guido van Rossum627b2d71993-12-24 10:39:16 +000020948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020949
20950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020951{ echo "$as_me:$LINENO: result: $works" >&5
20952echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020953
Martin v. Löwisd6320502004-08-12 13:45:08 +000020954# check for socketpair
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020955{ echo "$as_me:$LINENO: checking for socketpair" >&5
20956echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020957cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020958/* confdefs.h. */
20959_ACEOF
20960cat confdefs.h >>conftest.$ac_ext
20961cat >>conftest.$ac_ext <<_ACEOF
20962/* end confdefs.h. */
20963
20964#include <sys/types.h>
20965#include <sys/socket.h>
20966
20967int
20968main ()
20969{
20970void *x=socketpair
20971 ;
20972 return 0;
20973}
20974_ACEOF
20975rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020976if { (ac_try="$ac_compile"
20977case "(($ac_try" in
20978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20979 *) ac_try_echo=$ac_try;;
20980esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020984 grep -v '^ *+' conftest.er1 >conftest.err
20985 rm -f conftest.er1
20986 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020988 (exit $ac_status); } && {
20989 test -z "$ac_c_werror_flag" ||
20990 test ! -s conftest.err
20991 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020992
20993cat >>confdefs.h <<\_ACEOF
20994#define HAVE_SOCKETPAIR 1
20995_ACEOF
20996
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020997 { echo "$as_me:$LINENO: result: yes" >&5
20998echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020999else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021000 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021001sed 's/^/| /' conftest.$ac_ext >&5
21002
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021003 { echo "$as_me:$LINENO: result: no" >&5
21004echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021005
21006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021007
21008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021009
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021010# check if sockaddr has sa_len member
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021011{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21012echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021013cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021014/* confdefs.h. */
21015_ACEOF
21016cat confdefs.h >>conftest.$ac_ext
21017cat >>conftest.$ac_ext <<_ACEOF
21018/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021019#include <sys/types.h>
21020#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021021int
21022main ()
21023{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021024struct sockaddr x;
21025x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021026 ;
21027 return 0;
21028}
21029_ACEOF
21030rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021031if { (ac_try="$ac_compile"
21032case "(($ac_try" in
21033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21034 *) ac_try_echo=$ac_try;;
21035esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021037 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021039 grep -v '^ *+' conftest.er1 >conftest.err
21040 rm -f conftest.er1
21041 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021043 (exit $ac_status); } && {
21044 test -z "$ac_c_werror_flag" ||
21045 test ! -s conftest.err
21046 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021047 { echo "$as_me:$LINENO: result: yes" >&5
21048echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021049
21050cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021051#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021052_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021053
21054else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021056sed 's/^/| /' conftest.$ac_ext >&5
21057
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021058 { echo "$as_me:$LINENO: result: no" >&5
21059echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021061
21062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021063
Guido van Rossumda88dad1995-01-26 00:46:29 +000021064va_list_is_array=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021065{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21066echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021067cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021068/* confdefs.h. */
21069_ACEOF
21070cat confdefs.h >>conftest.$ac_ext
21071cat >>conftest.$ac_ext <<_ACEOF
21072/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021073
21074#ifdef HAVE_STDARG_PROTOTYPES
21075#include <stdarg.h>
21076#else
21077#include <varargs.h>
21078#endif
21079
Martin v. Löwis11437992002-04-12 09:54:03 +000021080int
21081main ()
21082{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021083va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021084 ;
21085 return 0;
21086}
21087_ACEOF
21088rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021089if { (ac_try="$ac_compile"
21090case "(($ac_try" in
21091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21092 *) ac_try_echo=$ac_try;;
21093esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021095 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021097 grep -v '^ *+' conftest.er1 >conftest.err
21098 rm -f conftest.er1
21099 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021101 (exit $ac_status); } && {
21102 test -z "$ac_c_werror_flag" ||
21103 test ! -s conftest.err
21104 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021105 :
21106else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021108sed 's/^/| /' conftest.$ac_ext >&5
21109
Martin v. Löwis11437992002-04-12 09:54:03 +000021110
21111
21112cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021113#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021114_ACEOF
21115
Guido van Rossumda88dad1995-01-26 00:46:29 +000021116 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021117
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021119
21120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021121{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21122echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021123
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021124# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021125
21126
21127
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021128{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21129echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021130if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021131 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021132else
Martin v. Löwis11437992002-04-12 09:54:03 +000021133 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021134/* confdefs.h. */
21135_ACEOF
21136cat confdefs.h >>conftest.$ac_ext
21137cat >>conftest.$ac_ext <<_ACEOF
21138/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021139/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21140 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21141#define gethostbyname_r innocuous_gethostbyname_r
21142
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021143/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021144 which can conflict with char gethostbyname_r (); below.
21145 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021146 <limits.h> exists even on freestanding compilers. */
21147
21148#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021149# include <limits.h>
21150#else
21151# include <assert.h>
21152#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021153
21154#undef gethostbyname_r
21155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021156/* Override any GCC internal prototype to avoid an error.
21157 Use char because int might match the return type of a GCC
21158 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021159#ifdef __cplusplus
21160extern "C"
21161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021162char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021163/* The GNU C library defines this for functions which it implements
21164 to always fail with ENOSYS. Some functions are actually named
21165 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021166#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021167choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021168#endif
21169
Skip Montanaro6dead952003-09-25 14:50:04 +000021170int
21171main ()
21172{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021173return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021174 ;
21175 return 0;
21176}
21177_ACEOF
21178rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021179if { (ac_try="$ac_link"
21180case "(($ac_try" in
21181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21182 *) ac_try_echo=$ac_try;;
21183esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021185 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021186 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021187 grep -v '^ *+' conftest.er1 >conftest.err
21188 rm -f conftest.er1
21189 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021191 (exit $ac_status); } && {
21192 test -z "$ac_c_werror_flag" ||
21193 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021194 } && test -s conftest$ac_exeext &&
21195 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021196 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021197else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021199sed 's/^/| /' conftest.$ac_ext >&5
21200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021201 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021203
21204rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021205 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021206fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021207{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21208echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
21209if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021210
Martin v. Löwis11437992002-04-12 09:54:03 +000021211 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021212#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021213_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021214
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021215 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21216echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021217 OLD_CFLAGS=$CFLAGS
21218 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021219 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021220/* confdefs.h. */
21221_ACEOF
21222cat confdefs.h >>conftest.$ac_ext
21223cat >>conftest.$ac_ext <<_ACEOF
21224/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021225
21226# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021227
Martin v. Löwis11437992002-04-12 09:54:03 +000021228int
21229main ()
21230{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021231
21232 char *name;
21233 struct hostent *he, *res;
21234 char buffer[2048];
21235 int buflen = 2048;
21236 int h_errnop;
21237
21238 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021239
21240 ;
21241 return 0;
21242}
21243_ACEOF
21244rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021245if { (ac_try="$ac_compile"
21246case "(($ac_try" in
21247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21248 *) ac_try_echo=$ac_try;;
21249esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021251 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021252 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021253 grep -v '^ *+' conftest.er1 >conftest.err
21254 rm -f conftest.er1
21255 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021257 (exit $ac_status); } && {
21258 test -z "$ac_c_werror_flag" ||
21259 test ! -s conftest.err
21260 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021261
21262 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021263#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021264_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021265
Martin v. Löwis11437992002-04-12 09:54:03 +000021266
21267cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021268#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021269_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021270
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021271 { echo "$as_me:$LINENO: result: yes" >&5
21272echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021273
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021274else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021275 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021276sed 's/^/| /' conftest.$ac_ext >&5
21277
Martin v. Löwis11437992002-04-12 09:54:03 +000021278
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021279 { echo "$as_me:$LINENO: result: no" >&5
21280echo "${ECHO_T}no" >&6; }
21281 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21282echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021283 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021284/* confdefs.h. */
21285_ACEOF
21286cat confdefs.h >>conftest.$ac_ext
21287cat >>conftest.$ac_ext <<_ACEOF
21288/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021289
21290# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021291
Martin v. Löwis11437992002-04-12 09:54:03 +000021292int
21293main ()
21294{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021295
21296 char *name;
21297 struct hostent *he;
21298 char buffer[2048];
21299 int buflen = 2048;
21300 int h_errnop;
21301
21302 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021303
21304 ;
21305 return 0;
21306}
21307_ACEOF
21308rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021309if { (ac_try="$ac_compile"
21310case "(($ac_try" in
21311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21312 *) ac_try_echo=$ac_try;;
21313esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021315 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021317 grep -v '^ *+' conftest.er1 >conftest.err
21318 rm -f conftest.er1
21319 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021321 (exit $ac_status); } && {
21322 test -z "$ac_c_werror_flag" ||
21323 test ! -s conftest.err
21324 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021325
21326 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021327#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021328_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021329
Martin v. Löwis11437992002-04-12 09:54:03 +000021330
21331cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021332#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021333_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021334
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021335 { echo "$as_me:$LINENO: result: yes" >&5
21336echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021337
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021338else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021340sed 's/^/| /' conftest.$ac_ext >&5
21341
Martin v. Löwis11437992002-04-12 09:54:03 +000021342
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021343 { echo "$as_me:$LINENO: result: no" >&5
21344echo "${ECHO_T}no" >&6; }
21345 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21346echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021347 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021348/* confdefs.h. */
21349_ACEOF
21350cat confdefs.h >>conftest.$ac_ext
21351cat >>conftest.$ac_ext <<_ACEOF
21352/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021353
21354# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021355
Martin v. Löwis11437992002-04-12 09:54:03 +000021356int
21357main ()
21358{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021359
21360 char *name;
21361 struct hostent *he;
21362 struct hostent_data data;
21363
21364 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021365
21366 ;
21367 return 0;
21368}
21369_ACEOF
21370rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021371if { (ac_try="$ac_compile"
21372case "(($ac_try" in
21373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21374 *) ac_try_echo=$ac_try;;
21375esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021377 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021378 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021379 grep -v '^ *+' conftest.er1 >conftest.err
21380 rm -f conftest.er1
21381 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021383 (exit $ac_status); } && {
21384 test -z "$ac_c_werror_flag" ||
21385 test ! -s conftest.err
21386 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021387
21388 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021389#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021390_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021391
Martin v. Löwis11437992002-04-12 09:54:03 +000021392
21393cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021394#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021395_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021396
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021397 { echo "$as_me:$LINENO: result: yes" >&5
21398echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021399
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021400else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021402sed 's/^/| /' conftest.$ac_ext >&5
21403
Martin v. Löwis11437992002-04-12 09:54:03 +000021404
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021405 { echo "$as_me:$LINENO: result: no" >&5
21406echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021407
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021409
21410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021411
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021413
21414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021415
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021416fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021417
21418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021419 CFLAGS=$OLD_CFLAGS
21420
21421else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021422
Martin v. Löwis11437992002-04-12 09:54:03 +000021423
21424for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021425do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021426as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21427{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21428echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021429if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021430 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021431else
Martin v. Löwis11437992002-04-12 09:54:03 +000021432 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021433/* confdefs.h. */
21434_ACEOF
21435cat confdefs.h >>conftest.$ac_ext
21436cat >>conftest.$ac_ext <<_ACEOF
21437/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021438/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21439 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21440#define $ac_func innocuous_$ac_func
21441
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021442/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021443 which can conflict with char $ac_func (); below.
21444 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021445 <limits.h> exists even on freestanding compilers. */
21446
21447#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021448# include <limits.h>
21449#else
21450# include <assert.h>
21451#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021452
21453#undef $ac_func
21454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021455/* Override any GCC internal prototype to avoid an error.
21456 Use char because int might match the return type of a GCC
21457 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021458#ifdef __cplusplus
21459extern "C"
21460#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021461char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021462/* The GNU C library defines this for functions which it implements
21463 to always fail with ENOSYS. Some functions are actually named
21464 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021465#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021466choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021467#endif
21468
Skip Montanaro6dead952003-09-25 14:50:04 +000021469int
21470main ()
21471{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021472return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021473 ;
21474 return 0;
21475}
21476_ACEOF
21477rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021478if { (ac_try="$ac_link"
21479case "(($ac_try" in
21480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21481 *) ac_try_echo=$ac_try;;
21482esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021484 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021485 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021486 grep -v '^ *+' conftest.er1 >conftest.err
21487 rm -f conftest.er1
21488 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021490 (exit $ac_status); } && {
21491 test -z "$ac_c_werror_flag" ||
21492 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021493 } && test -s conftest$ac_exeext &&
21494 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021495 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021496else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021498sed 's/^/| /' conftest.$ac_ext >&5
21499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021500 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021502
21503rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021504 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021505fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021506ac_res=`eval echo '${'$as_ac_var'}'`
21507 { echo "$as_me:$LINENO: result: $ac_res" >&5
21508echo "${ECHO_T}$ac_res" >&6; }
21509if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021510 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021511#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021512_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021513
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021514fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021515done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021516
Michael W. Hudson54241132001-12-07 15:38:26 +000021517
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021518fi
21519
Michael W. Hudson54241132001-12-07 15:38:26 +000021520
21521
21522
21523
21524
21525
Guido van Rossum627b2d71993-12-24 10:39:16 +000021526# checks for system services
21527# (none yet)
21528
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021529# Linux requires this for correct f.p. operations
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021530{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21531echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021532if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021533 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021534else
Martin v. Löwis11437992002-04-12 09:54:03 +000021535 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021536/* confdefs.h. */
21537_ACEOF
21538cat confdefs.h >>conftest.$ac_ext
21539cat >>conftest.$ac_ext <<_ACEOF
21540/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021541/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21542 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21543#define __fpu_control innocuous___fpu_control
21544
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021545/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021546 which can conflict with char __fpu_control (); below.
21547 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021548 <limits.h> exists even on freestanding compilers. */
21549
21550#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021551# include <limits.h>
21552#else
21553# include <assert.h>
21554#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021555
21556#undef __fpu_control
21557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021558/* Override any GCC internal prototype to avoid an error.
21559 Use char because int might match the return type of a GCC
21560 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021561#ifdef __cplusplus
21562extern "C"
21563#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021564char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021565/* The GNU C library defines this for functions which it implements
21566 to always fail with ENOSYS. Some functions are actually named
21567 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021568#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021569choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021570#endif
21571
Skip Montanaro6dead952003-09-25 14:50:04 +000021572int
21573main ()
21574{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021575return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021576 ;
21577 return 0;
21578}
21579_ACEOF
21580rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021581if { (ac_try="$ac_link"
21582case "(($ac_try" in
21583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21584 *) ac_try_echo=$ac_try;;
21585esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021587 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021589 grep -v '^ *+' conftest.er1 >conftest.err
21590 rm -f conftest.er1
21591 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021593 (exit $ac_status); } && {
21594 test -z "$ac_c_werror_flag" ||
21595 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021596 } && test -s conftest$ac_exeext &&
21597 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021598 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021599else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021600 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021601sed 's/^/| /' conftest.$ac_ext >&5
21602
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021603 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021605
21606rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021607 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021608fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021609{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21610echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
21611if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021612 :
21613else
Martin v. Löwis11437992002-04-12 09:54:03 +000021614
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021615{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21616echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021617if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021618 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021619else
Martin v. Löwis11437992002-04-12 09:54:03 +000021620 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021621LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021622cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021623/* confdefs.h. */
21624_ACEOF
21625cat confdefs.h >>conftest.$ac_ext
21626cat >>conftest.$ac_ext <<_ACEOF
21627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021629/* Override any GCC internal prototype to avoid an error.
21630 Use char because int might match the return type of a GCC
21631 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021632#ifdef __cplusplus
21633extern "C"
21634#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021635char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021636int
21637main ()
21638{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021639return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021640 ;
21641 return 0;
21642}
21643_ACEOF
21644rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021645if { (ac_try="$ac_link"
21646case "(($ac_try" in
21647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21648 *) ac_try_echo=$ac_try;;
21649esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021651 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021652 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021653 grep -v '^ *+' conftest.er1 >conftest.err
21654 rm -f conftest.er1
21655 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021657 (exit $ac_status); } && {
21658 test -z "$ac_c_werror_flag" ||
21659 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021660 } && test -s conftest$ac_exeext &&
21661 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021662 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021663else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021665sed 's/^/| /' conftest.$ac_ext >&5
21666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021667 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021668fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021669
21670rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021671 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021672LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021673fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021674{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21675echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
21676if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021677 cat >>confdefs.h <<_ACEOF
21678#define HAVE_LIBIEEE 1
21679_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021680
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021681 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021682
Guido van Rossum627b2d71993-12-24 10:39:16 +000021683fi
21684
Michael W. Hudson54241132001-12-07 15:38:26 +000021685
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021686fi
21687
Michael W. Hudson54241132001-12-07 15:38:26 +000021688
Guido van Rossum7f253911997-05-09 02:42:48 +000021689# Check for --with-fpectl
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021690{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21691echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021692
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021693# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021694if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021695 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021696if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021697then
21698
21699cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021700#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021701_ACEOF
21702
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021703 { echo "$as_me:$LINENO: result: yes" >&5
21704echo "${ECHO_T}yes" >&6; }
21705else { echo "$as_me:$LINENO: result: no" >&5
21706echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021707fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021708else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021709 { echo "$as_me:$LINENO: result: no" >&5
21710echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021711fi
21712
Guido van Rossum7f253911997-05-09 02:42:48 +000021713
Guido van Rossum7f43da71994-08-01 12:15:30 +000021714# check for --with-libm=...
21715
Guido van Rossum563e7081996-09-10 18:20:48 +000021716case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021717Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021718*) LIBM=-lm
21719esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021720{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21721echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021723# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021724if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021725 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021726if test "$withval" = no
21727then LIBM=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021728 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21729echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021730elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021731then LIBM=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021732 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21733echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
21734else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21735echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021736 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021737fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021738else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021739 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21740echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021741fi
21742
Guido van Rossum7f43da71994-08-01 12:15:30 +000021743
21744# check for --with-libc=...
21745
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021746{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21747echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021749# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021750if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021751 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021752if test "$withval" = no
21753then LIBC=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021754 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21755echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021756elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021757then LIBC=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021758 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21759echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
21760else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21761echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021762 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021763fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021764else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021765 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21766echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021767fi
21768
Guido van Rossum7f43da71994-08-01 12:15:30 +000021769
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021770# **************************************************
21771# * Check for various properties of floating point *
21772# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000021773
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021774{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
21775echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021776if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021777 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021778else
21779
21780if test "$cross_compiling" = yes; then
21781 ac_cv_little_endian_double=no
21782else
21783 cat >conftest.$ac_ext <<_ACEOF
21784/* confdefs.h. */
21785_ACEOF
21786cat confdefs.h >>conftest.$ac_ext
21787cat >>conftest.$ac_ext <<_ACEOF
21788/* end confdefs.h. */
21789
21790#include <string.h>
21791int main() {
21792 double x = 9006104071832581.0;
21793 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
21794 return 0;
21795 else
21796 return 1;
21797}
21798
21799_ACEOF
21800rm -f conftest$ac_exeext
21801if { (ac_try="$ac_link"
21802case "(($ac_try" in
21803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21804 *) ac_try_echo=$ac_try;;
21805esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021807 (eval "$ac_link") 2>&5
21808 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021810 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21811 { (case "(($ac_try" in
21812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21813 *) ac_try_echo=$ac_try;;
21814esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021816 (eval "$ac_try") 2>&5
21817 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021819 (exit $ac_status); }; }; then
21820 ac_cv_little_endian_double=yes
21821else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021822 echo "$as_me: program exited with status $ac_status" >&5
21823echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021824sed 's/^/| /' conftest.$ac_ext >&5
21825
21826( exit $ac_status )
21827ac_cv_little_endian_double=no
21828fi
21829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21830fi
21831
21832
21833fi
21834
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021835{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
21836echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021837if test "$ac_cv_little_endian_double" = yes
21838then
21839
21840cat >>confdefs.h <<\_ACEOF
21841#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
21842_ACEOF
21843
21844fi
21845
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021846{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
21847echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021848if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021849 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021850else
21851
21852if test "$cross_compiling" = yes; then
21853 ac_cv_big_endian_double=no
21854else
21855 cat >conftest.$ac_ext <<_ACEOF
21856/* confdefs.h. */
21857_ACEOF
21858cat confdefs.h >>conftest.$ac_ext
21859cat >>conftest.$ac_ext <<_ACEOF
21860/* end confdefs.h. */
21861
21862#include <string.h>
21863int main() {
21864 double x = 9006104071832581.0;
21865 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
21866 return 0;
21867 else
21868 return 1;
21869}
21870
21871_ACEOF
21872rm -f conftest$ac_exeext
21873if { (ac_try="$ac_link"
21874case "(($ac_try" in
21875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21876 *) ac_try_echo=$ac_try;;
21877esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021879 (eval "$ac_link") 2>&5
21880 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021882 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21883 { (case "(($ac_try" in
21884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21885 *) ac_try_echo=$ac_try;;
21886esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021888 (eval "$ac_try") 2>&5
21889 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021891 (exit $ac_status); }; }; then
21892 ac_cv_big_endian_double=yes
21893else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021894 echo "$as_me: program exited with status $ac_status" >&5
21895echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021896sed 's/^/| /' conftest.$ac_ext >&5
21897
21898( exit $ac_status )
21899ac_cv_big_endian_double=no
21900fi
21901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21902fi
21903
21904
21905fi
21906
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021907{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
21908echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021909if test "$ac_cv_big_endian_double" = yes
21910then
21911
21912cat >>confdefs.h <<\_ACEOF
21913#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
21914_ACEOF
21915
21916fi
21917
21918# Some ARM platforms use a mixed-endian representation for doubles.
21919# While Python doesn't currently have full support for these platforms
21920# (see e.g., issue 1762561), we can at least make sure that float <-> string
21921# conversions work.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021922{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
21923echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021924if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021925 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021926else
21927
21928if test "$cross_compiling" = yes; then
21929 ac_cv_mixed_endian_double=no
21930else
21931 cat >conftest.$ac_ext <<_ACEOF
21932/* confdefs.h. */
21933_ACEOF
21934cat confdefs.h >>conftest.$ac_ext
21935cat >>conftest.$ac_ext <<_ACEOF
21936/* end confdefs.h. */
21937
21938#include <string.h>
21939int main() {
21940 double x = 9006104071832581.0;
21941 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
21942 return 0;
21943 else
21944 return 1;
21945}
21946
21947_ACEOF
21948rm -f conftest$ac_exeext
21949if { (ac_try="$ac_link"
21950case "(($ac_try" in
21951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21952 *) ac_try_echo=$ac_try;;
21953esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021955 (eval "$ac_link") 2>&5
21956 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021958 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21959 { (case "(($ac_try" in
21960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21961 *) ac_try_echo=$ac_try;;
21962esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021964 (eval "$ac_try") 2>&5
21965 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021967 (exit $ac_status); }; }; then
21968 ac_cv_mixed_endian_double=yes
21969else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021970 echo "$as_me: program exited with status $ac_status" >&5
21971echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021972sed 's/^/| /' conftest.$ac_ext >&5
21973
21974( exit $ac_status )
21975ac_cv_mixed_endian_double=no
21976fi
21977rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21978fi
21979
21980
21981fi
21982
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021983{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
21984echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021985if test "$ac_cv_mixed_endian_double" = yes
21986then
21987
21988cat >>confdefs.h <<\_ACEOF
21989#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
21990_ACEOF
21991
21992fi
21993
Mark Dickinson7abf8d42009-04-18 20:17:52 +000021994# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000021995# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000021996# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000021997# rounding; this is a problem on x86, where the x87 FPU has a default
21998# rounding precision of 64 bits. For gcc/x86, we try to fix this by
21999# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022000if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
22001then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022002 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000022003 # x87 control word. It should be, but you never know...
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022004 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
22005echo $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 +000022006 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022007/* confdefs.h. */
22008_ACEOF
22009cat confdefs.h >>conftest.$ac_ext
22010cat >>conftest.$ac_ext <<_ACEOF
22011/* end confdefs.h. */
22012
22013int
22014main ()
22015{
22016
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022017 unsigned short cw;
22018 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
22019 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022020
22021 ;
22022 return 0;
22023}
22024_ACEOF
22025rm -f conftest.$ac_objext
22026if { (ac_try="$ac_compile"
22027case "(($ac_try" in
22028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22029 *) ac_try_echo=$ac_try;;
22030esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022032 (eval "$ac_compile") 2>conftest.er1
22033 ac_status=$?
22034 grep -v '^ *+' conftest.er1 >conftest.err
22035 rm -f conftest.er1
22036 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022038 (exit $ac_status); } && {
22039 test -z "$ac_c_werror_flag" ||
22040 test ! -s conftest.err
22041 } && test -s conftest.$ac_objext; then
22042 have_gcc_asm_for_x87=yes
22043else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022044 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022045sed 's/^/| /' conftest.$ac_ext >&5
22046
22047 have_gcc_asm_for_x87=no
22048fi
22049
22050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022051 { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
22052echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022053 if test "$have_gcc_asm_for_x87" = yes
22054 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022055
22056cat >>confdefs.h <<\_ACEOF
22057#define HAVE_GCC_ASM_FOR_X87 1
22058_ACEOF
22059
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022060 fi
22061fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022062
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022063# Detect whether system arithmetic is subject to x87-style double
22064# rounding issues. The result of this test has little meaning on non
22065# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
22066# mode is round-to-nearest and double rounding issues are present, and
22067# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022068{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
22069echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022070# $BASECFLAGS may affect the result
22071ac_save_cc="$CC"
22072CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022073if test "$cross_compiling" = yes; then
22074 ac_cv_x87_double_rounding=no
22075else
22076 cat >conftest.$ac_ext <<_ACEOF
22077/* confdefs.h. */
22078_ACEOF
22079cat confdefs.h >>conftest.$ac_ext
22080cat >>conftest.$ac_ext <<_ACEOF
22081/* end confdefs.h. */
22082
22083#include <stdlib.h>
22084#include <math.h>
22085int main() {
22086 volatile double x, y, z;
22087 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
22088 x = 0.99999999999999989; /* 1-2**-53 */
22089 y = 1./x;
22090 if (y != 1.)
22091 exit(0);
22092 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
22093 x = 1e16;
22094 y = 2.99999;
22095 z = x + y;
22096 if (z != 1e16+4.)
22097 exit(0);
22098 /* both tests show evidence of double rounding */
22099 exit(1);
22100}
22101
22102_ACEOF
22103rm -f conftest$ac_exeext
22104if { (ac_try="$ac_link"
22105case "(($ac_try" in
22106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22107 *) ac_try_echo=$ac_try;;
22108esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022110 (eval "$ac_link") 2>&5
22111 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022113 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22114 { (case "(($ac_try" in
22115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22116 *) ac_try_echo=$ac_try;;
22117esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022119 (eval "$ac_try") 2>&5
22120 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022122 (exit $ac_status); }; }; then
22123 ac_cv_x87_double_rounding=no
22124else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022125 echo "$as_me: program exited with status $ac_status" >&5
22126echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022127sed 's/^/| /' conftest.$ac_ext >&5
22128
22129( exit $ac_status )
22130ac_cv_x87_double_rounding=yes
22131fi
22132rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22133fi
22134
22135
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022136CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022137{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
22138echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022139if test "$ac_cv_x87_double_rounding" = yes
22140then
22141
22142cat >>confdefs.h <<\_ACEOF
22143#define X87_DOUBLE_ROUNDING 1
22144_ACEOF
22145
22146fi
22147
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022148# ************************************
22149# * Check for mathematical functions *
22150# ************************************
22151
22152LIBS_SAVE=$LIBS
22153LIBS="$LIBS $LIBM"
22154
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022155# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
22156# -0. on some architectures.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022157{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22158echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022159if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022160 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022161else
22162
22163if test "$cross_compiling" = yes; then
22164 ac_cv_tanh_preserves_zero_sign=no
22165else
22166 cat >conftest.$ac_ext <<_ACEOF
22167/* confdefs.h. */
22168_ACEOF
22169cat confdefs.h >>conftest.$ac_ext
22170cat >>conftest.$ac_ext <<_ACEOF
22171/* end confdefs.h. */
22172
22173#include <math.h>
22174#include <stdlib.h>
22175int main() {
22176 /* return 0 if either negative zeros don't exist
22177 on this platform or if negative zeros exist
22178 and tanh(-0.) == -0. */
22179 if (atan2(0., -1.) == atan2(-0., -1.) ||
22180 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22181 else exit(1);
22182}
22183
22184_ACEOF
22185rm -f conftest$ac_exeext
22186if { (ac_try="$ac_link"
22187case "(($ac_try" in
22188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22189 *) ac_try_echo=$ac_try;;
22190esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022192 (eval "$ac_link") 2>&5
22193 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022195 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22196 { (case "(($ac_try" in
22197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22198 *) ac_try_echo=$ac_try;;
22199esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022201 (eval "$ac_try") 2>&5
22202 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022204 (exit $ac_status); }; }; then
22205 ac_cv_tanh_preserves_zero_sign=yes
22206else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022207 echo "$as_me: program exited with status $ac_status" >&5
22208echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022209sed 's/^/| /' conftest.$ac_ext >&5
22210
22211( exit $ac_status )
22212ac_cv_tanh_preserves_zero_sign=no
22213fi
22214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22215fi
22216
22217
22218fi
22219
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022220{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22221echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022222if test "$ac_cv_tanh_preserves_zero_sign" = yes
22223then
22224
22225cat >>confdefs.h <<\_ACEOF
22226#define TANH_PRESERVES_ZERO_SIGN 1
22227_ACEOF
22228
22229fi
22230
22231
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022232
Michael W. Hudson54241132001-12-07 15:38:26 +000022233
Christian Heimes99170a52007-12-19 02:07:34 +000022234
22235
22236
22237
22238
Mark Dickinsonf2537862009-04-18 13:58:18 +000022239
22240for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Christian Heimes99170a52007-12-19 02:07:34 +000022241do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022242as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22243{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22244echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000022245if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022246 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000022247else
22248 cat >conftest.$ac_ext <<_ACEOF
22249/* confdefs.h. */
22250_ACEOF
22251cat confdefs.h >>conftest.$ac_ext
22252cat >>conftest.$ac_ext <<_ACEOF
22253/* end confdefs.h. */
22254/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22255 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22256#define $ac_func innocuous_$ac_func
22257
22258/* System header to define __stub macros and hopefully few prototypes,
22259 which can conflict with char $ac_func (); below.
22260 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22261 <limits.h> exists even on freestanding compilers. */
22262
22263#ifdef __STDC__
22264# include <limits.h>
22265#else
22266# include <assert.h>
22267#endif
22268
22269#undef $ac_func
22270
22271/* Override any GCC internal prototype to avoid an error.
22272 Use char because int might match the return type of a GCC
22273 builtin and then its argument prototype would still apply. */
22274#ifdef __cplusplus
22275extern "C"
22276#endif
22277char $ac_func ();
22278/* The GNU C library defines this for functions which it implements
22279 to always fail with ENOSYS. Some functions are actually named
22280 something starting with __ and the normal name is an alias. */
22281#if defined __stub_$ac_func || defined __stub___$ac_func
22282choke me
22283#endif
22284
22285int
22286main ()
22287{
22288return $ac_func ();
22289 ;
22290 return 0;
22291}
22292_ACEOF
22293rm -f conftest.$ac_objext conftest$ac_exeext
22294if { (ac_try="$ac_link"
22295case "(($ac_try" in
22296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22297 *) ac_try_echo=$ac_try;;
22298esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022300 (eval "$ac_link") 2>conftest.er1
22301 ac_status=$?
22302 grep -v '^ *+' conftest.er1 >conftest.err
22303 rm -f conftest.er1
22304 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022306 (exit $ac_status); } && {
22307 test -z "$ac_c_werror_flag" ||
22308 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022309 } && test -s conftest$ac_exeext &&
22310 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000022311 eval "$as_ac_var=yes"
22312else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022313 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022314sed 's/^/| /' conftest.$ac_ext >&5
22315
22316 eval "$as_ac_var=no"
22317fi
22318
22319rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22320 conftest$ac_exeext conftest.$ac_ext
22321fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022322ac_res=`eval echo '${'$as_ac_var'}'`
22323 { echo "$as_me:$LINENO: result: $ac_res" >&5
22324echo "${ECHO_T}$ac_res" >&6; }
22325if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000022326 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022327#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000022328_ACEOF
22329
22330fi
22331done
22332
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022333{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22334echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022335if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022336 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022337else
22338 cat >conftest.$ac_ext <<_ACEOF
22339/* confdefs.h. */
22340_ACEOF
22341cat confdefs.h >>conftest.$ac_ext
22342cat >>conftest.$ac_ext <<_ACEOF
22343/* end confdefs.h. */
22344#include <math.h>
22345
22346int
22347main ()
22348{
22349#ifndef isinf
22350 (void) isinf;
22351#endif
22352
22353 ;
22354 return 0;
22355}
22356_ACEOF
22357rm -f conftest.$ac_objext
22358if { (ac_try="$ac_compile"
22359case "(($ac_try" in
22360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22361 *) ac_try_echo=$ac_try;;
22362esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022364 (eval "$ac_compile") 2>conftest.er1
22365 ac_status=$?
22366 grep -v '^ *+' conftest.er1 >conftest.err
22367 rm -f conftest.er1
22368 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022370 (exit $ac_status); } && {
22371 test -z "$ac_c_werror_flag" ||
22372 test ! -s conftest.err
22373 } && test -s conftest.$ac_objext; then
22374 ac_cv_have_decl_isinf=yes
22375else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022376 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022377sed 's/^/| /' conftest.$ac_ext >&5
22378
22379 ac_cv_have_decl_isinf=no
22380fi
22381
22382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22383fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022384{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22385echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
22386if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022387
22388cat >>confdefs.h <<_ACEOF
22389#define HAVE_DECL_ISINF 1
22390_ACEOF
22391
22392
22393else
22394 cat >>confdefs.h <<_ACEOF
22395#define HAVE_DECL_ISINF 0
22396_ACEOF
22397
22398
22399fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022400{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22401echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022402if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022403 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022404else
22405 cat >conftest.$ac_ext <<_ACEOF
22406/* confdefs.h. */
22407_ACEOF
22408cat confdefs.h >>conftest.$ac_ext
22409cat >>conftest.$ac_ext <<_ACEOF
22410/* end confdefs.h. */
22411#include <math.h>
22412
22413int
22414main ()
22415{
22416#ifndef isnan
22417 (void) isnan;
22418#endif
22419
22420 ;
22421 return 0;
22422}
22423_ACEOF
22424rm -f conftest.$ac_objext
22425if { (ac_try="$ac_compile"
22426case "(($ac_try" in
22427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22428 *) ac_try_echo=$ac_try;;
22429esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022431 (eval "$ac_compile") 2>conftest.er1
22432 ac_status=$?
22433 grep -v '^ *+' conftest.er1 >conftest.err
22434 rm -f conftest.er1
22435 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022437 (exit $ac_status); } && {
22438 test -z "$ac_c_werror_flag" ||
22439 test ! -s conftest.err
22440 } && test -s conftest.$ac_objext; then
22441 ac_cv_have_decl_isnan=yes
22442else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022443 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022444sed 's/^/| /' conftest.$ac_ext >&5
22445
22446 ac_cv_have_decl_isnan=no
22447fi
22448
22449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22450fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022451{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22452echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22453if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022454
22455cat >>confdefs.h <<_ACEOF
22456#define HAVE_DECL_ISNAN 1
22457_ACEOF
22458
22459
22460else
22461 cat >>confdefs.h <<_ACEOF
22462#define HAVE_DECL_ISNAN 0
22463_ACEOF
22464
22465
22466fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022467{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22468echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022469if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022470 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022471else
22472 cat >conftest.$ac_ext <<_ACEOF
22473/* confdefs.h. */
22474_ACEOF
22475cat confdefs.h >>conftest.$ac_ext
22476cat >>conftest.$ac_ext <<_ACEOF
22477/* end confdefs.h. */
22478#include <math.h>
22479
22480int
22481main ()
22482{
22483#ifndef isfinite
22484 (void) isfinite;
22485#endif
22486
22487 ;
22488 return 0;
22489}
22490_ACEOF
22491rm -f conftest.$ac_objext
22492if { (ac_try="$ac_compile"
22493case "(($ac_try" in
22494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22495 *) ac_try_echo=$ac_try;;
22496esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022498 (eval "$ac_compile") 2>conftest.er1
22499 ac_status=$?
22500 grep -v '^ *+' conftest.er1 >conftest.err
22501 rm -f conftest.er1
22502 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022504 (exit $ac_status); } && {
22505 test -z "$ac_c_werror_flag" ||
22506 test ! -s conftest.err
22507 } && test -s conftest.$ac_objext; then
22508 ac_cv_have_decl_isfinite=yes
22509else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022510 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022511sed 's/^/| /' conftest.$ac_ext >&5
22512
22513 ac_cv_have_decl_isfinite=no
22514fi
22515
22516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22517fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022518{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22519echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22520if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022521
22522cat >>confdefs.h <<_ACEOF
22523#define HAVE_DECL_ISFINITE 1
22524_ACEOF
22525
22526
22527else
22528 cat >>confdefs.h <<_ACEOF
22529#define HAVE_DECL_ISFINITE 0
22530_ACEOF
22531
22532
22533fi
22534
22535
Christian Heimes99170a52007-12-19 02:07:34 +000022536
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022537LIBS=$LIBS_SAVE
22538
Mark Dickinson875ada42009-11-28 12:52:39 +000022539# For multiprocessing module, check that sem_open
22540# actually works. For FreeBSD versions <= 7.2,
22541# the kernel module that provides POSIX semaphores
22542# isn't loaded by default, so an attempt to call
22543# sem_open results in a 'Signal 12' error.
22544{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
22545echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
22546if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
22547 echo $ECHO_N "(cached) $ECHO_C" >&6
22548else
22549 if test "$cross_compiling" = yes; then
22550 ac_cv_posix_semaphores_enabled=yes
22551else
22552 cat >conftest.$ac_ext <<_ACEOF
22553/* confdefs.h. */
22554_ACEOF
22555cat confdefs.h >>conftest.$ac_ext
22556cat >>conftest.$ac_ext <<_ACEOF
22557/* end confdefs.h. */
22558
22559#include <unistd.h>
22560#include <fcntl.h>
22561#include <stdio.h>
22562#include <semaphore.h>
22563#include <sys/stat.h>
22564
22565int main(void) {
22566 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
22567 if (a == SEM_FAILED) {
22568 perror("sem_open");
22569 return 1;
22570 }
22571 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022572 sem_unlink("/autoconf");
Mark Dickinson875ada42009-11-28 12:52:39 +000022573 return 0;
22574}
22575
22576_ACEOF
22577rm -f conftest$ac_exeext
22578if { (ac_try="$ac_link"
22579case "(($ac_try" in
22580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22581 *) ac_try_echo=$ac_try;;
22582esac
22583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22584 (eval "$ac_link") 2>&5
22585 ac_status=$?
22586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22587 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22588 { (case "(($ac_try" in
22589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22590 *) ac_try_echo=$ac_try;;
22591esac
22592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22593 (eval "$ac_try") 2>&5
22594 ac_status=$?
22595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22596 (exit $ac_status); }; }; then
22597 ac_cv_posix_semaphores_enabled=yes
22598else
22599 echo "$as_me: program exited with status $ac_status" >&5
22600echo "$as_me: failed program was:" >&5
22601sed 's/^/| /' conftest.$ac_ext >&5
22602
22603( exit $ac_status )
22604ac_cv_posix_semaphores_enabled=no
22605fi
22606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22607fi
22608
22609
22610
22611fi
22612
22613{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
22614echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
22615if test $ac_cv_posix_semaphores_enabled = no
22616then
22617
22618cat >>confdefs.h <<\_ACEOF
22619#define POSIX_SEMAPHORES_NOT_ENABLED 1
22620_ACEOF
22621
22622fi
22623
Mark Dickinson10683072009-04-18 21:18:19 +000022624# Multiprocessing check for broken sem_getvalue
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022625{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
22626echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022627if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022628 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022629See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022630echo "$as_me: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022631See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022632 { (exit 1); exit 1; }; }
Mark Dickinson10683072009-04-18 21:18:19 +000022633else
22634 cat >conftest.$ac_ext <<_ACEOF
22635/* confdefs.h. */
22636_ACEOF
22637cat confdefs.h >>conftest.$ac_ext
22638cat >>conftest.$ac_ext <<_ACEOF
22639/* end confdefs.h. */
22640
22641#include <unistd.h>
22642#include <fcntl.h>
22643#include <stdio.h>
22644#include <semaphore.h>
22645#include <sys/stat.h>
22646
22647int main(void){
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022648 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000022649 int count;
22650 int res;
22651 if(a==SEM_FAILED){
22652 perror("sem_open");
22653 return 1;
22654
22655 }
22656 res = sem_getvalue(a, &count);
22657 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022658 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000022659 return res==-1 ? 1 : 0;
22660}
22661
22662
22663_ACEOF
22664rm -f conftest$ac_exeext
22665if { (ac_try="$ac_link"
22666case "(($ac_try" in
22667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22668 *) ac_try_echo=$ac_try;;
22669esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022671 (eval "$ac_link") 2>&5
22672 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022674 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22675 { (case "(($ac_try" in
22676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22677 *) ac_try_echo=$ac_try;;
22678esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022680 (eval "$ac_try") 2>&5
22681 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022683 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022684 { echo "$as_me:$LINENO: result: no" >&5
22685echo "${ECHO_T}no" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022686else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022687 echo "$as_me: program exited with status $ac_status" >&5
22688echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022689sed 's/^/| /' conftest.$ac_ext >&5
22690
22691( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022692{ echo "$as_me:$LINENO: result: yes" >&5
22693echo "${ECHO_T}yes" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022694
22695cat >>confdefs.h <<\_ACEOF
22696#define HAVE_BROKEN_SEM_GETVALUE 1
22697_ACEOF
22698
22699
22700fi
22701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22702fi
22703
22704
22705
Mark Dickinsonbd792642009-03-18 20:06:12 +000022706# determine what size digit to use for Python's longs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022707{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
22708echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022709# Check whether --enable-big-digits was given.
22710if test "${enable_big_digits+set}" = set; then
22711 enableval=$enable_big_digits; case $enable_big_digits in
22712yes)
22713 enable_big_digits=30 ;;
22714no)
22715 enable_big_digits=15 ;;
2271615|30)
22717 ;;
22718*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022719 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
22720echo "$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 +000022721 { (exit 1); exit 1; }; } ;;
22722esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022723{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
22724echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022725
22726cat >>confdefs.h <<_ACEOF
22727#define PYLONG_BITS_IN_DIGIT $enable_big_digits
22728_ACEOF
22729
22730
22731else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022732 { echo "$as_me:$LINENO: result: no value specified" >&5
22733echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022734fi
22735
22736
Guido van Rossumef2255b2000-03-10 22:30:29 +000022737# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022738if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022739 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22740echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022741if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022742 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022743fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022744{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22745echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022746else
Martin v. Löwis11437992002-04-12 09:54:03 +000022747 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022748{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22749echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022750cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022751/* confdefs.h. */
22752_ACEOF
22753cat confdefs.h >>conftest.$ac_ext
22754cat >>conftest.$ac_ext <<_ACEOF
22755/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022756$ac_includes_default
22757#include <wchar.h>
22758_ACEOF
22759rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022760if { (ac_try="$ac_compile"
22761case "(($ac_try" in
22762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22763 *) ac_try_echo=$ac_try;;
22764esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022766 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022768 grep -v '^ *+' conftest.er1 >conftest.err
22769 rm -f conftest.er1
22770 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022772 (exit $ac_status); } && {
22773 test -z "$ac_c_werror_flag" ||
22774 test ! -s conftest.err
22775 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022776 ac_header_compiler=yes
22777else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022779sed 's/^/| /' conftest.$ac_ext >&5
22780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022781 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022783
22784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022785{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22786echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022787
22788# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022789{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
22790echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022791cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022792/* confdefs.h. */
22793_ACEOF
22794cat confdefs.h >>conftest.$ac_ext
22795cat >>conftest.$ac_ext <<_ACEOF
22796/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022797#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022798_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022799if { (ac_try="$ac_cpp conftest.$ac_ext"
22800case "(($ac_try" in
22801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22802 *) ac_try_echo=$ac_try;;
22803esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022805 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022806 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022807 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000022808 rm -f conftest.er1
22809 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022811 (exit $ac_status); } >/dev/null && {
22812 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22813 test ! -s conftest.err
22814 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022815 ac_header_preproc=yes
22816else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022818sed 's/^/| /' conftest.$ac_ext >&5
22819
Martin v. Löwis11437992002-04-12 09:54:03 +000022820 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022822
Martin v. Löwis11437992002-04-12 09:54:03 +000022823rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022824{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22825echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022826
22827# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022828case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22829 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022830 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
22831echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22832 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
22833echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022834 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022835 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022836 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022837 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
22838echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
22839 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
22840echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
22841 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
22842echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
22843 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
22844echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
22845 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
22846echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
22847 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
22848echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022849 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000022850## -------------------------------------- ##
22851## Report this to http://bugs.python.org/ ##
22852## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000022853_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022854 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000022855 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022856esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022857{ echo "$as_me:$LINENO: checking for wchar.h" >&5
22858echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022859if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022860 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022861else
22862 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000022863fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022864{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22865echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022866
22867fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022868if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022869
22870
22871cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022872#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022873_ACEOF
22874
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022875 wchar_h="yes"
22876
Guido van Rossumef2255b2000-03-10 22:30:29 +000022877else
Martin v. Löwis11437992002-04-12 09:54:03 +000022878 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000022879
22880fi
22881
Michael W. Hudson54241132001-12-07 15:38:26 +000022882
Martin v. Löwis11437992002-04-12 09:54:03 +000022883
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022884# determine wchar_t size
22885if test "$wchar_h" = yes
22886then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022887 { echo "$as_me:$LINENO: checking for wchar_t" >&5
22888echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
22889if test "${ac_cv_type_wchar_t+set}" = set; then
22890 echo $ECHO_N "(cached) $ECHO_C" >&6
22891else
22892 cat >conftest.$ac_ext <<_ACEOF
22893/* confdefs.h. */
22894_ACEOF
22895cat confdefs.h >>conftest.$ac_ext
22896cat >>conftest.$ac_ext <<_ACEOF
22897/* end confdefs.h. */
22898#include <wchar.h>
22899
22900typedef wchar_t ac__type_new_;
22901int
22902main ()
22903{
22904if ((ac__type_new_ *) 0)
22905 return 0;
22906if (sizeof (ac__type_new_))
22907 return 0;
22908 ;
22909 return 0;
22910}
22911_ACEOF
22912rm -f conftest.$ac_objext
22913if { (ac_try="$ac_compile"
22914case "(($ac_try" in
22915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22916 *) ac_try_echo=$ac_try;;
22917esac
22918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22919 (eval "$ac_compile") 2>conftest.er1
22920 ac_status=$?
22921 grep -v '^ *+' conftest.er1 >conftest.err
22922 rm -f conftest.er1
22923 cat conftest.err >&5
22924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22925 (exit $ac_status); } && {
22926 test -z "$ac_c_werror_flag" ||
22927 test ! -s conftest.err
22928 } && test -s conftest.$ac_objext; then
22929 ac_cv_type_wchar_t=yes
22930else
22931 echo "$as_me: failed program was:" >&5
22932sed 's/^/| /' conftest.$ac_ext >&5
22933
22934 ac_cv_type_wchar_t=no
22935fi
22936
22937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22938fi
22939{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
22940echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
22941
22942# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022943# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22944# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22945# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022946{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22947echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022948if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022949 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022950else
Martin v. Löwis11437992002-04-12 09:54:03 +000022951 if test "$cross_compiling" = yes; then
22952 # Depending upon the size, compute the lo and hi bounds.
22953cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022954/* confdefs.h. */
22955_ACEOF
22956cat confdefs.h >>conftest.$ac_ext
22957cat >>conftest.$ac_ext <<_ACEOF
22958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022959#include <wchar.h>
22960
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022961 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022962int
22963main ()
22964{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022965static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022966test_array [0] = 0
22967
22968 ;
22969 return 0;
22970}
22971_ACEOF
22972rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022973if { (ac_try="$ac_compile"
22974case "(($ac_try" in
22975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22976 *) ac_try_echo=$ac_try;;
22977esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022979 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022981 grep -v '^ *+' conftest.er1 >conftest.err
22982 rm -f conftest.er1
22983 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022985 (exit $ac_status); } && {
22986 test -z "$ac_c_werror_flag" ||
22987 test ! -s conftest.err
22988 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022989 ac_lo=0 ac_mid=0
22990 while :; do
22991 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022992/* confdefs.h. */
22993_ACEOF
22994cat confdefs.h >>conftest.$ac_ext
22995cat >>conftest.$ac_ext <<_ACEOF
22996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022997#include <wchar.h>
22998
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022999 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023000int
23001main ()
23002{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023003static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023004test_array [0] = 0
23005
23006 ;
23007 return 0;
23008}
23009_ACEOF
23010rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023011if { (ac_try="$ac_compile"
23012case "(($ac_try" in
23013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23014 *) ac_try_echo=$ac_try;;
23015esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023017 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023019 grep -v '^ *+' conftest.er1 >conftest.err
23020 rm -f conftest.er1
23021 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023023 (exit $ac_status); } && {
23024 test -z "$ac_c_werror_flag" ||
23025 test ! -s conftest.err
23026 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023027 ac_hi=$ac_mid; break
23028else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023030sed 's/^/| /' conftest.$ac_ext >&5
23031
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023032 ac_lo=`expr $ac_mid + 1`
23033 if test $ac_lo -le $ac_mid; then
23034 ac_lo= ac_hi=
23035 break
23036 fi
23037 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023039
23040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023041 done
23042else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023044sed 's/^/| /' conftest.$ac_ext >&5
23045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023046 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023047/* confdefs.h. */
23048_ACEOF
23049cat confdefs.h >>conftest.$ac_ext
23050cat >>conftest.$ac_ext <<_ACEOF
23051/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023052#include <wchar.h>
23053
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023054 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023055int
23056main ()
23057{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023058static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023059test_array [0] = 0
23060
23061 ;
23062 return 0;
23063}
23064_ACEOF
23065rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023066if { (ac_try="$ac_compile"
23067case "(($ac_try" in
23068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23069 *) ac_try_echo=$ac_try;;
23070esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023072 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023073 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023074 grep -v '^ *+' conftest.er1 >conftest.err
23075 rm -f conftest.er1
23076 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023078 (exit $ac_status); } && {
23079 test -z "$ac_c_werror_flag" ||
23080 test ! -s conftest.err
23081 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023082 ac_hi=-1 ac_mid=-1
23083 while :; do
23084 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023085/* confdefs.h. */
23086_ACEOF
23087cat confdefs.h >>conftest.$ac_ext
23088cat >>conftest.$ac_ext <<_ACEOF
23089/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023090#include <wchar.h>
23091
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023092 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023093int
23094main ()
23095{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023096static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023097test_array [0] = 0
23098
23099 ;
23100 return 0;
23101}
23102_ACEOF
23103rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023104if { (ac_try="$ac_compile"
23105case "(($ac_try" in
23106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23107 *) ac_try_echo=$ac_try;;
23108esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023110 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023111 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023112 grep -v '^ *+' conftest.er1 >conftest.err
23113 rm -f conftest.er1
23114 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023116 (exit $ac_status); } && {
23117 test -z "$ac_c_werror_flag" ||
23118 test ! -s conftest.err
23119 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023120 ac_lo=$ac_mid; break
23121else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023122 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023123sed 's/^/| /' conftest.$ac_ext >&5
23124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023125 ac_hi=`expr '(' $ac_mid ')' - 1`
23126 if test $ac_mid -le $ac_hi; then
23127 ac_lo= ac_hi=
23128 break
23129 fi
23130 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000023131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023132
23133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023134 done
23135else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023137sed 's/^/| /' conftest.$ac_ext >&5
23138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023139 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000023140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023141
23142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023144
23145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023146# Binary search between lo and hi bounds.
23147while test "x$ac_lo" != "x$ac_hi"; do
23148 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23149 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023150/* confdefs.h. */
23151_ACEOF
23152cat confdefs.h >>conftest.$ac_ext
23153cat >>conftest.$ac_ext <<_ACEOF
23154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023155#include <wchar.h>
23156
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023157 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023158int
23159main ()
23160{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023161static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023162test_array [0] = 0
23163
23164 ;
23165 return 0;
23166}
23167_ACEOF
23168rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023169if { (ac_try="$ac_compile"
23170case "(($ac_try" in
23171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23172 *) ac_try_echo=$ac_try;;
23173esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023175 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023177 grep -v '^ *+' conftest.er1 >conftest.err
23178 rm -f conftest.er1
23179 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023181 (exit $ac_status); } && {
23182 test -z "$ac_c_werror_flag" ||
23183 test ! -s conftest.err
23184 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023185 ac_hi=$ac_mid
23186else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023188sed 's/^/| /' conftest.$ac_ext >&5
23189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023190 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023192
23193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023194done
23195case $ac_lo in
23196?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023197'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023198 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023199See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023200echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023201See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023202 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023203 else
23204 ac_cv_sizeof_wchar_t=0
23205 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023206esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023207else
Martin v. Löwis11437992002-04-12 09:54:03 +000023208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023209/* confdefs.h. */
23210_ACEOF
23211cat confdefs.h >>conftest.$ac_ext
23212cat >>conftest.$ac_ext <<_ACEOF
23213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023214#include <wchar.h>
23215
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023216 typedef wchar_t ac__type_sizeof_;
23217static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
23218static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000023219#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023220#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023221int
23222main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023223{
Martin v. Löwis11437992002-04-12 09:54:03 +000023224
23225 FILE *f = fopen ("conftest.val", "w");
23226 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023227 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023228 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023229 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023230 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023231 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023232 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023233 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023234 }
23235 else
23236 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023237 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023238 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023239 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023240 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023241 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023242 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023243
23244 ;
23245 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023246}
Martin v. Löwis11437992002-04-12 09:54:03 +000023247_ACEOF
23248rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023249if { (ac_try="$ac_link"
23250case "(($ac_try" in
23251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23252 *) ac_try_echo=$ac_try;;
23253esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023255 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023256 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023258 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023259 { (case "(($ac_try" in
23260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23261 *) ac_try_echo=$ac_try;;
23262esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023264 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023265 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023267 (exit $ac_status); }; }; then
23268 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023269else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023270 echo "$as_me: program exited with status $ac_status" >&5
23271echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023272sed 's/^/| /' conftest.$ac_ext >&5
23273
Martin v. Löwis11437992002-04-12 09:54:03 +000023274( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023275if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023276 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023277See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023278echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023279See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023280 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023281 else
23282 ac_cv_sizeof_wchar_t=0
23283 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023285rm -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 +000023286fi
23287rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000023288fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023289{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23290echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023291
23292
23293
Martin v. Löwis11437992002-04-12 09:54:03 +000023294cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023295#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023296_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023297
Michael W. Hudson54241132001-12-07 15:38:26 +000023298
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023299fi
23300
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023301{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23302echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023303have_ucs4_tcl=no
23304cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023305/* confdefs.h. */
23306_ACEOF
23307cat confdefs.h >>conftest.$ac_ext
23308cat >>conftest.$ac_ext <<_ACEOF
23309/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023310
23311#include <tcl.h>
23312#if TCL_UTF_MAX != 6
23313# error "NOT UCS4_TCL"
23314#endif
23315int
23316main ()
23317{
23318
23319 ;
23320 return 0;
23321}
23322_ACEOF
23323rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023324if { (ac_try="$ac_compile"
23325case "(($ac_try" in
23326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23327 *) ac_try_echo=$ac_try;;
23328esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023330 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023331 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023332 grep -v '^ *+' conftest.er1 >conftest.err
23333 rm -f conftest.er1
23334 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023336 (exit $ac_status); } && {
23337 test -z "$ac_c_werror_flag" ||
23338 test ! -s conftest.err
23339 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023340
23341
23342cat >>confdefs.h <<\_ACEOF
23343#define HAVE_UCS4_TCL 1
23344_ACEOF
23345
23346 have_ucs4_tcl=yes
23347
23348else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023350sed 's/^/| /' conftest.$ac_ext >&5
23351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023352
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023354
23355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023356{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23357echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023358
Skip Montanaro6dead952003-09-25 14:50:04 +000023359# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023360if test "$wchar_h" = yes
23361then
23362 # check whether wchar_t is signed or not
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023363 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23364echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023365 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023366 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023367else
23368
23369 if test "$cross_compiling" = yes; then
23370 ac_cv_wchar_t_signed=yes
23371else
23372 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023373/* confdefs.h. */
23374_ACEOF
23375cat confdefs.h >>conftest.$ac_ext
23376cat >>conftest.$ac_ext <<_ACEOF
23377/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023378
23379 #include <wchar.h>
23380 int main()
23381 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000023382 /* Success: exit code 0 */
23383 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023384 }
23385
23386_ACEOF
23387rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023388if { (ac_try="$ac_link"
23389case "(($ac_try" in
23390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23391 *) ac_try_echo=$ac_try;;
23392esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023394 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023395 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023397 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023398 { (case "(($ac_try" in
23399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23400 *) ac_try_echo=$ac_try;;
23401esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023403 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023404 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023406 (exit $ac_status); }; }; then
23407 ac_cv_wchar_t_signed=yes
23408else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023409 echo "$as_me: program exited with status $ac_status" >&5
23410echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023411sed 's/^/| /' conftest.$ac_ext >&5
23412
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023413( exit $ac_status )
23414ac_cv_wchar_t_signed=no
23415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023416rm -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 +000023417fi
23418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023419
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023420fi
23421
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023422 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23423echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023424fi
23425
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023426{ echo "$as_me:$LINENO: checking what type to use for str" >&5
23427echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000023428
23429# Check whether --with-wide-unicode was given.
23430if test "${with_wide_unicode+set}" = set; then
23431 withval=$with_wide_unicode;
23432if test "$withval" != no
23433then unicode_size="4"
23434else unicode_size="2"
23435fi
23436
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023437else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023438
Georg Brandl52d168a2008-01-07 18:10:24 +000023439case "$have_ucs4_tcl" in
23440 yes) unicode_size="4" ;;
23441 *) unicode_size="2" ;;
23442esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023443
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023444fi
23445
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023446
23447
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023448
Georg Brandl52d168a2008-01-07 18:10:24 +000023449case "$unicode_size" in
23450 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023451#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023452_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000023453 ;;
23454 *) cat >>confdefs.h <<\_ACEOF
23455#define Py_UNICODE_SIZE 2
23456_ACEOF
23457 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023458esac
23459
Michael W. Hudson54241132001-12-07 15:38:26 +000023460
Martin v. Löwis11437992002-04-12 09:54:03 +000023461
23462
Georg Brandl52d168a2008-01-07 18:10:24 +000023463# wchar_t is only usable if it maps to an unsigned type
23464if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023465 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000023466then
23467 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023468
Martin v. Löwis11437992002-04-12 09:54:03 +000023469cat >>confdefs.h <<\_ACEOF
23470#define HAVE_USABLE_WCHAR_T 1
23471_ACEOF
23472
Georg Brandl52d168a2008-01-07 18:10:24 +000023473 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023474#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023475_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023476
Georg Brandl52d168a2008-01-07 18:10:24 +000023477elif test "$ac_cv_sizeof_short" = "$unicode_size"
23478then
23479 PY_UNICODE_TYPE="unsigned short"
23480 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023481#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023482_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023483
Georg Brandl52d168a2008-01-07 18:10:24 +000023484elif test "$ac_cv_sizeof_long" = "$unicode_size"
23485then
23486 PY_UNICODE_TYPE="unsigned long"
23487 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023488#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023489_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023490
Georg Brandl52d168a2008-01-07 18:10:24 +000023491else
23492 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023493fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023494{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23495echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023496
23497# check for endianness
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023498{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23499echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023500if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023501 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023502else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023503 # See if sys/param.h defines the BYTE_ORDER macro.
23504cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023505/* confdefs.h. */
23506_ACEOF
23507cat confdefs.h >>conftest.$ac_ext
23508cat >>conftest.$ac_ext <<_ACEOF
23509/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023510#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023511#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023512
Martin v. Löwis11437992002-04-12 09:54:03 +000023513int
23514main ()
23515{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023516#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
23517 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
23518 bogus endian macros
23519#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023520
23521 ;
23522 return 0;
23523}
23524_ACEOF
23525rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023526if { (ac_try="$ac_compile"
23527case "(($ac_try" in
23528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23529 *) ac_try_echo=$ac_try;;
23530esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023532 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023533 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023534 grep -v '^ *+' conftest.er1 >conftest.err
23535 rm -f conftest.er1
23536 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023538 (exit $ac_status); } && {
23539 test -z "$ac_c_werror_flag" ||
23540 test ! -s conftest.err
23541 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023542 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023543cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023544/* confdefs.h. */
23545_ACEOF
23546cat confdefs.h >>conftest.$ac_ext
23547cat >>conftest.$ac_ext <<_ACEOF
23548/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023549#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023550#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023551
Martin v. Löwis11437992002-04-12 09:54:03 +000023552int
23553main ()
23554{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023555#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023556 not big endian
23557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023558
23559 ;
23560 return 0;
23561}
23562_ACEOF
23563rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023564if { (ac_try="$ac_compile"
23565case "(($ac_try" in
23566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23567 *) ac_try_echo=$ac_try;;
23568esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023570 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023571 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023572 grep -v '^ *+' conftest.er1 >conftest.err
23573 rm -f conftest.er1
23574 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023576 (exit $ac_status); } && {
23577 test -z "$ac_c_werror_flag" ||
23578 test ! -s conftest.err
23579 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023580 ac_cv_c_bigendian=yes
23581else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023583sed 's/^/| /' conftest.$ac_ext >&5
23584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023585 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023587
23588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023589else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023591sed 's/^/| /' conftest.$ac_ext >&5
23592
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023593 # It does not; compile a test program.
23594if test "$cross_compiling" = yes; then
23595 # try to guess the endianness by grepping values into an object file
23596 ac_cv_c_bigendian=unknown
23597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023598/* confdefs.h. */
23599_ACEOF
23600cat confdefs.h >>conftest.$ac_ext
23601cat >>conftest.$ac_ext <<_ACEOF
23602/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023603short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23604short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23605void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
23606short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23607short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23608void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023609int
23610main ()
23611{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023612 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023613 ;
23614 return 0;
23615}
23616_ACEOF
23617rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023618if { (ac_try="$ac_compile"
23619case "(($ac_try" in
23620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23621 *) ac_try_echo=$ac_try;;
23622esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023624 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023625 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023626 grep -v '^ *+' conftest.er1 >conftest.err
23627 rm -f conftest.er1
23628 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023630 (exit $ac_status); } && {
23631 test -z "$ac_c_werror_flag" ||
23632 test ! -s conftest.err
23633 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023634 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023635 ac_cv_c_bigendian=yes
Benjamin Petersona8332062009-09-11 22:36:27 +000023636fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023637if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23638 if test "$ac_cv_c_bigendian" = unknown; then
23639 ac_cv_c_bigendian=no
23640 else
23641 # finding both strings is unlikely to happen, but who knows?
23642 ac_cv_c_bigendian=unknown
23643 fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023644fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023645else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023646 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023647sed 's/^/| /' conftest.$ac_ext >&5
23648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023649
Martin v. Löwis11437992002-04-12 09:54:03 +000023650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023651
23652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023653else
23654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023655/* confdefs.h. */
23656_ACEOF
23657cat confdefs.h >>conftest.$ac_ext
23658cat >>conftest.$ac_ext <<_ACEOF
23659/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023660$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023661int
23662main ()
23663{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023664
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023665 /* Are we little or big endian? From Harbison&Steele. */
23666 union
23667 {
23668 long int l;
23669 char c[sizeof (long int)];
23670 } u;
23671 u.l = 1;
23672 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023673
23674 ;
23675 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023676}
Martin v. Löwis11437992002-04-12 09:54:03 +000023677_ACEOF
23678rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023679if { (ac_try="$ac_link"
23680case "(($ac_try" in
23681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23682 *) ac_try_echo=$ac_try;;
23683esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023685 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023686 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023688 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023689 { (case "(($ac_try" in
23690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23691 *) ac_try_echo=$ac_try;;
23692esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023694 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023695 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023697 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023698 ac_cv_c_bigendian=no
23699else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023700 echo "$as_me: program exited with status $ac_status" >&5
23701echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023702sed 's/^/| /' conftest.$ac_ext >&5
23703
Martin v. Löwis11437992002-04-12 09:54:03 +000023704( exit $ac_status )
23705ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023707rm -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 +000023708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023709
23710
Martin v. Löwis11437992002-04-12 09:54:03 +000023711fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023712
23713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23714fi
23715{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23716echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
23717case $ac_cv_c_bigendian in
23718 yes)
Benjamin Petersona8332062009-09-11 22:36:27 +000023719
23720cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023721#define WORDS_BIGENDIAN 1
Benjamin Petersona8332062009-09-11 22:36:27 +000023722_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023723 ;;
23724 no)
23725 ;;
23726 *)
23727 { { echo "$as_me:$LINENO: error: unknown endianness
23728presetting ac_cv_c_bigendian=no (or yes) will help" >&5
23729echo "$as_me: error: unknown endianness
23730presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023731 { (exit 1); exit 1; }; } ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023732esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023733
Michael W. Hudson54241132001-12-07 15:38:26 +000023734
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023735# Check whether right shifting a negative integer extends the sign bit
23736# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023737{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23738echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023739if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023740 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023741else
Martin v. Löwis11437992002-04-12 09:54:03 +000023742
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023743if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023744 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023745else
Martin v. Löwis11437992002-04-12 09:54:03 +000023746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023747/* confdefs.h. */
23748_ACEOF
23749cat confdefs.h >>conftest.$ac_ext
23750cat >>conftest.$ac_ext <<_ACEOF
23751/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023752
23753int main()
23754{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023755 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023756}
23757
Martin v. Löwis11437992002-04-12 09:54:03 +000023758_ACEOF
23759rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023760if { (ac_try="$ac_link"
23761case "(($ac_try" in
23762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23763 *) ac_try_echo=$ac_try;;
23764esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023766 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023767 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023769 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023770 { (case "(($ac_try" in
23771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23772 *) ac_try_echo=$ac_try;;
23773esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023775 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023776 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023778 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023779 ac_cv_rshift_extends_sign=yes
23780else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023781 echo "$as_me: program exited with status $ac_status" >&5
23782echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023783sed 's/^/| /' conftest.$ac_ext >&5
23784
Martin v. Löwis11437992002-04-12 09:54:03 +000023785( exit $ac_status )
23786ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023788rm -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 +000023789fi
23790
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023791
23792fi
23793
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023794{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23795echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023796if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023797then
Martin v. Löwis11437992002-04-12 09:54:03 +000023798
23799cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023800#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023801_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023802
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023803fi
23804
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023805# check for getc_unlocked and related locking functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023806{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
23807echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023808if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023809 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023810else
Martin v. Löwis11437992002-04-12 09:54:03 +000023811
23812cat >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. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023818#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023819int
23820main ()
23821{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023822
23823 FILE *f = fopen("/dev/null", "r");
23824 flockfile(f);
23825 getc_unlocked(f);
23826 funlockfile(f);
23827
Martin v. Löwis11437992002-04-12 09:54:03 +000023828 ;
23829 return 0;
23830}
23831_ACEOF
23832rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023833if { (ac_try="$ac_link"
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_link") 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
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023848 } && test -s conftest$ac_exeext &&
23849 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023850 ac_cv_have_getc_unlocked=yes
23851else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023853sed 's/^/| /' conftest.$ac_ext >&5
23854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023855 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023857
23858rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023859 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023860fi
23861
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023862{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
23863echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023864if test "$ac_cv_have_getc_unlocked" = yes
23865then
Martin v. Löwis11437992002-04-12 09:54:03 +000023866
23867cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023868#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023869_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023870
23871fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023872
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023873# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000023874# save the value of LIBS so we don't actually link Python with readline
23875LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023876
Gregory P. Smith18820942008-09-07 06:24:49 +000023877# On some systems we need to link readline to a termcap compatible
23878# library. NOTE: Keep the precedence of listed libraries synchronised
23879# with setup.py.
23880py_cv_lib_readline=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023881{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
23882echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000023883for py_libtermcap in "" ncursesw ncurses curses termcap; do
23884 if test -z "$py_libtermcap"; then
23885 READLINE_LIBS="-lreadline"
23886 else
23887 READLINE_LIBS="-lreadline -l$py_libtermcap"
23888 fi
23889 LIBS="$READLINE_LIBS $LIBS_no_readline"
23890 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023891/* confdefs.h. */
23892_ACEOF
23893cat confdefs.h >>conftest.$ac_ext
23894cat >>conftest.$ac_ext <<_ACEOF
23895/* end confdefs.h. */
23896
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023897/* Override any GCC internal prototype to avoid an error.
23898 Use char because int might match the return type of a GCC
23899 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023900#ifdef __cplusplus
23901extern "C"
23902#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023903char readline ();
23904int
23905main ()
23906{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023907return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023908 ;
23909 return 0;
23910}
23911_ACEOF
23912rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023913if { (ac_try="$ac_link"
23914case "(($ac_try" in
23915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23916 *) ac_try_echo=$ac_try;;
23917esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023919 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023920 ac_status=$?
23921 grep -v '^ *+' conftest.er1 >conftest.err
23922 rm -f conftest.er1
23923 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023925 (exit $ac_status); } && {
23926 test -z "$ac_c_werror_flag" ||
23927 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023928 } && test -s conftest$ac_exeext &&
23929 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000023930 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023931else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023932 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023933sed 's/^/| /' conftest.$ac_ext >&5
23934
Gregory P. Smith18820942008-09-07 06:24:49 +000023935
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023937
23938rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023939 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000023940 if test $py_cv_lib_readline = yes; then
23941 break
23942 fi
23943done
23944# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
23945#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000023946if test $py_cv_lib_readline = no; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023947 { echo "$as_me:$LINENO: result: none" >&5
23948echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000023949else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023950 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
23951echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000023952
23953cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023954#define HAVE_LIBREADLINE 1
23955_ACEOF
23956
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023957fi
23958
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023959# check for readline 2.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023960{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
23961echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023962if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023963 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023964else
23965 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000023966LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023967cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023968/* confdefs.h. */
23969_ACEOF
23970cat confdefs.h >>conftest.$ac_ext
23971cat >>conftest.$ac_ext <<_ACEOF
23972/* end confdefs.h. */
23973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023974/* Override any GCC internal prototype to avoid an error.
23975 Use char because int might match the return type of a GCC
23976 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023977#ifdef __cplusplus
23978extern "C"
23979#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023980char rl_callback_handler_install ();
23981int
23982main ()
23983{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023984return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023985 ;
23986 return 0;
23987}
23988_ACEOF
23989rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023990if { (ac_try="$ac_link"
23991case "(($ac_try" in
23992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23993 *) ac_try_echo=$ac_try;;
23994esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023996 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023997 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023998 grep -v '^ *+' conftest.er1 >conftest.err
23999 rm -f conftest.er1
24000 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024002 (exit $ac_status); } && {
24003 test -z "$ac_c_werror_flag" ||
24004 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024005 } && test -s conftest$ac_exeext &&
24006 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024007 ac_cv_lib_readline_rl_callback_handler_install=yes
24008else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024009 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024010sed 's/^/| /' conftest.$ac_ext >&5
24011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024012 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024014
24015rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024016 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024017LIBS=$ac_check_lib_save_LIBS
24018fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024019{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
24020echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
24021if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024022
24023cat >>confdefs.h <<\_ACEOF
24024#define HAVE_RL_CALLBACK 1
24025_ACEOF
24026
24027fi
24028
24029
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024030# check for readline 2.2
24031cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024032/* confdefs.h. */
24033_ACEOF
24034cat confdefs.h >>conftest.$ac_ext
24035cat >>conftest.$ac_ext <<_ACEOF
24036/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024037#include <readline/readline.h>
24038_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024039if { (ac_try="$ac_cpp conftest.$ac_ext"
24040case "(($ac_try" in
24041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24042 *) ac_try_echo=$ac_try;;
24043esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024045 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024046 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024047 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024048 rm -f conftest.er1
24049 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024051 (exit $ac_status); } >/dev/null && {
24052 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24053 test ! -s conftest.err
24054 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024055 have_readline=yes
24056else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024058sed 's/^/| /' conftest.$ac_ext >&5
24059
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024060 have_readline=no
24061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024062
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024063rm -f conftest.err conftest.$ac_ext
24064if test $have_readline = yes
24065then
24066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024067/* confdefs.h. */
24068_ACEOF
24069cat confdefs.h >>conftest.$ac_ext
24070cat >>conftest.$ac_ext <<_ACEOF
24071/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024072#include <readline/readline.h>
24073
24074_ACEOF
24075if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000024076 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024077
24078cat >>confdefs.h <<\_ACEOF
24079#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
24080_ACEOF
24081
24082fi
Mark Dickinson875ada42009-11-28 12:52:39 +000024083rm -f conftest*
Antoine Pitrou37276002009-10-26 19:32:51 +000024084
24085 cat >conftest.$ac_ext <<_ACEOF
24086/* confdefs.h. */
24087_ACEOF
24088cat confdefs.h >>conftest.$ac_ext
24089cat >>conftest.$ac_ext <<_ACEOF
24090/* end confdefs.h. */
24091#include <readline/readline.h>
24092
24093_ACEOF
24094if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24095 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
24096
24097cat >>confdefs.h <<\_ACEOF
24098#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
24099_ACEOF
24100
24101fi
Mark Dickinson875ada42009-11-28 12:52:39 +000024102rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024103
24104fi
24105
Martin v. Löwis0daad592001-09-30 21:09:59 +000024106# check for readline 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024107{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
24108echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024109if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024110 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000024111else
Martin v. Löwis11437992002-04-12 09:54:03 +000024112 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024113LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024114cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024115/* confdefs.h. */
24116_ACEOF
24117cat confdefs.h >>conftest.$ac_ext
24118cat >>conftest.$ac_ext <<_ACEOF
24119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024120
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024121/* Override any GCC internal prototype to avoid an error.
24122 Use char because int might match the return type of a GCC
24123 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024124#ifdef __cplusplus
24125extern "C"
24126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024127char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024128int
24129main ()
24130{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024131return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024132 ;
24133 return 0;
24134}
24135_ACEOF
24136rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024137if { (ac_try="$ac_link"
24138case "(($ac_try" in
24139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24140 *) ac_try_echo=$ac_try;;
24141esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024143 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024145 grep -v '^ *+' conftest.er1 >conftest.err
24146 rm -f conftest.er1
24147 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024149 (exit $ac_status); } && {
24150 test -z "$ac_c_werror_flag" ||
24151 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024152 } && test -s conftest$ac_exeext &&
24153 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024154 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000024155else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024157sed 's/^/| /' conftest.$ac_ext >&5
24158
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024159 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000024160fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024161
24162rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024163 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024164LIBS=$ac_check_lib_save_LIBS
24165fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024166{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
24167echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
24168if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024169
Martin v. Löwis11437992002-04-12 09:54:03 +000024170cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024171#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024172_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024173
Martin v. Löwis0daad592001-09-30 21:09:59 +000024174fi
24175
Michael W. Hudson54241132001-12-07 15:38:26 +000024176
Thomas Wouters89d996e2007-09-08 17:39:28 +000024177# also in 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024178{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
24179echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000024180if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024181 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000024182else
24183 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024184LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000024185cat >conftest.$ac_ext <<_ACEOF
24186/* confdefs.h. */
24187_ACEOF
24188cat confdefs.h >>conftest.$ac_ext
24189cat >>conftest.$ac_ext <<_ACEOF
24190/* end confdefs.h. */
24191
24192/* Override any GCC internal prototype to avoid an error.
24193 Use char because int might match the return type of a GCC
24194 builtin and then its argument prototype would still apply. */
24195#ifdef __cplusplus
24196extern "C"
24197#endif
24198char rl_completion_display_matches_hook ();
24199int
24200main ()
24201{
24202return rl_completion_display_matches_hook ();
24203 ;
24204 return 0;
24205}
24206_ACEOF
24207rm -f conftest.$ac_objext conftest$ac_exeext
24208if { (ac_try="$ac_link"
24209case "(($ac_try" in
24210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24211 *) ac_try_echo=$ac_try;;
24212esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024214 (eval "$ac_link") 2>conftest.er1
24215 ac_status=$?
24216 grep -v '^ *+' conftest.er1 >conftest.err
24217 rm -f conftest.er1
24218 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024220 (exit $ac_status); } && {
24221 test -z "$ac_c_werror_flag" ||
24222 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024223 } && test -s conftest$ac_exeext &&
24224 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024225 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
24226else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024227 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024228sed 's/^/| /' conftest.$ac_ext >&5
24229
24230 ac_cv_lib_readline_rl_completion_display_matches_hook=no
24231fi
24232
24233rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24234 conftest$ac_exeext conftest.$ac_ext
24235LIBS=$ac_check_lib_save_LIBS
24236fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024237{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
24238echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
24239if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024240
24241cat >>confdefs.h <<\_ACEOF
24242#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
24243_ACEOF
24244
24245fi
24246
24247
Martin v. Löwis0daad592001-09-30 21:09:59 +000024248# check for readline 4.2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024249{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24250echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024251if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024252 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024253else
Martin v. Löwis11437992002-04-12 09:54:03 +000024254 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024255LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024256cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024257/* confdefs.h. */
24258_ACEOF
24259cat confdefs.h >>conftest.$ac_ext
24260cat >>conftest.$ac_ext <<_ACEOF
24261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024263/* Override any GCC internal prototype to avoid an error.
24264 Use char because int might match the return type of a GCC
24265 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024266#ifdef __cplusplus
24267extern "C"
24268#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024269char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024270int
24271main ()
24272{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024273return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024274 ;
24275 return 0;
24276}
24277_ACEOF
24278rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024279if { (ac_try="$ac_link"
24280case "(($ac_try" in
24281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24282 *) ac_try_echo=$ac_try;;
24283esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024285 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024287 grep -v '^ *+' conftest.er1 >conftest.err
24288 rm -f conftest.er1
24289 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024291 (exit $ac_status); } && {
24292 test -z "$ac_c_werror_flag" ||
24293 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024294 } && test -s conftest$ac_exeext &&
24295 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024296 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024297else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024299sed 's/^/| /' conftest.$ac_ext >&5
24300
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024301 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024303
24304rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024305 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024306LIBS=$ac_check_lib_save_LIBS
24307fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024308{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24309echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
24310if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024311
Martin v. Löwis11437992002-04-12 09:54:03 +000024312cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024313#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024314_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024315
Guido van Rossum353ae582001-07-10 16:45:32 +000024316fi
24317
Jack Jansendd19cf82001-12-06 22:36:17 +000024318
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024319# also in readline 4.2
24320cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024321/* confdefs.h. */
24322_ACEOF
24323cat confdefs.h >>conftest.$ac_ext
24324cat >>conftest.$ac_ext <<_ACEOF
24325/* end confdefs.h. */
24326#include <readline/readline.h>
24327_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024328if { (ac_try="$ac_cpp conftest.$ac_ext"
24329case "(($ac_try" in
24330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24331 *) ac_try_echo=$ac_try;;
24332esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024334 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024335 ac_status=$?
24336 grep -v '^ *+' conftest.er1 >conftest.err
24337 rm -f conftest.er1
24338 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024340 (exit $ac_status); } >/dev/null && {
24341 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24342 test ! -s conftest.err
24343 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024344 have_readline=yes
24345else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024346 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024347sed 's/^/| /' conftest.$ac_ext >&5
24348
24349 have_readline=no
24350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024351
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024352rm -f conftest.err conftest.$ac_ext
24353if test $have_readline = yes
24354then
24355 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024356/* confdefs.h. */
24357_ACEOF
24358cat confdefs.h >>conftest.$ac_ext
24359cat >>conftest.$ac_ext <<_ACEOF
24360/* end confdefs.h. */
24361#include <readline/readline.h>
24362
24363_ACEOF
24364if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24365 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24366
24367cat >>confdefs.h <<\_ACEOF
24368#define HAVE_RL_CATCH_SIGNAL 1
24369_ACEOF
24370
24371fi
Mark Dickinson875ada42009-11-28 12:52:39 +000024372rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024373
24374fi
24375
Martin v. Löwis82bca632006-02-10 20:49:30 +000024376# End of readline checks: restore LIBS
24377LIBS=$LIBS_no_readline
24378
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024379{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24380echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024381if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024382 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024383else
Martin v. Löwis11437992002-04-12 09:54:03 +000024384
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024385if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024386 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024387else
Martin v. Löwis11437992002-04-12 09:54:03 +000024388 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024389/* confdefs.h. */
24390_ACEOF
24391cat confdefs.h >>conftest.$ac_ext
24392cat >>conftest.$ac_ext <<_ACEOF
24393/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024394
24395int main()
24396{
24397 int val1 = nice(1);
24398 if (val1 != -1 && val1 == nice(2))
24399 exit(0);
24400 exit(1);
24401}
24402
Martin v. Löwis11437992002-04-12 09:54:03 +000024403_ACEOF
24404rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024405if { (ac_try="$ac_link"
24406case "(($ac_try" in
24407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24408 *) ac_try_echo=$ac_try;;
24409esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024411 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024412 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024414 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024415 { (case "(($ac_try" in
24416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24417 *) ac_try_echo=$ac_try;;
24418esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024420 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024421 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024423 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024424 ac_cv_broken_nice=yes
24425else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024426 echo "$as_me: program exited with status $ac_status" >&5
24427echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024428sed 's/^/| /' conftest.$ac_ext >&5
24429
Martin v. Löwis11437992002-04-12 09:54:03 +000024430( exit $ac_status )
24431ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024433rm -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 +000024434fi
24435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024436
24437fi
24438
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024439{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24440echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024441if test "$ac_cv_broken_nice" = yes
24442then
Martin v. Löwis11437992002-04-12 09:54:03 +000024443
24444cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024445#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024446_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024447
24448fi
24449
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024450{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24451echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024452if test "$cross_compiling" = yes; then
24453 ac_cv_broken_poll=no
24454else
24455 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024456/* confdefs.h. */
24457_ACEOF
24458cat confdefs.h >>conftest.$ac_ext
24459cat >>conftest.$ac_ext <<_ACEOF
24460/* end confdefs.h. */
24461
24462#include <poll.h>
24463
24464int main (void)
24465 {
24466 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24467
24468 close (42);
24469
24470 int poll_test = poll (&poll_struct, 1, 0);
24471
24472 if (poll_test < 0)
24473 {
24474 exit(0);
24475 }
24476 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24477 {
24478 exit(0);
24479 }
24480 else
24481 {
24482 exit(1);
24483 }
24484 }
24485
24486_ACEOF
24487rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024488if { (ac_try="$ac_link"
24489case "(($ac_try" in
24490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24491 *) ac_try_echo=$ac_try;;
24492esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024494 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024495 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024497 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024498 { (case "(($ac_try" in
24499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24500 *) ac_try_echo=$ac_try;;
24501esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024503 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024504 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024506 (exit $ac_status); }; }; then
24507 ac_cv_broken_poll=yes
24508else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024509 echo "$as_me: program exited with status $ac_status" >&5
24510echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024511sed 's/^/| /' conftest.$ac_ext >&5
24512
24513( exit $ac_status )
24514ac_cv_broken_poll=no
24515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024516rm -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 +000024517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024518
24519
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024520{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24521echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024522if test "$ac_cv_broken_poll" = yes
24523then
24524
24525cat >>confdefs.h <<\_ACEOF
24526#define HAVE_BROKEN_POLL 1
24527_ACEOF
24528
24529fi
24530
Brett Cannon43802422005-02-10 20:48:03 +000024531# 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 +000024532# (which is not required by ISO C or UNIX spec) and/or if we support
24533# tzname[]
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024534{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24535echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024536if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024537 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024538else
24539 cat >conftest.$ac_ext <<_ACEOF
24540/* confdefs.h. */
24541_ACEOF
24542cat confdefs.h >>conftest.$ac_ext
24543cat >>conftest.$ac_ext <<_ACEOF
24544/* end confdefs.h. */
24545#include <sys/types.h>
24546#include <$ac_cv_struct_tm>
24547
24548
24549int
24550main ()
24551{
24552static struct tm ac_aggr;
24553if (ac_aggr.tm_zone)
24554return 0;
24555 ;
24556 return 0;
24557}
24558_ACEOF
24559rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024560if { (ac_try="$ac_compile"
24561case "(($ac_try" in
24562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24563 *) ac_try_echo=$ac_try;;
24564esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024566 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024567 ac_status=$?
24568 grep -v '^ *+' conftest.er1 >conftest.err
24569 rm -f conftest.er1
24570 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024572 (exit $ac_status); } && {
24573 test -z "$ac_c_werror_flag" ||
24574 test ! -s conftest.err
24575 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024576 ac_cv_member_struct_tm_tm_zone=yes
24577else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024578 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024579sed 's/^/| /' conftest.$ac_ext >&5
24580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024581 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024582/* confdefs.h. */
24583_ACEOF
24584cat confdefs.h >>conftest.$ac_ext
24585cat >>conftest.$ac_ext <<_ACEOF
24586/* end confdefs.h. */
24587#include <sys/types.h>
24588#include <$ac_cv_struct_tm>
24589
24590
24591int
24592main ()
24593{
24594static struct tm ac_aggr;
24595if (sizeof ac_aggr.tm_zone)
24596return 0;
24597 ;
24598 return 0;
24599}
24600_ACEOF
24601rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024602if { (ac_try="$ac_compile"
24603case "(($ac_try" in
24604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24605 *) ac_try_echo=$ac_try;;
24606esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024608 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024609 ac_status=$?
24610 grep -v '^ *+' conftest.er1 >conftest.err
24611 rm -f conftest.er1
24612 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024614 (exit $ac_status); } && {
24615 test -z "$ac_c_werror_flag" ||
24616 test ! -s conftest.err
24617 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024618 ac_cv_member_struct_tm_tm_zone=yes
24619else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024620 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024621sed 's/^/| /' conftest.$ac_ext >&5
24622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024623 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024625
24626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024628
24629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024630fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024631{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24632echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
24633if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000024634
24635cat >>confdefs.h <<_ACEOF
24636#define HAVE_STRUCT_TM_TM_ZONE 1
24637_ACEOF
24638
24639
24640fi
24641
24642if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24643
24644cat >>confdefs.h <<\_ACEOF
24645#define HAVE_TM_ZONE 1
24646_ACEOF
24647
24648else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024649 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24650echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024651if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024652 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024653else
24654 cat >conftest.$ac_ext <<_ACEOF
24655/* confdefs.h. */
24656_ACEOF
24657cat confdefs.h >>conftest.$ac_ext
24658cat >>conftest.$ac_ext <<_ACEOF
24659/* end confdefs.h. */
24660#include <time.h>
24661
24662int
24663main ()
24664{
24665#ifndef tzname
24666 (void) tzname;
24667#endif
24668
24669 ;
24670 return 0;
24671}
24672_ACEOF
24673rm -f conftest.$ac_objext
24674if { (ac_try="$ac_compile"
24675case "(($ac_try" in
24676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24677 *) ac_try_echo=$ac_try;;
24678esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024680 (eval "$ac_compile") 2>conftest.er1
24681 ac_status=$?
24682 grep -v '^ *+' conftest.er1 >conftest.err
24683 rm -f conftest.er1
24684 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024686 (exit $ac_status); } && {
24687 test -z "$ac_c_werror_flag" ||
24688 test ! -s conftest.err
24689 } && test -s conftest.$ac_objext; then
24690 ac_cv_have_decl_tzname=yes
24691else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024692 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024693sed 's/^/| /' conftest.$ac_ext >&5
24694
24695 ac_cv_have_decl_tzname=no
24696fi
24697
24698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24699fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024700{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24701echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24702if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024703
24704cat >>confdefs.h <<_ACEOF
24705#define HAVE_DECL_TZNAME 1
24706_ACEOF
24707
24708
24709else
24710 cat >>confdefs.h <<_ACEOF
24711#define HAVE_DECL_TZNAME 0
24712_ACEOF
24713
24714
24715fi
24716
24717
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024718 { echo "$as_me:$LINENO: checking for tzname" >&5
24719echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024720if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024721 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024722else
24723 cat >conftest.$ac_ext <<_ACEOF
24724/* confdefs.h. */
24725_ACEOF
24726cat confdefs.h >>conftest.$ac_ext
24727cat >>conftest.$ac_ext <<_ACEOF
24728/* end confdefs.h. */
24729#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024730#if !HAVE_DECL_TZNAME
24731extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024732#endif
24733
24734int
24735main ()
24736{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024737return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024738 ;
24739 return 0;
24740}
24741_ACEOF
24742rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024743if { (ac_try="$ac_link"
24744case "(($ac_try" in
24745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24746 *) ac_try_echo=$ac_try;;
24747esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024749 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024750 ac_status=$?
24751 grep -v '^ *+' conftest.er1 >conftest.err
24752 rm -f conftest.er1
24753 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024755 (exit $ac_status); } && {
24756 test -z "$ac_c_werror_flag" ||
24757 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024758 } && test -s conftest$ac_exeext &&
24759 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024760 ac_cv_var_tzname=yes
24761else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024762 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024763sed 's/^/| /' conftest.$ac_ext >&5
24764
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024765 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024766fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024767
24768rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024769 conftest$ac_exeext conftest.$ac_ext
24770fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024771{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24772echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024773 if test $ac_cv_var_tzname = yes; then
24774
24775cat >>confdefs.h <<\_ACEOF
24776#define HAVE_TZNAME 1
24777_ACEOF
24778
24779 fi
24780fi
24781
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024782
Martin v. Löwis1d459062005-03-14 21:23:33 +000024783# check tzset(3) exists and works like we expect it to
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024784{ echo "$as_me:$LINENO: checking for working tzset()" >&5
24785echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024786if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024787 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024788else
24789
24790if test "$cross_compiling" = yes; then
24791 ac_cv_working_tzset=no
24792else
24793 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024794/* confdefs.h. */
24795_ACEOF
24796cat confdefs.h >>conftest.$ac_ext
24797cat >>conftest.$ac_ext <<_ACEOF
24798/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024799
24800#include <stdlib.h>
24801#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000024802#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000024803
24804#if HAVE_TZNAME
24805extern char *tzname[];
24806#endif
24807
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024808int main()
24809{
Brett Cannon18367812003-09-19 00:59:16 +000024810 /* Note that we need to ensure that not only does tzset(3)
24811 do 'something' with localtime, but it works as documented
24812 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000024813 This includes making sure that tzname is set properly if
24814 tm->tm_zone does not exist since it is the alternative way
24815 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000024816
24817 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000024818 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000024819 */
24820
Martin v. Löwis1d459062005-03-14 21:23:33 +000024821 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000024822 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
24823
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024824 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024825 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024826 if (localtime(&groundhogday)->tm_hour != 0)
24827 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024828#if HAVE_TZNAME
24829 /* For UTC, tzname[1] is sometimes "", sometimes " " */
24830 if (strcmp(tzname[0], "UTC") ||
24831 (tzname[1][0] != 0 && tzname[1][0] != ' '))
24832 exit(1);
24833#endif
Brett Cannon18367812003-09-19 00:59:16 +000024834
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024835 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024836 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024837 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024838 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024839#if HAVE_TZNAME
24840 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
24841 exit(1);
24842#endif
Brett Cannon18367812003-09-19 00:59:16 +000024843
24844 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
24845 tzset();
24846 if (localtime(&groundhogday)->tm_hour != 11)
24847 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024848#if HAVE_TZNAME
24849 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
24850 exit(1);
24851#endif
24852
24853#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000024854 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
24855 exit(1);
24856 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
24857 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024858#endif
Brett Cannon18367812003-09-19 00:59:16 +000024859
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024860 exit(0);
24861}
24862
24863_ACEOF
24864rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024865if { (ac_try="$ac_link"
24866case "(($ac_try" in
24867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24868 *) ac_try_echo=$ac_try;;
24869esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024871 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024872 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024874 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024875 { (case "(($ac_try" in
24876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24877 *) ac_try_echo=$ac_try;;
24878esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024880 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024881 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024883 (exit $ac_status); }; }; then
24884 ac_cv_working_tzset=yes
24885else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024886 echo "$as_me: program exited with status $ac_status" >&5
24887echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024888sed 's/^/| /' conftest.$ac_ext >&5
24889
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024890( exit $ac_status )
24891ac_cv_working_tzset=no
24892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024893rm -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 +000024894fi
24895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024896
24897fi
24898
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024899{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
24900echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024901if test "$ac_cv_working_tzset" = yes
24902then
24903
24904cat >>confdefs.h <<\_ACEOF
24905#define HAVE_WORKING_TZSET 1
24906_ACEOF
24907
24908fi
24909
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024910# Look for subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024911{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
24912echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024913if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024914 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024915else
24916 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024917/* confdefs.h. */
24918_ACEOF
24919cat confdefs.h >>conftest.$ac_ext
24920cat >>conftest.$ac_ext <<_ACEOF
24921/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024922#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024923int
24924main ()
24925{
24926
24927struct stat st;
24928st.st_mtim.tv_nsec = 1;
24929
24930 ;
24931 return 0;
24932}
24933_ACEOF
24934rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024935if { (ac_try="$ac_compile"
24936case "(($ac_try" in
24937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24938 *) ac_try_echo=$ac_try;;
24939esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024941 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024943 grep -v '^ *+' conftest.er1 >conftest.err
24944 rm -f conftest.er1
24945 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024947 (exit $ac_status); } && {
24948 test -z "$ac_c_werror_flag" ||
24949 test ! -s conftest.err
24950 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000024951 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024952else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024954sed 's/^/| /' conftest.$ac_ext >&5
24955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024956 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024957fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024958
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24960fi
24961
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024962{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
24963echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024964if test "$ac_cv_stat_tv_nsec" = yes
24965then
24966
24967cat >>confdefs.h <<\_ACEOF
24968#define HAVE_STAT_TV_NSEC 1
24969_ACEOF
24970
24971fi
24972
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024973# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024974{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
24975echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024976if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024977 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024978else
24979 cat >conftest.$ac_ext <<_ACEOF
24980/* confdefs.h. */
24981_ACEOF
24982cat confdefs.h >>conftest.$ac_ext
24983cat >>conftest.$ac_ext <<_ACEOF
24984/* end confdefs.h. */
24985#include <sys/stat.h>
24986int
24987main ()
24988{
24989
24990struct stat st;
24991st.st_mtimespec.tv_nsec = 1;
24992
24993 ;
24994 return 0;
24995}
24996_ACEOF
24997rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024998if { (ac_try="$ac_compile"
24999case "(($ac_try" in
25000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25001 *) ac_try_echo=$ac_try;;
25002esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025004 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025005 ac_status=$?
25006 grep -v '^ *+' conftest.er1 >conftest.err
25007 rm -f conftest.er1
25008 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025010 (exit $ac_status); } && {
25011 test -z "$ac_c_werror_flag" ||
25012 test ! -s conftest.err
25013 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025014 ac_cv_stat_tv_nsec2=yes
25015else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025016 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025017sed 's/^/| /' conftest.$ac_ext >&5
25018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025019 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025020fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25023fi
25024
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025025{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
25026echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025027if test "$ac_cv_stat_tv_nsec2" = yes
25028then
25029
25030cat >>confdefs.h <<\_ACEOF
25031#define HAVE_STAT_TV_NSEC2 1
25032_ACEOF
25033
25034fi
25035
Jack Jansen666b1e72001-10-31 12:11:48 +000025036# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025037{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
25038echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025039if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025040 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025041else
Martin v. Löwis11437992002-04-12 09:54:03 +000025042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025043/* confdefs.h. */
25044_ACEOF
25045cat confdefs.h >>conftest.$ac_ext
25046cat >>conftest.$ac_ext <<_ACEOF
25047/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025048#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025049int
25050main ()
25051{
Jack Jansen666b1e72001-10-31 12:11:48 +000025052
25053 int rtn;
25054 rtn = mvwdelch(0,0,0);
25055
Martin v. Löwis11437992002-04-12 09:54:03 +000025056 ;
25057 return 0;
25058}
25059_ACEOF
25060rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025061if { (ac_try="$ac_compile"
25062case "(($ac_try" in
25063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25064 *) ac_try_echo=$ac_try;;
25065esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025067 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025068 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025069 grep -v '^ *+' conftest.er1 >conftest.err
25070 rm -f conftest.er1
25071 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025073 (exit $ac_status); } && {
25074 test -z "$ac_c_werror_flag" ||
25075 test ! -s conftest.err
25076 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025077 ac_cv_mvwdelch_is_expression=yes
25078else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025080sed 's/^/| /' conftest.$ac_ext >&5
25081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025082 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025083fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25086fi
25087
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025088{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
25089echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000025090
25091if test "$ac_cv_mvwdelch_is_expression" = yes
25092then
Martin v. Löwis11437992002-04-12 09:54:03 +000025093
25094cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025095#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025096_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025097
25098fi
25099
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025100{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
25101echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025102if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025103 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025104else
Martin v. Löwis11437992002-04-12 09:54:03 +000025105 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025106/* confdefs.h. */
25107_ACEOF
25108cat confdefs.h >>conftest.$ac_ext
25109cat >>conftest.$ac_ext <<_ACEOF
25110/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025111#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025112int
25113main ()
25114{
Jack Jansen666b1e72001-10-31 12:11:48 +000025115
25116 WINDOW *w;
25117 w->_flags = 0;
25118
Martin v. Löwis11437992002-04-12 09:54:03 +000025119 ;
25120 return 0;
25121}
25122_ACEOF
25123rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025124if { (ac_try="$ac_compile"
25125case "(($ac_try" in
25126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25127 *) ac_try_echo=$ac_try;;
25128esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025130 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025131 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025132 grep -v '^ *+' conftest.er1 >conftest.err
25133 rm -f conftest.er1
25134 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025136 (exit $ac_status); } && {
25137 test -z "$ac_c_werror_flag" ||
25138 test ! -s conftest.err
25139 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025140 ac_cv_window_has_flags=yes
25141else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025142 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025143sed 's/^/| /' conftest.$ac_ext >&5
25144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025145 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025146fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25149fi
25150
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025151{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
25152echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025153
Jack Jansen666b1e72001-10-31 12:11:48 +000025154
25155if test "$ac_cv_window_has_flags" = yes
25156then
Martin v. Löwis11437992002-04-12 09:54:03 +000025157
25158cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025159#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025160_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025161
25162fi
25163
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025164{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
25165echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025166cat >conftest.$ac_ext <<_ACEOF
25167/* confdefs.h. */
25168_ACEOF
25169cat confdefs.h >>conftest.$ac_ext
25170cat >>conftest.$ac_ext <<_ACEOF
25171/* end confdefs.h. */
25172#include <curses.h>
25173int
25174main ()
25175{
25176void *x=is_term_resized
25177 ;
25178 return 0;
25179}
25180_ACEOF
25181rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025182if { (ac_try="$ac_compile"
25183case "(($ac_try" in
25184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25185 *) ac_try_echo=$ac_try;;
25186esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025188 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025189 ac_status=$?
25190 grep -v '^ *+' conftest.er1 >conftest.err
25191 rm -f conftest.er1
25192 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025194 (exit $ac_status); } && {
25195 test -z "$ac_c_werror_flag" ||
25196 test ! -s conftest.err
25197 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025198
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025199cat >>confdefs.h <<\_ACEOF
25200#define HAVE_CURSES_IS_TERM_RESIZED 1
25201_ACEOF
25202
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025203 { echo "$as_me:$LINENO: result: yes" >&5
25204echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025205else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025206 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025207sed 's/^/| /' conftest.$ac_ext >&5
25208
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025209 { echo "$as_me:$LINENO: result: no" >&5
25210echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025211
25212fi
25213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25215
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025216{ echo "$as_me:$LINENO: checking for resize_term" >&5
25217echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025218cat >conftest.$ac_ext <<_ACEOF
25219/* confdefs.h. */
25220_ACEOF
25221cat confdefs.h >>conftest.$ac_ext
25222cat >>conftest.$ac_ext <<_ACEOF
25223/* end confdefs.h. */
25224#include <curses.h>
25225int
25226main ()
25227{
25228void *x=resize_term
25229 ;
25230 return 0;
25231}
25232_ACEOF
25233rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025234if { (ac_try="$ac_compile"
25235case "(($ac_try" in
25236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25237 *) ac_try_echo=$ac_try;;
25238esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025240 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025241 ac_status=$?
25242 grep -v '^ *+' conftest.er1 >conftest.err
25243 rm -f conftest.er1
25244 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025246 (exit $ac_status); } && {
25247 test -z "$ac_c_werror_flag" ||
25248 test ! -s conftest.err
25249 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025250
25251cat >>confdefs.h <<\_ACEOF
25252#define HAVE_CURSES_RESIZE_TERM 1
25253_ACEOF
25254
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025255 { echo "$as_me:$LINENO: result: yes" >&5
25256echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025257else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025258 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025259sed 's/^/| /' conftest.$ac_ext >&5
25260
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025261 { echo "$as_me:$LINENO: result: no" >&5
25262echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025263
25264fi
25265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25267
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025268{ echo "$as_me:$LINENO: checking for resizeterm" >&5
25269echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025270cat >conftest.$ac_ext <<_ACEOF
25271/* confdefs.h. */
25272_ACEOF
25273cat confdefs.h >>conftest.$ac_ext
25274cat >>conftest.$ac_ext <<_ACEOF
25275/* end confdefs.h. */
25276#include <curses.h>
25277int
25278main ()
25279{
25280void *x=resizeterm
25281 ;
25282 return 0;
25283}
25284_ACEOF
25285rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025286if { (ac_try="$ac_compile"
25287case "(($ac_try" in
25288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25289 *) ac_try_echo=$ac_try;;
25290esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025292 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025293 ac_status=$?
25294 grep -v '^ *+' conftest.er1 >conftest.err
25295 rm -f conftest.er1
25296 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025298 (exit $ac_status); } && {
25299 test -z "$ac_c_werror_flag" ||
25300 test ! -s conftest.err
25301 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025302
25303cat >>confdefs.h <<\_ACEOF
25304#define HAVE_CURSES_RESIZETERM 1
25305_ACEOF
25306
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025307 { echo "$as_me:$LINENO: result: yes" >&5
25308echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025309else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025310 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025311sed 's/^/| /' conftest.$ac_ext >&5
25312
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025313 { echo "$as_me:$LINENO: result: no" >&5
25314echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025315
25316fi
25317
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25319
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025320{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25321echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025322
25323if test -r /dev/ptmx
25324then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025325 { echo "$as_me:$LINENO: result: yes" >&5
25326echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025327
25328cat >>confdefs.h <<\_ACEOF
25329#define HAVE_DEV_PTMX 1
25330_ACEOF
25331
Thomas Wouters89f507f2006-12-13 04:49:30 +000025332else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025333 { echo "$as_me:$LINENO: result: no" >&5
25334echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025335fi
25336
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025337{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25338echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025339
25340if test -r /dev/ptc
25341then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025342 { echo "$as_me:$LINENO: result: yes" >&5
25343echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025344
25345cat >>confdefs.h <<\_ACEOF
25346#define HAVE_DEV_PTC 1
25347_ACEOF
25348
Thomas Wouters89f507f2006-12-13 04:49:30 +000025349else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025350 { echo "$as_me:$LINENO: result: no" >&5
25351echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025352fi
25353
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025354{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25355echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025356if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025357 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025358See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025359echo "$as_me: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025360See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025361 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025362else
25363 cat >conftest.$ac_ext <<_ACEOF
25364/* confdefs.h. */
25365_ACEOF
25366cat confdefs.h >>conftest.$ac_ext
25367cat >>conftest.$ac_ext <<_ACEOF
25368/* end confdefs.h. */
25369#include <stdio.h>
25370#include <stddef.h>
25371#include <string.h>
25372
Christian Heimes2c181612007-12-17 20:04:13 +000025373#ifdef HAVE_SYS_TYPES_H
25374#include <sys/types.h>
25375#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000025376
25377#ifdef HAVE_SSIZE_T
25378typedef ssize_t Py_ssize_t;
25379#elif SIZEOF_VOID_P == SIZEOF_LONG
25380typedef long Py_ssize_t;
25381#else
25382typedef int Py_ssize_t;
25383#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000025384
Christian Heimes2c181612007-12-17 20:04:13 +000025385int main()
25386{
25387 char buffer[256];
25388
Thomas Wouters477c8d52006-05-27 19:21:47 +000025389 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25390 return 1;
25391
Thomas Wouters89f507f2006-12-13 04:49:30 +000025392 if (strcmp(buffer, "123"))
25393 return 1;
25394
25395 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25396 return 1;
25397
25398 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000025399 return 1;
25400
25401 return 0;
25402}
25403_ACEOF
25404rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025405if { (ac_try="$ac_link"
25406case "(($ac_try" in
25407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25408 *) ac_try_echo=$ac_try;;
25409esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025411 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025412 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025414 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025415 { (case "(($ac_try" in
25416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25417 *) ac_try_echo=$ac_try;;
25418esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025420 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025421 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025423 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025424 { echo "$as_me:$LINENO: result: yes" >&5
25425echo "${ECHO_T}yes" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025426
25427cat >>confdefs.h <<\_ACEOF
25428#define PY_FORMAT_SIZE_T "z"
25429_ACEOF
25430
25431else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025432 echo "$as_me: program exited with status $ac_status" >&5
25433echo "$as_me: failed program was:" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025434sed 's/^/| /' conftest.$ac_ext >&5
25435
25436( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025437{ echo "$as_me:$LINENO: result: no" >&5
25438echo "${ECHO_T}no" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025440rm -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 +000025441fi
25442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025443
25444
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025445{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25446echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025447if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025448 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025449else
Martin v. Löwis11437992002-04-12 09:54:03 +000025450 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025451/* confdefs.h. */
25452_ACEOF
25453cat confdefs.h >>conftest.$ac_ext
25454cat >>conftest.$ac_ext <<_ACEOF
25455/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025456
25457#ifdef HAVE_SYS_TYPES_H
25458#include <sys/types.h>
25459#endif
25460#ifdef HAVE_SYS_SOCKET_H
25461#include <sys/socket.h>
25462#endif
25463
25464
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025465typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025466int
25467main ()
25468{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025469if ((ac__type_new_ *) 0)
25470 return 0;
25471if (sizeof (ac__type_new_))
25472 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025473 ;
25474 return 0;
25475}
25476_ACEOF
25477rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025478if { (ac_try="$ac_compile"
25479case "(($ac_try" in
25480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25481 *) ac_try_echo=$ac_try;;
25482esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025484 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025485 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025486 grep -v '^ *+' conftest.er1 >conftest.err
25487 rm -f conftest.er1
25488 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025490 (exit $ac_status); } && {
25491 test -z "$ac_c_werror_flag" ||
25492 test ! -s conftest.err
25493 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025494 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025495else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025497sed 's/^/| /' conftest.$ac_ext >&5
25498
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025499 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025501
25502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025503fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025504{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25505echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
25506if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025507 :
25508else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025509
Martin v. Löwis01c04012002-11-11 14:58:44 +000025510cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025511#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025512_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025513
25514fi
25515
Michael W. Hudson54241132001-12-07 15:38:26 +000025516
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025517{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
25518echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025519if test "$cross_compiling" = yes; then
25520 ac_cv_broken_mbstowcs=no
25521else
25522 cat >conftest.$ac_ext <<_ACEOF
25523/* confdefs.h. */
25524_ACEOF
25525cat confdefs.h >>conftest.$ac_ext
25526cat >>conftest.$ac_ext <<_ACEOF
25527/* end confdefs.h. */
25528
25529#include<stdlib.h>
25530int main() {
25531 size_t len = -1;
25532 const char *str = "text";
25533 len = mbstowcs(NULL, str, 0);
25534 return (len != 4);
25535}
25536
25537_ACEOF
25538rm -f conftest$ac_exeext
25539if { (ac_try="$ac_link"
25540case "(($ac_try" in
25541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25542 *) ac_try_echo=$ac_try;;
25543esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025545 (eval "$ac_link") 2>&5
25546 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025548 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25549 { (case "(($ac_try" in
25550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25551 *) ac_try_echo=$ac_try;;
25552esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025554 (eval "$ac_try") 2>&5
25555 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025557 (exit $ac_status); }; }; then
25558 ac_cv_broken_mbstowcs=no
25559else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025560 echo "$as_me: program exited with status $ac_status" >&5
25561echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025562sed 's/^/| /' conftest.$ac_ext >&5
25563
25564( exit $ac_status )
25565ac_cv_broken_mbstowcs=yes
25566fi
25567rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25568fi
25569
25570
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025571{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
25572echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025573if test "$ac_cv_broken_mbstowcs" = yes
25574then
25575
25576cat >>confdefs.h <<\_ACEOF
25577#define HAVE_BROKEN_MBSTOWCS 1
25578_ACEOF
25579
25580fi
25581
Antoine Pitroub52ec782009-01-25 16:34:23 +000025582# Check for --with-computed-gotos
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025583{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
25584echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025585
25586# Check whether --with-computed-gotos was given.
25587if test "${with_computed_gotos+set}" = set; then
25588 withval=$with_computed_gotos;
25589if test "$withval" != no
25590then
25591
25592cat >>confdefs.h <<\_ACEOF
25593#define USE_COMPUTED_GOTOS 1
25594_ACEOF
25595
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025596 { echo "$as_me:$LINENO: result: yes" >&5
25597echo "${ECHO_T}yes" >&6; }
25598else { echo "$as_me:$LINENO: result: no" >&5
25599echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025600fi
25601else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025602 { echo "$as_me:$LINENO: result: no" >&5
25603echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025604fi
25605
25606
Ronald Oussoren1b2cad02009-11-19 17:30:05 +000025607if test $ac_sys_system = Darwin
25608then
25609 LIBS="$LIBS -framework CoreFoundation"
25610fi
25611
25612
Antoine Pitroub52ec782009-01-25 16:34:23 +000025613
Michael W. Hudson54241132001-12-07 15:38:26 +000025614
25615
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025616for h in `(cd $srcdir;echo Python/thread_*.h)`
25617do
25618 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25619done
25620
Michael W. Hudson54241132001-12-07 15:38:26 +000025621
Neal Norwitzd24499d2005-12-18 21:36:39 +000025622SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025623{ echo "$as_me:$LINENO: checking for build directories" >&5
25624echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025625for dir in $SRCDIRS; do
25626 if test ! -d $dir; then
25627 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025628 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025629done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025630{ echo "$as_me:$LINENO: result: done" >&5
25631echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025632
Guido van Rossum627b2d71993-12-24 10:39:16 +000025633# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000025634ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025635
Martin v. Löwis11437992002-04-12 09:54:03 +000025636cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025637# This file is a shell script that caches the results of configure
25638# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025639# scripts and configure runs, see configure's option --config-cache.
25640# It is not useful on other systems. If it contains results you don't
25641# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025642#
Martin v. Löwis11437992002-04-12 09:54:03 +000025643# config.status only pays attention to the cache file if you give it
25644# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025645#
Skip Montanaro6dead952003-09-25 14:50:04 +000025646# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025647# loading this file, other *unset* `ac_cv_foo' will be assigned the
25648# following values.
25649
25650_ACEOF
25651
Guido van Rossumf78abae1997-01-21 22:02:36 +000025652# The following way of writing the cache mishandles newlines in values,
25653# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025654# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025655# Ultrix sh set writes to stderr and can't be redirected directly,
25656# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025657(
25658 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25659 eval ac_val=\$$ac_var
25660 case $ac_val in #(
25661 *${as_nl}*)
25662 case $ac_var in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025663 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25664echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025665 esac
25666 case $ac_var in #(
25667 _ | IFS | as_nl) ;; #(
25668 *) $as_unset $ac_var ;;
25669 esac ;;
25670 esac
25671 done
25672
Martin v. Löwis11437992002-04-12 09:54:03 +000025673 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025674 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25675 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025676 # `set' does not quote correctly, so add quotes (double-quote
25677 # substitution turns \\\\ into \\, and sed turns \\ into \).
25678 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025679 "s/'/'\\\\''/g;
25680 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025681 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025682 *)
25683 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025684 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025685 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025686 esac |
25687 sort
25688) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025689 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025690 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025691 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025692 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025693 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25694 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025695 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25696 :end' >>confcache
25697if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25698 if test -w "$cache_file"; then
25699 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025700 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25701echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025702 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025703 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025704 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25705echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025706 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025707fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025708rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025709
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025710test "x$prefix" = xNONE && prefix=$ac_default_prefix
25711# Let make expand exec_prefix.
25712test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025713
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025714DEFS=-DHAVE_CONFIG_H
25715
Skip Montanaro6dead952003-09-25 14:50:04 +000025716ac_libobjs=
25717ac_ltlibobjs=
25718for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25719 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025720 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025721 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025722 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25723 # will be set to the directory where LIBOBJS objects are built.
25724 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25725 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025726done
25727LIBOBJS=$ac_libobjs
25728
25729LTLIBOBJS=$ac_ltlibobjs
25730
25731
Martin v. Löwis11437992002-04-12 09:54:03 +000025732
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025733: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025734ac_clean_files_save=$ac_clean_files
25735ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025736{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25737echo "$as_me: creating $CONFIG_STATUS" >&6;}
25738cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025739#! $SHELL
25740# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025741# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025742# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025743# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025744
Martin v. Löwis11437992002-04-12 09:54:03 +000025745debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025746ac_cs_recheck=false
25747ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025748SHELL=\${CONFIG_SHELL-$SHELL}
25749_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025750
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025751cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025752## --------------------- ##
25753## M4sh Initialization. ##
25754## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025756# Be more Bourne compatible
25757DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025758if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25759 emulate sh
25760 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025761 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025762 # is contrary to our usage. Disable this feature.
25763 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025764 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025765else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025766 case `(set -o) 2>/dev/null` in
25767 *posix*) set -o posix ;;
25768esac
25769
Michael W. Hudson54241132001-12-07 15:38:26 +000025770fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000025771
25772
Michael W. Hudson54241132001-12-07 15:38:26 +000025773
Michael W. Hudson54241132001-12-07 15:38:26 +000025774
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025775# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025776# Avoid depending upon Character Ranges.
25777as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25778as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25779as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25780as_cr_digits='0123456789'
25781as_cr_alnum=$as_cr_Letters$as_cr_digits
25782
25783# The user is always right.
25784if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025785 echo "#! /bin/sh" >conf$$.sh
25786 echo "exit 0" >>conf$$.sh
25787 chmod +x conf$$.sh
25788 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
25789 PATH_SEPARATOR=';'
25790 else
25791 PATH_SEPARATOR=:
25792 fi
25793 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025794fi
25795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025796# Support unset when possible.
25797if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25798 as_unset=unset
25799else
25800 as_unset=false
25801fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025802
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025803
25804# IFS
25805# We need space, tab and new line, in precisely that order. Quoting is
25806# there to prevent editors from complaining about space-tab.
25807# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25808# splitting by setting IFS to empty value.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025809as_nl='
25810'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025811IFS=" "" $as_nl"
25812
25813# Find who we are. Look in the path if we contain no directory separator.
25814case $0 in
25815 *[\\/]* ) as_myself=$0 ;;
25816 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000025817for as_dir in $PATH
25818do
25819 IFS=$as_save_IFS
25820 test -z "$as_dir" && as_dir=.
25821 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25822done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025823IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000025824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025825 ;;
25826esac
25827# We did not find ourselves, most probably we were run as `sh COMMAND'
25828# in which case we are not to be found in the path.
25829if test "x$as_myself" = x; then
25830 as_myself=$0
25831fi
25832if test ! -f "$as_myself"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025833 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025834 { (exit 1); exit 1; }
25835fi
25836
25837# Work around bugs in pre-3.0 UWIN ksh.
25838for as_var in ENV MAIL MAILPATH
25839do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25840done
25841PS1='$ '
25842PS2='> '
25843PS4='+ '
25844
25845# NLS nuisances.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025846for as_var in \
25847 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
25848 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
25849 LC_TELEPHONE LC_TIME
25850do
25851 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
25852 eval $as_var=C; export $as_var
25853 else
25854 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25855 fi
25856done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025857
25858# Required to use basename.
25859if expr a : '\(a\)' >/dev/null 2>&1 &&
25860 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25861 as_expr=expr
25862else
25863 as_expr=false
25864fi
25865
25866if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25867 as_basename=basename
25868else
25869 as_basename=false
25870fi
25871
25872
25873# Name of the executable.
25874as_me=`$as_basename -- "$0" ||
25875$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25876 X"$0" : 'X\(//\)$' \| \
25877 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025878echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025879 sed '/^.*\/\([^/][^/]*\)\/*$/{
25880 s//\1/
25881 q
25882 }
25883 /^X\/\(\/\/\)$/{
25884 s//\1/
25885 q
25886 }
25887 /^X\/\(\/\).*/{
25888 s//\1/
25889 q
25890 }
25891 s/.*/./; q'`
25892
25893# CDPATH.
25894$as_unset CDPATH
25895
25896
25897
Martin v. Löwis11437992002-04-12 09:54:03 +000025898 as_lineno_1=$LINENO
25899 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000025900 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025901 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000025902
Martin v. Löwis11437992002-04-12 09:54:03 +000025903 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25904 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025905 # line-number line after each line using $LINENO; the second 'sed'
25906 # does the real work. The second script uses 'N' to pair each
25907 # line-number line with the line containing $LINENO, and appends
25908 # trailing '-' during substitution so that $LINENO is not a special
25909 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000025910 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025911 # scripts with optimization help from Paolo Bonzini. Blame Lee
25912 # E. McMahon (1931-1989) for sed's syntax. :-)
25913 sed -n '
25914 p
25915 /[$]LINENO/=
25916 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000025917 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025918 s/[$]LINENO.*/&-/
25919 t lineno
25920 b
25921 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000025922 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025923 :loop
25924 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000025925 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025926 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000025927 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025928 chmod +x "$as_me.lineno" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025929 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025930 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025931
Martin v. Löwis11437992002-04-12 09:54:03 +000025932 # Don't try to exec as it changes $[0], causing all sort of problems
25933 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025934 # original and so on. Autoconf is especially sensitive to this).
25935 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000025936 # Exit status is that of the last command.
25937 exit
25938}
25939
25940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025941if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25942 as_dirname=dirname
25943else
25944 as_dirname=false
25945fi
25946
25947ECHO_C= ECHO_N= ECHO_T=
25948case `echo -n x` in
25949-n*)
25950 case `echo 'x\c'` in
25951 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25952 *) ECHO_C='\c';;
25953 esac;;
25954*)
25955 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000025956esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025957
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025958if expr a : '\(a\)' >/dev/null 2>&1 &&
25959 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025960 as_expr=expr
25961else
25962 as_expr=false
25963fi
25964
25965rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025966if test -d conf$$.dir; then
25967 rm -f conf$$.dir/conf$$.file
25968else
25969 rm -f conf$$.dir
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025970 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025971fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025972echo >conf$$.file
25973if ln -s conf$$.file conf$$ 2>/dev/null; then
25974 as_ln_s='ln -s'
25975 # ... but there are two gotchas:
25976 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25977 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25978 # In both cases, we have to default to `cp -p'.
25979 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025980 as_ln_s='cp -p'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025981elif ln conf$$.file conf$$ 2>/dev/null; then
25982 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000025983else
25984 as_ln_s='cp -p'
25985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025986rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25987rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000025988
Skip Montanaro6dead952003-09-25 14:50:04 +000025989if mkdir -p . 2>/dev/null; then
25990 as_mkdir_p=:
25991else
Skip Montanarof0d5f792004-08-15 14:08:23 +000025992 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000025993 as_mkdir_p=false
25994fi
25995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025996if test -x / >/dev/null 2>&1; then
25997 as_test_x='test -x'
25998else
25999 if ls -dL / >/dev/null 2>&1; then
26000 as_ls_L_option=L
26001 else
26002 as_ls_L_option=
26003 fi
26004 as_test_x='
26005 eval sh -c '\''
26006 if test -d "$1"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026007 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026008 else
26009 case $1 in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026010 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026011 esac;
26012 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
26013 ???[sx]*):;;*)false;;esac;fi
26014 '\'' sh
26015 '
26016fi
26017as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000026018
26019# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026020as_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 +000026021
26022# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026023as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026024
26025
Martin v. Löwis11437992002-04-12 09:54:03 +000026026exec 6>&1
26027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026028# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000026029# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026030# values after options handling.
26031ac_log="
Christian Heimes70e5cab2008-12-03 18:18:23 +000026032This file was extended by python $as_me 3.1, which was
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026033generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000026034
26035 CONFIG_FILES = $CONFIG_FILES
26036 CONFIG_HEADERS = $CONFIG_HEADERS
26037 CONFIG_LINKS = $CONFIG_LINKS
26038 CONFIG_COMMANDS = $CONFIG_COMMANDS
26039 $ $0 $@
26040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026041on `(hostname || uname -n) 2>/dev/null | sed 1q`
26042"
26043
Martin v. Löwis11437992002-04-12 09:54:03 +000026044_ACEOF
26045
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026046cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026047# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000026048config_files="$ac_config_files"
26049config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000026050
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026051_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026052
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026053cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026054ac_cs_usage="\
26055\`$as_me' instantiates files from templates according to the
26056current configuration.
26057
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026058Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000026059
26060 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026061 -V, --version print version number and configuration settings, then exit
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026062 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000026063 -d, --debug don't remove temporary files
26064 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026065 --file=FILE[:TEMPLATE]
26066 instantiate the configuration file FILE
26067 --header=FILE[:TEMPLATE]
26068 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026069
26070Configuration files:
26071$config_files
26072
26073Configuration headers:
26074$config_headers
26075
26076Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026078_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026079cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026080ac_cs_version="\\
Christian Heimes70e5cab2008-12-03 18:18:23 +000026081python config.status 3.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026082configured by $0, generated by GNU Autoconf 2.61,
26083 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000026084
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026085Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000026086This config.status script is free software; the Free Software Foundation
26087gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026088
26089ac_pwd='$ac_pwd'
26090srcdir='$srcdir'
26091INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000026092_ACEOF
26093
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026094cat >>$CONFIG_STATUS <<\_ACEOF
26095# If no file are specified by the user, then we need to provide default
26096# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000026097ac_need_defaults=:
26098while test $# != 0
26099do
26100 case $1 in
26101 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026102 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26103 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000026104 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000026105 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026106 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000026107 ac_option=$1
26108 ac_optarg=$2
26109 ac_shift=shift
26110 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026111 esac
26112
Skip Montanaro6dead952003-09-25 14:50:04 +000026113 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000026114 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000026115 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26116 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026117 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026118 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026119 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000026120 debug=: ;;
26121 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000026122 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026123 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026124 ac_need_defaults=false;;
26125 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000026126 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026127 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026128 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026129 --he | --h)
26130 # Conflict between --help and --header
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026131 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026132Try \`$0 --help' for more information." >&2
26133 { (exit 1); exit 1; }; };;
26134 --help | --hel | -h )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026135 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000026136 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26137 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26138 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026139
26140 # This is an error.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026141 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026142Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026143 { (exit 1); exit 1; }; } ;;
26144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026145 *) ac_config_targets="$ac_config_targets $1"
26146 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026147
26148 esac
26149 shift
26150done
26151
Skip Montanaro6dead952003-09-25 14:50:04 +000026152ac_configure_extra_args=
26153
26154if $ac_cs_silent; then
26155 exec 6>/dev/null
26156 ac_configure_extra_args="$ac_configure_extra_args --silent"
26157fi
26158
26159_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026160cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026161if \$ac_cs_recheck; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026162 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
26163 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026164 export CONFIG_SHELL
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026165 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000026166fi
26167
Martin v. Löwis11437992002-04-12 09:54:03 +000026168_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026169cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026170exec 5>>config.log
26171{
26172 echo
26173 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26174## Running $as_me. ##
26175_ASBOX
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026176 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026177} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026178
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026179_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026180cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026181_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026182
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026183cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026184
26185# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000026186for ac_config_target in $ac_config_targets
26187do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026188 case $ac_config_target in
26189 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
26190 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
26191 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000026192 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
26193 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026194 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
26195 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000026196 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026197
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026198 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
26199echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026200 { (exit 1); exit 1; }; };;
26201 esac
26202done
26203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026204
Martin v. Löwis11437992002-04-12 09:54:03 +000026205# If the user did not use the arguments to specify the items to instantiate,
26206# then the envvar interface is used. Set only those that are not.
26207# We use the long form for the default assignment because of an extremely
26208# bizarre bug on SunOS 4.1.3.
26209if $ac_need_defaults; then
26210 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26211 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26212fi
26213
Skip Montanaro6dead952003-09-25 14:50:04 +000026214# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026215# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000026216# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026217# Hook for its removal unless debugging.
26218# Note that there is a small window in which the directory will not be cleaned:
26219# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000026220$debug ||
26221{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026222 tmp=
26223 trap 'exit_status=$?
26224 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26225' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000026226 trap '{ (exit 1); exit 1; }' 1 2 13 15
26227}
Martin v. Löwis11437992002-04-12 09:54:03 +000026228# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000026229
Martin v. Löwis11437992002-04-12 09:54:03 +000026230{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026231 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026232 test -n "$tmp" && test -d "$tmp"
26233} ||
26234{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026235 tmp=./conf$$-$RANDOM
26236 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000026237} ||
26238{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026239 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026240 { (exit 1); exit 1; }
26241}
26242
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026243#
26244# Set up the sed scripts for CONFIG_FILES section.
26245#
26246
26247# No need to generate the scripts if there are no CONFIG_FILES.
26248# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026249if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026250
26251_ACEOF
26252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026253
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026254
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026255ac_delim='%!_!# '
26256for ac_last_try in false false false false false :; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026257 cat >conf$$subs.sed <<_ACEOF
26258SHELL!$SHELL$ac_delim
26259PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
26260PACKAGE_NAME!$PACKAGE_NAME$ac_delim
26261PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
26262PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
26263PACKAGE_STRING!$PACKAGE_STRING$ac_delim
26264PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
26265exec_prefix!$exec_prefix$ac_delim
26266prefix!$prefix$ac_delim
26267program_transform_name!$program_transform_name$ac_delim
26268bindir!$bindir$ac_delim
26269sbindir!$sbindir$ac_delim
26270libexecdir!$libexecdir$ac_delim
26271datarootdir!$datarootdir$ac_delim
26272datadir!$datadir$ac_delim
26273sysconfdir!$sysconfdir$ac_delim
26274sharedstatedir!$sharedstatedir$ac_delim
26275localstatedir!$localstatedir$ac_delim
26276includedir!$includedir$ac_delim
26277oldincludedir!$oldincludedir$ac_delim
26278docdir!$docdir$ac_delim
26279infodir!$infodir$ac_delim
26280htmldir!$htmldir$ac_delim
26281dvidir!$dvidir$ac_delim
26282pdfdir!$pdfdir$ac_delim
26283psdir!$psdir$ac_delim
26284libdir!$libdir$ac_delim
26285localedir!$localedir$ac_delim
26286mandir!$mandir$ac_delim
26287DEFS!$DEFS$ac_delim
26288ECHO_C!$ECHO_C$ac_delim
26289ECHO_N!$ECHO_N$ac_delim
26290ECHO_T!$ECHO_T$ac_delim
26291LIBS!$LIBS$ac_delim
26292build_alias!$build_alias$ac_delim
26293host_alias!$host_alias$ac_delim
26294target_alias!$target_alias$ac_delim
26295VERSION!$VERSION$ac_delim
26296SOVERSION!$SOVERSION$ac_delim
26297CONFIG_ARGS!$CONFIG_ARGS$ac_delim
26298UNIVERSALSDK!$UNIVERSALSDK$ac_delim
26299ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
26300PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
26301PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
26302PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
26303PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
26304PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
26305FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
26306FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
26307FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
26308FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
26309FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
26310MACHDEP!$MACHDEP$ac_delim
26311SGI_ABI!$SGI_ABI$ac_delim
26312CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
26313EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
26314CC!$CC$ac_delim
26315CFLAGS!$CFLAGS$ac_delim
26316LDFLAGS!$LDFLAGS$ac_delim
26317CPPFLAGS!$CPPFLAGS$ac_delim
26318ac_ct_CC!$ac_ct_CC$ac_delim
26319EXEEXT!$EXEEXT$ac_delim
26320OBJEXT!$OBJEXT$ac_delim
26321CXX!$CXX$ac_delim
26322MAINCC!$MAINCC$ac_delim
26323CPP!$CPP$ac_delim
26324GREP!$GREP$ac_delim
26325EGREP!$EGREP$ac_delim
26326BUILDEXEEXT!$BUILDEXEEXT$ac_delim
26327LIBRARY!$LIBRARY$ac_delim
26328LDLIBRARY!$LDLIBRARY$ac_delim
26329DLLLIBRARY!$DLLLIBRARY$ac_delim
26330BLDLIBRARY!$BLDLIBRARY$ac_delim
26331LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
26332INSTSONAME!$INSTSONAME$ac_delim
26333RUNSHARED!$RUNSHARED$ac_delim
26334LINKCC!$LINKCC$ac_delim
26335GNULD!$GNULD$ac_delim
26336RANLIB!$RANLIB$ac_delim
26337AR!$AR$ac_delim
26338ARFLAGS!$ARFLAGS$ac_delim
26339SVNVERSION!$SVNVERSION$ac_delim
26340INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
26341INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
26342INSTALL_DATA!$INSTALL_DATA$ac_delim
26343LN!$LN$ac_delim
26344OPT!$OPT$ac_delim
26345BASECFLAGS!$BASECFLAGS$ac_delim
26346UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
26347OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
26348LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
26349SO!$SO$ac_delim
26350LDSHARED!$LDSHARED$ac_delim
26351BLDSHARED!$BLDSHARED$ac_delim
26352CCSHARED!$CCSHARED$ac_delim
26353LINKFORSHARED!$LINKFORSHARED$ac_delim
26354CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
26355_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026356
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026357 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026358 break
26359 elif $ac_last_try; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026360 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26361echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026362 { (exit 1); exit 1; }; }
26363 else
26364 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026365 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026366done
26367
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026368ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26369if test -n "$ac_eof"; then
26370 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26371 ac_eof=`expr $ac_eof + 1`
26372fi
26373
26374cat >>$CONFIG_STATUS <<_ACEOF
26375cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26376/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026377_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026378sed '
26379s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26380s/^/s,@/; s/!/@,|#_!!_#|/
26381:n
26382t n
26383s/'"$ac_delim"'$/,g/; t
26384s/$/\\/; p
26385N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26386' >>$CONFIG_STATUS <conf$$subs.sed
26387rm -f conf$$subs.sed
26388cat >>$CONFIG_STATUS <<_ACEOF
26389CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026390_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026391
26392
26393ac_delim='%!_!# '
26394for ac_last_try in false false false false false :; do
26395 cat >conf$$subs.sed <<_ACEOF
26396SHLIBS!$SHLIBS$ac_delim
26397USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
26398SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
26399USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
26400LDLAST!$LDLAST$ac_delim
26401THREADOBJ!$THREADOBJ$ac_delim
26402DLINCLDIR!$DLINCLDIR$ac_delim
26403DYNLOADFILE!$DYNLOADFILE$ac_delim
26404MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
26405TRUE!$TRUE$ac_delim
26406LIBOBJS!$LIBOBJS$ac_delim
26407HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
26408HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
26409HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
26410HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
26411HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
26412LIBM!$LIBM$ac_delim
26413LIBC!$LIBC$ac_delim
26414THREADHEADERS!$THREADHEADERS$ac_delim
26415SRCDIRS!$SRCDIRS$ac_delim
26416LTLIBOBJS!$LTLIBOBJS$ac_delim
26417_ACEOF
26418
26419 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
26420 break
26421 elif $ac_last_try; then
26422 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26423echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026424 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026425 else
26426 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26427 fi
26428done
26429
26430ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26431if test -n "$ac_eof"; then
26432 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26433 ac_eof=`expr $ac_eof + 1`
26434fi
26435
26436cat >>$CONFIG_STATUS <<_ACEOF
26437cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26438/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026439_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026440sed '
26441s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26442s/^/s,@/; s/!/@,|#_!!_#|/
26443:n
26444t n
26445s/'"$ac_delim"'$/,g/; t
26446s/$/\\/; p
26447N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26448' >>$CONFIG_STATUS <conf$$subs.sed
26449rm -f conf$$subs.sed
26450cat >>$CONFIG_STATUS <<_ACEOF
26451:end
26452s/|#_!!_#|//g
26453CEOF$ac_eof
26454_ACEOF
26455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026456
26457# VPATH may cause trouble with some makes, so we remove $(srcdir),
26458# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26459# trailing colons and then remove the whole line if VPATH becomes empty
26460# (actually we leave an empty line to preserve line numbers).
26461if test "x$srcdir" = x.; then
26462 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26463s/:*\$(srcdir):*/:/
26464s/:*\${srcdir}:*/:/
26465s/:*@srcdir@:*/:/
26466s/^\([^=]*=[ ]*\):*/\1/
26467s/:*$//
26468s/^[^=]*=[ ]*$//
26469}'
26470fi
26471
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026472cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026473fi # test -n "$CONFIG_FILES"
26474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026475
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026476for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026477do
26478 case $ac_tag in
26479 :[FHLC]) ac_mode=$ac_tag; continue;;
26480 esac
26481 case $ac_mode$ac_tag in
26482 :[FHL]*:*);;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026483 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26484echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026485 { (exit 1); exit 1; }; };;
26486 :[FH]-) ac_tag=-:-;;
26487 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26488 esac
26489 ac_save_IFS=$IFS
26490 IFS=:
26491 set x $ac_tag
26492 IFS=$ac_save_IFS
26493 shift
26494 ac_file=$1
26495 shift
26496
26497 case $ac_mode in
26498 :L) ac_source=$1;;
26499 :[FH])
26500 ac_file_inputs=
26501 for ac_f
26502 do
26503 case $ac_f in
26504 -) ac_f="$tmp/stdin";;
26505 *) # Look for the file first in the build tree, then in the source tree
26506 # (if the path is not absolute). The absolute path cannot be DOS-style,
26507 # because $ac_f cannot contain `:'.
26508 test -f "$ac_f" ||
26509 case $ac_f in
26510 [\\/$]*) false;;
26511 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26512 esac ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026513 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26514echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026515 { (exit 1); exit 1; }; };;
26516 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026517 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026518 done
26519
26520 # Let's still pretend it is `configure' which instantiates (i.e., don't
26521 # use $as_me), people would be surprised to read:
26522 # /* config.h. Generated by config.status. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026523 configure_input="Generated from "`IFS=:
26524 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026525 if test x"$ac_file" != x-; then
26526 configure_input="$ac_file. $configure_input"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026527 { echo "$as_me:$LINENO: creating $ac_file" >&5
26528echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026529 fi
26530
26531 case $ac_tag in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026532 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026533 esac
26534 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026535 esac
26536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026537 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026538$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026539 X"$ac_file" : 'X\(//\)[^/]' \| \
26540 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026541 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026542echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026543 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26544 s//\1/
26545 q
26546 }
26547 /^X\(\/\/\)[^/].*/{
26548 s//\1/
26549 q
26550 }
26551 /^X\(\/\/\)$/{
26552 s//\1/
26553 q
26554 }
26555 /^X\(\/\).*/{
26556 s//\1/
26557 q
26558 }
26559 s/.*/./; q'`
26560 { as_dir="$ac_dir"
26561 case $as_dir in #(
26562 -*) as_dir=./$as_dir;;
26563 esac
26564 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026565 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026566 while :; do
26567 case $as_dir in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026568 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026569 *) as_qdir=$as_dir;;
26570 esac
26571 as_dirs="'$as_qdir' $as_dirs"
26572 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026573$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026574 X"$as_dir" : 'X\(//\)[^/]' \| \
26575 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026576 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026577echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026578 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26579 s//\1/
26580 q
26581 }
26582 /^X\(\/\/\)[^/].*/{
26583 s//\1/
26584 q
26585 }
26586 /^X\(\/\/\)$/{
26587 s//\1/
26588 q
26589 }
26590 /^X\(\/\).*/{
26591 s//\1/
26592 q
26593 }
26594 s/.*/./; q'`
26595 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026596 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026597 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026598 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26599echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026600 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026601 ac_builddir=.
26602
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026603case "$ac_dir" in
26604.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26605*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026606 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026607 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026608 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026609 case $ac_top_builddir_sub in
26610 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26611 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26612 esac ;;
26613esac
26614ac_abs_top_builddir=$ac_pwd
26615ac_abs_builddir=$ac_pwd$ac_dir_suffix
26616# for backward compatibility:
26617ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026618
26619case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026620 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026621 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026622 ac_top_srcdir=$ac_top_builddir_sub
26623 ac_abs_top_srcdir=$ac_pwd ;;
26624 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026625 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026626 ac_top_srcdir=$srcdir
26627 ac_abs_top_srcdir=$srcdir ;;
26628 *) # Relative name.
26629 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26630 ac_top_srcdir=$ac_top_build_prefix$srcdir
26631 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026632esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026633ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026634
Martin v. Löwis11437992002-04-12 09:54:03 +000026635
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026636 case $ac_mode in
26637 :F)
26638 #
26639 # CONFIG_FILE
26640 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026641
26642 case $INSTALL in
26643 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026644 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026645 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000026646_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026647
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026648cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026649# If the template does not know about datarootdir, expand it.
26650# FIXME: This hack should be removed a few years after 2.60.
26651ac_datarootdir_hack=; ac_datarootdir_seen=
26652
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026653case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026654 p
26655 q
26656}
26657/@datadir@/p
26658/@docdir@/p
26659/@infodir@/p
26660/@localedir@/p
26661/@mandir@/p
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026662' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026663*datarootdir*) ac_datarootdir_seen=yes;;
26664*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026665 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26666echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026667_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026668cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026669 ac_datarootdir_hack='
26670 s&@datadir@&$datadir&g
26671 s&@docdir@&$docdir&g
26672 s&@infodir@&$infodir&g
26673 s&@localedir@&$localedir&g
26674 s&@mandir@&$mandir&g
26675 s&\\\${datarootdir}&$datarootdir&g' ;;
26676esac
26677_ACEOF
26678
26679# Neutralize VPATH when `$srcdir' = `.'.
26680# Shell code in configure.ac might set extrasub.
26681# FIXME: do we really want to maintain this feature?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026682cat >>$CONFIG_STATUS <<_ACEOF
26683 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000026684$extrasub
26685_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026686cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026687:t
26688/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026689s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026690s&@top_builddir@&$ac_top_builddir_sub&;t t
26691s&@srcdir@&$ac_srcdir&;t t
26692s&@abs_srcdir@&$ac_abs_srcdir&;t t
26693s&@top_srcdir@&$ac_top_srcdir&;t t
26694s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26695s&@builddir@&$ac_builddir&;t t
26696s&@abs_builddir@&$ac_abs_builddir&;t t
26697s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26698s&@INSTALL@&$ac_INSTALL&;t t
26699$ac_datarootdir_hack
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026700" $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 +000026701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026702test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26703 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26704 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026705 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026706which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026707echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026708which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026710 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026711 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026712 -) cat "$tmp/out"; rm -f "$tmp/out";;
26713 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
26714 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026715 ;;
26716 :H)
26717 #
26718 # CONFIG_HEADER
26719 #
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026720_ACEOF
26721
26722# Transform confdefs.h into a sed script `conftest.defines', that
26723# substitutes the proper values into config.h.in to produce config.h.
26724rm -f conftest.defines conftest.tail
26725# First, append a space to every undef/define line, to ease matching.
26726echo 's/$/ /' >conftest.defines
26727# Then, protect against being on the right side of a sed subst, or in
26728# an unquoted here document, in config.status. If some macros were
26729# called several times there might be several #defines for the same
26730# symbol, which is useless. But do not sort them, since the last
26731# AC_DEFINE must be honored.
26732ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26733# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26734# NAME is the cpp macro being defined, VALUE is the value it is being given.
26735# PARAMS is the parameter list in the macro definition--in most cases, it's
26736# just an empty string.
26737ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26738ac_dB='\\)[ (].*,\\1define\\2'
26739ac_dC=' '
26740ac_dD=' ,'
26741
26742uniq confdefs.h |
26743 sed -n '
26744 t rset
26745 :rset
26746 s/^[ ]*#[ ]*define[ ][ ]*//
26747 t ok
26748 d
26749 :ok
26750 s/[\\&,]/\\&/g
26751 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26752 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26753 ' >>conftest.defines
26754
26755# Remove the space that was appended to ease matching.
26756# Then replace #undef with comments. This is necessary, for
26757# example, in the case of _POSIX_SOURCE, which is predefined and required
26758# on some systems where configure will not decide to define it.
26759# (The regexp can be short, since the line contains either #define or #undef.)
26760echo 's/ $//
26761s,^[ #]*u.*,/* & */,' >>conftest.defines
26762
26763# Break up conftest.defines:
26764ac_max_sed_lines=50
26765
26766# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26767# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26768# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26769# et cetera.
26770ac_in='$ac_file_inputs'
26771ac_out='"$tmp/out1"'
26772ac_nxt='"$tmp/out2"'
26773
26774while :
26775do
26776 # Write a here document:
26777 cat >>$CONFIG_STATUS <<_ACEOF
26778 # First, check the format of the line:
26779 cat >"\$tmp/defines.sed" <<\\CEOF
26780/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
26781/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
26782b
26783:def
26784_ACEOF
26785 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
26786 echo 'CEOF
26787 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
26788 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
26789 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
26790 grep . conftest.tail >/dev/null || break
26791 rm -f conftest.defines
26792 mv conftest.tail conftest.defines
26793done
26794rm -f conftest.defines conftest.tail
26795
26796echo "ac_result=$ac_in" >>$CONFIG_STATUS
26797cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026798 if test x"$ac_file" != x-; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026799 echo "/* $configure_input */" >"$tmp/config.h"
26800 cat "$ac_result" >>"$tmp/config.h"
26801 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
26802 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
26803echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026804 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026805 rm -f $ac_file
26806 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000026807 fi
26808 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026809 echo "/* $configure_input */"
26810 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000026811 fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026812 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026813 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000026814
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026815
26816 esac
26817
26818done # for ac_tag
26819
Guido van Rossum627b2d71993-12-24 10:39:16 +000026820
Martin v. Löwis11437992002-04-12 09:54:03 +000026821{ (exit 0); exit 0; }
26822_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026823chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026824ac_clean_files=$ac_clean_files_save
26825
26826
26827# configure is writing to config.log, and then calls config.status.
26828# config.status does its own redirection, appending to config.log.
26829# Unfortunately, on DOS this fails, as config.log is still kept open
26830# by configure, so config.status won't be able to write to it; its
26831# output is simply discarded. So we exec the FD to /dev/null,
26832# effectively closing config.log, so it can be properly (re)opened and
26833# appended to by config.status. When coming back to configure, we
26834# need to make the FD available again.
26835if test "$no_create" != yes; then
26836 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000026837 ac_config_status_args=
26838 test "$silent" = yes &&
26839 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000026840 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000026841 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026842 exec 5>>config.log
26843 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26844 # would make configure fail if this is the last instruction.
26845 $ac_cs_success || { (exit 1); exit 1; }
26846fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000026847
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026848
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000026849echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026850if test ! -f Modules/Setup
26851then
26852 cp $srcdir/Modules/Setup.dist Modules/Setup
26853fi
26854
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000026855echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026856if test ! -f Modules/Setup.local
26857then
26858 echo "# Edit this file for local setup changes" >Modules/Setup.local
26859fi
26860
26861echo "creating Makefile"
26862$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
26863 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000026864 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000026865mv config.c Modules