blob: ff1a5607b73cadeabe5318bbd36b1fd024a4b67c [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Antoine Pitroud5131772009-10-26 19:22:14 +00002# From configure.in Revision: 75684 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004# Generated by GNU Autoconf 2.61 for python 3.2.
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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +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'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000578PACKAGE_VERSION='3.2'
579PACKAGE_STRING='python 3.2'
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 Oussoren74f29b42009-09-20 20:09:26 +0000619ac_subst_vars='SHELL
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000620PATH_SEPARATOR
Ronald Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001249\`configure' configures python 3.2 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 Oussoren74f29b42009-09-20 20:09:26 +00001271 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001310 short | recursive ) echo "Configuration of python 3.2:";;
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 Oussoren3c064c12009-09-08 07:12:42 +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
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001355 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001356 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001357 --with(out)-pymalloc disable/enable specialized mallocs
1358 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001359 --with-fpectl enable SIGFPE catching
1360 --with-libm=STRING math library
1361 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001362 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001363 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1364 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001365
1366Some influential environment variables:
1367 CC C compiler command
1368 CFLAGS C compiler flags
1369 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1370 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371 LIBS libraries to pass to the linker, e.g. -l<library>
1372 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1373 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001374 CPP C preprocessor
1375
1376Use these variables to override the choices made by `configure' or to help
1377it to find libraries and programs with nonstandard names/locations.
1378
Georg Brandle2e15612009-05-20 18:25:10 +00001379Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001380_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001381ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001382fi
1383
1384if test "$ac_init_help" = "recursive"; then
1385 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001386 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001387 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001388 ac_builddir=.
1389
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001390case "$ac_dir" in
1391.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1392*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001393 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001394 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001395 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001396 case $ac_top_builddir_sub in
1397 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1398 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1399 esac ;;
1400esac
1401ac_abs_top_builddir=$ac_pwd
1402ac_abs_builddir=$ac_pwd$ac_dir_suffix
1403# for backward compatibility:
1404ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001407 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001408 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001409 ac_top_srcdir=$ac_top_builddir_sub
1410 ac_abs_top_srcdir=$ac_pwd ;;
1411 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001413 ac_top_srcdir=$srcdir
1414 ac_abs_top_srcdir=$srcdir ;;
1415 *) # Relative name.
1416 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1417 ac_top_srcdir=$ac_top_build_prefix$srcdir
1418 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001419esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001420ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001422 cd "$ac_dir" || { ac_status=$?; continue; }
1423 # Check for guested configure.
1424 if test -f "$ac_srcdir/configure.gnu"; then
1425 echo &&
1426 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1427 elif test -f "$ac_srcdir/configure"; then
1428 echo &&
1429 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001431 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001432 fi || ac_status=$?
1433 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 done
1435fi
1436
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001437test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001438if $ac_init_version; then
1439 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001440python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001441generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014442002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001445This configure script is free software; the Free Software Foundation
1446gives unlimited permission to copy, distribute and modify it.
1447_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001448 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001450cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001451This file contains any messages produced by compilers while
1452running configure, to aid debugging if configure makes a mistake.
1453
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001454It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001455generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001456
1457 $ $0 $@
1458
1459_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001460exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001461{
1462cat <<_ASUNAME
1463## --------- ##
1464## Platform. ##
1465## --------- ##
1466
1467hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1468uname -m = `(uname -m) 2>/dev/null || echo unknown`
1469uname -r = `(uname -r) 2>/dev/null || echo unknown`
1470uname -s = `(uname -s) 2>/dev/null || echo unknown`
1471uname -v = `(uname -v) 2>/dev/null || echo unknown`
1472
1473/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1474/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1475
1476/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1477/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1478/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001479/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001480/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1481/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1482/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1483
1484_ASUNAME
1485
1486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1487for as_dir in $PATH
1488do
1489 IFS=$as_save_IFS
1490 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001491 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001492done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001494
1495} >&5
1496
1497cat >&5 <<_ACEOF
1498
1499
1500## ----------- ##
1501## Core tests. ##
1502## ----------- ##
1503
1504_ACEOF
1505
1506
1507# Keep a trace of the command line.
1508# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001509# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001510# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001511# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001512ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001513ac_configure_args0=
1514ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001515ac_must_keep_next=false
1516for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001517do
Skip Montanaro6dead952003-09-25 14:50:04 +00001518 for ac_arg
1519 do
1520 case $ac_arg in
1521 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1522 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1523 | -silent | --silent | --silen | --sile | --sil)
1524 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001525 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001526 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001527 esac
1528 case $ac_pass in
1529 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1530 2)
1531 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1532 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001533 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001534 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001535 case $ac_arg in
1536 *=* | --config-cache | -C | -disable-* | --disable-* \
1537 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1538 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1539 | -with-* | --with-* | -without-* | --without-* | --x)
1540 case "$ac_configure_args0 " in
1541 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1542 esac
1543 ;;
1544 -* ) ac_must_keep_next=true ;;
1545 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001546 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001547 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001548 ;;
1549 esac
1550 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001551done
Skip Montanaro6dead952003-09-25 14:50:04 +00001552$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1553$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 +00001554
1555# When interrupted or exit'd, cleanup temporary files, and complete
1556# config.log. We remove comments because anyway the quotes in there
1557# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558# WARNING: Use '\'' to represent an apostrophe within the trap.
1559# 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 +00001560trap 'exit_status=$?
1561 # Save into config.log some information that might help in debugging.
1562 {
1563 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001564
Martin v. Löwis11437992002-04-12 09:54:03 +00001565 cat <<\_ASBOX
1566## ---------------- ##
1567## Cache variables. ##
1568## ---------------- ##
1569_ASBOX
1570 echo
1571 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001572(
1573 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1574 eval ac_val=\$$ac_var
1575 case $ac_val in #(
1576 *${as_nl}*)
1577 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001578 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1579echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 esac
1581 case $ac_var in #(
1582 _ | IFS | as_nl) ;; #(
1583 *) $as_unset $ac_var ;;
1584 esac ;;
1585 esac
1586 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001587 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1589 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001590 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 "s/'\''/'\''\\\\'\'''\''/g;
1592 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1593 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001594 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001596 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 esac |
1598 sort
1599)
Martin v. Löwis11437992002-04-12 09:54:03 +00001600 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001601
1602 cat <<\_ASBOX
1603## ----------------- ##
1604## Output variables. ##
1605## ----------------- ##
1606_ASBOX
1607 echo
1608 for ac_var in $ac_subst_vars
1609 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001610 eval ac_val=\$$ac_var
1611 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001612 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001614 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001615 done | sort
1616 echo
1617
1618 if test -n "$ac_subst_files"; then
1619 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001620## ------------------- ##
1621## File substitutions. ##
1622## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001623_ASBOX
1624 echo
1625 for ac_var in $ac_subst_files
1626 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 eval ac_val=\$$ac_var
1628 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001629 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001631 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001632 done | sort
1633 echo
1634 fi
1635
Martin v. Löwis11437992002-04-12 09:54:03 +00001636 if test -s confdefs.h; then
1637 cat <<\_ASBOX
1638## ----------- ##
1639## confdefs.h. ##
1640## ----------- ##
1641_ASBOX
1642 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001643 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001644 echo
1645 fi
1646 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001647 echo "$as_me: caught signal $ac_signal"
1648 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001649 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001650 rm -f core *.core core.conftest.* &&
1651 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001652 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001653' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001654for ac_signal in 1 2 13 15; do
1655 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1656done
1657ac_signal=0
1658
1659# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001660rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001661
1662# Predefined preprocessor variables.
1663
1664cat >>confdefs.h <<_ACEOF
1665#define PACKAGE_NAME "$PACKAGE_NAME"
1666_ACEOF
1667
1668
1669cat >>confdefs.h <<_ACEOF
1670#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1671_ACEOF
1672
1673
1674cat >>confdefs.h <<_ACEOF
1675#define PACKAGE_VERSION "$PACKAGE_VERSION"
1676_ACEOF
1677
1678
1679cat >>confdefs.h <<_ACEOF
1680#define PACKAGE_STRING "$PACKAGE_STRING"
1681_ACEOF
1682
1683
1684cat >>confdefs.h <<_ACEOF
1685#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1686_ACEOF
1687
1688
1689# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001690# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001691if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001692 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001693elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001694 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001695else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001696 set x "$ac_default_prefix/share/config.site" \
1697 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001698fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001699shift
1700for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001701do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001703 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1704echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001705 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706 . "$ac_site_file"
1707 fi
1708done
1709
1710if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001711 # Some versions of bash will fail to source /dev/null (special
1712 # files actually), so we avoid doing that.
1713 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001714 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1715echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001716 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001717 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1718 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001719 esac
1720 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001721else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001722 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1723echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001724 >$cache_file
1725fi
1726
1727# Check that the precious variables saved in the cache have kept the same
1728# value.
1729ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001730for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001731 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1732 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001733 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1734 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 case $ac_old_set,$ac_new_set in
1736 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001737 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1738echo "$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 +00001739 ac_cache_corrupted=: ;;
1740 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001741 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1742echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001743 ac_cache_corrupted=: ;;
1744 ,);;
1745 *)
1746 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001747 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1748echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1749 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1750echo "$as_me: former value: $ac_old_val" >&2;}
1751 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1752echo "$as_me: current value: $ac_new_val" >&2;}
1753 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001754 fi;;
1755 esac
1756 # Pass precious variables to config.status.
1757 if test "$ac_new_set" = set; then
1758 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001759 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001760 *) ac_arg=$ac_var=$ac_new_val ;;
1761 esac
1762 case " $ac_configure_args " in
1763 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1764 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1765 esac
1766 fi
1767done
1768if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001769 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1770echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1771 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1772echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001773 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001774fi
1775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
Guido van Rossum7f43da71994-08-01 12:15:30 +00001800ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001801ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001802ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1803ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1804ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805
Guido van Rossum627b2d71993-12-24 10:39:16 +00001806
Michael W. Hudson54241132001-12-07 15:38:26 +00001807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001808ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001809
1810
Martin v. Löwis11437992002-04-12 09:54:03 +00001811
Benjamin Petersond23f8222009-04-05 19:13:16 +00001812if test "$prefix" != "/"; then
1813 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1814fi
1815
1816
Martin v. Löwis11437992002-04-12 09:54:03 +00001817
1818
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001819
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001820
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001821# We don't use PACKAGE_ variables, and they cause conflicts
1822# with other autoconf-based packages that include Python.h
1823grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1824rm confdefs.h
1825mv confdefs.h.new confdefs.h
1826
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001827
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001828VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001829
Martin v. Löwis1142de32002-03-29 16:28:31 +00001830
1831SOVERSION=1.0
1832
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001833# The later defininition of _XOPEN_SOURCE disables certain features
1834# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1835
1836cat >>confdefs.h <<\_ACEOF
1837#define _GNU_SOURCE 1
1838_ACEOF
1839
1840
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001841# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1842# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1843# them.
1844
1845cat >>confdefs.h <<\_ACEOF
1846#define _NETBSD_SOURCE 1
1847_ACEOF
1848
1849
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001850# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1851# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1852# them.
1853
1854cat >>confdefs.h <<\_ACEOF
1855#define __BSD_VISIBLE 1
1856_ACEOF
1857
1858
Martin v. Löwisd6320502004-08-12 13:45:08 +00001859# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1860# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1861
1862cat >>confdefs.h <<\_ACEOF
1863#define _BSD_TYPES 1
1864_ACEOF
1865
1866
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001867# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1868# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1869# them.
1870
1871cat >>confdefs.h <<\_ACEOF
1872#define _DARWIN_C_SOURCE 1
1873_ACEOF
1874
1875
1876
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001877define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001878
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001879# Arguments passed to configure.
1880
1881CONFIG_ARGS="$ac_configure_args"
1882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001883# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001884if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001885 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001886 case $enableval in
1887 yes)
1888 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1889 ;;
1890 esac
1891 case $enableval in
1892 no)
1893 UNIVERSALSDK=
1894 enable_universalsdk=
1895 ;;
1896 *)
1897 UNIVERSALSDK=$enableval
1898 ;;
1899 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001900
Thomas Wouters477c8d52006-05-27 19:21:47 +00001901else
1902
1903 UNIVERSALSDK=
1904 enable_universalsdk=
1905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001906fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001907
1908
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001909
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001910
1911
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001912UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001913{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1914echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001915
1916# Check whether --with-universal-archs was given.
1917if test "${with_universal_archs+set}" = set; then
1918 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001919 { echo "$as_me:$LINENO: result: $withval" >&5
1920echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001921 UNIVERSAL_ARCHS="$withval"
1922
1923else
1924
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001925 { echo "$as_me:$LINENO: result: 32-bit" >&5
1926echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001927
1928fi
1929
1930
1931
1932
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001933
1934# Check whether --with-framework-name was given.
1935if test "${with_framework_name+set}" = set; then
1936 withval=$with_framework_name;
1937 PYTHONFRAMEWORK=${withval}
1938 PYTHONFRAMEWORKDIR=${withval}.framework
1939 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1940
1941else
1942
1943 PYTHONFRAMEWORK=Python
1944 PYTHONFRAMEWORKDIR=Python.framework
1945 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1946
1947fi
1948
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001949# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001950if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001951 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001952 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001953 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001954 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001955 esac
1956 case $enableval in
1957 no)
1958 PYTHONFRAMEWORK=
1959 PYTHONFRAMEWORKDIR=no-framework
1960 PYTHONFRAMEWORKPREFIX=
1961 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001962 FRAMEWORKINSTALLFIRST=
1963 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001964 FRAMEWORKALTINSTALLFIRST=
1965 FRAMEWORKALTINSTALLLAST=
1966 if test "x${prefix}" = "xNONE"; then
1967 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1968 else
1969 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1970 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001971 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001972 ;;
1973 *)
1974 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001975 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001976 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001977 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001978 if test "$UNIVERSAL_ARCHS" = "all"
1979 then
1980 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00001981 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001982 else
Ronald Oussorene3918352009-03-30 18:00:28 +00001983 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001984 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1985 fi
1986
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001987 if test "x${prefix}" = "xNONE" ; then
1988 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1989 else
1990 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1991 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001992 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001993
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001994 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00001995 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001996 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001998 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001999
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002000 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2001
2002 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2003
Jack Jansene578a632001-08-15 01:27:14 +00002004 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002005
Guido van Rossum563e7081996-09-10 18:20:48 +00002006else
Martin v. Löwis11437992002-04-12 09:54:03 +00002007
Jack Jansene578a632001-08-15 01:27:14 +00002008 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002009 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002010 PYTHONFRAMEWORKPREFIX=
2011 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002012 FRAMEWORKINSTALLFIRST=
2013 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002014 FRAMEWORKALTINSTALLFIRST=
2015 FRAMEWORKALTINSTALLLAST=
2016 if test "x${prefix}" = "xNONE" ; then
2017 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2018 else
2019 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2020 fi
Jack Jansene578a632001-08-15 01:27:14 +00002021 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002022
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002023 if test "$UNIVERSAL_ARCHS" = "all"
2024 then
2025 FRAMEWORKINSTALLLAST=update4wayuniversal
2026 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2027 fi
2028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002029fi
2030
Thomas Wouters477c8d52006-05-27 19:21:47 +00002031
2032
Michael W. Hudson54241132001-12-07 15:38:26 +00002033
2034
2035
2036
Jack Jansene578a632001-08-15 01:27:14 +00002037
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002038
2039
2040
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002041
Jack Jansene578a632001-08-15 01:27:14 +00002042##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002043## AC_HELP_STRING(--with-dyld,
2044## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002045##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002046# Set name for machine-dependent library files
2047
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002048{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2049echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002050if test -z "$MACHDEP"
2051then
Guido van Rossum563e7081996-09-10 18:20:48 +00002052 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002053 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002054 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002055 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002056 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002057 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002058 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002059 ac_md_system=`echo $ac_sys_system |
2060 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2061 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002062 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002063 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002064
Guido van Rossum07397971997-04-29 21:49:50 +00002065 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002066 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002067 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002068 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002069 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002070 esac
2071fi
Guido van Rossum91922671997-10-09 20:24:13 +00002072
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002073# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2074# disable features if it is defined, without any means to access these
2075# features as extensions. For these systems, we skip the definition of
2076# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2077# some feature, make sure there is no alternative way to access this
2078# feature. Also, when using wildcards, make sure you have verified the
2079# need for not defining _XOPEN_SOURCE on all systems matching the
2080# wildcard, and that the wildcard does not include future systems
2081# (which may remove their limitations).
2082case $ac_sys_system/$ac_sys_release in
2083 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2084 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002085 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002086 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002087 define_xopen_source=no
2088 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2089 # also defined. This can be overridden by defining _BSD_SOURCE
2090 # As this has a different meaning on Linux, only define it on OpenBSD
2091
2092cat >>confdefs.h <<\_ACEOF
2093#define _BSD_SOURCE 1
2094_ACEOF
2095
2096 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002097 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2098 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2099 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002100 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 +00002101 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002102 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2103 # of union __?sigval. Reported by Stuart Bishop.
2104 SunOS/5.6)
2105 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002106 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2107 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002108 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002109 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002110 define_xopen_source=no;;
2111 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002112 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002113 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002114 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002115 # On FreeBSD 4, the math functions C89 does not cover are never defined
2116 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2117 FreeBSD/4.*)
2118 define_xopen_source=no;;
2119 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2120 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2121 # identifies itself as Darwin/7.*
2122 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2123 # disables platform specific features beyond repair.
2124 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2125 # has no effect, don't bother defining them
2126 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002127 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002128 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2129 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2130 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002131 AIX/4)
2132 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002133 AIX/5)
2134 if test `uname -r` -eq 1; then
2135 define_xopen_source=no
2136 fi
2137 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002138 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2139 # defining NI_NUMERICHOST.
2140 QNX/6.3.2)
2141 define_xopen_source=no
2142 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002143
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002144esac
2145
2146if test $define_xopen_source = yes
2147then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002148 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2149 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002150 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2151 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002152 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002153 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002154
2155cat >>confdefs.h <<\_ACEOF
2156#define _XOPEN_SOURCE 500
2157_ACEOF
2158
2159 ;;
2160 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002161
2162cat >>confdefs.h <<\_ACEOF
2163#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002164_ACEOF
2165
Skip Montanarof0d5f792004-08-15 14:08:23 +00002166 ;;
2167 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002168
2169 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2170 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2171 # several APIs are not declared. Since this is also needed in some
2172 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002173 # except for Solaris 10, where it must not be defined,
2174 # as it implies XPG4.2
2175 case $ac_sys_system/$ac_sys_release in
2176 SunOS/5.10)
2177 ;;
2178 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002179
2180cat >>confdefs.h <<\_ACEOF
2181#define _XOPEN_SOURCE_EXTENDED 1
2182_ACEOF
2183
Martin v. Löwis7dece662005-11-26 11:38:24 +00002184 ;;
2185 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002186
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002187
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002188cat >>confdefs.h <<\_ACEOF
2189#define _POSIX_C_SOURCE 200112L
2190_ACEOF
2191
2192
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002193fi
2194
Guido van Rossum91922671997-10-09 20:24:13 +00002195#
2196# SGI compilers allow the specification of the both the ABI and the
2197# ISA on the command line. Depending on the values of these switches,
2198# different and often incompatable code will be generated.
2199#
2200# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2201# thus supply support for various ABI/ISA combinations. The MACHDEP
2202# variable is also adjusted.
2203#
2204
2205if test ! -z "$SGI_ABI"
2206then
2207 CC="cc $SGI_ABI"
2208 LDFLAGS="$SGI_ABI $LDFLAGS"
2209 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2210fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002211{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2212echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002213
Jack Jansen6b08a402004-06-03 12:41:45 +00002214# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2215# it may influence the way we can build extensions, so distutils
2216# needs to check it
2217
Thomas Wouters477c8d52006-05-27 19:21:47 +00002218
Jack Jansen6b08a402004-06-03 12:41:45 +00002219CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002220EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002221
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002222{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2223echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002224ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002225{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2226echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002227
Guido van Rossum627b2d71993-12-24 10:39:16 +00002228# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002229
2230# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2231# for debug/optimization stuff. BASECFLAGS is for flags that are required
2232# just to get things to compile and link. Users are free to override OPT
2233# when running configure or make. The build should not break if they do.
2234# BASECFLAGS should generally not be messed with, however.
2235
2236# XXX shouldn't some/most/all of this code be merged with the stuff later
2237# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002238{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2239echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002241# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002242if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002243 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002244 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002245 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002246 without_gcc=yes;;
2247 yes) CC=gcc
2248 without_gcc=no;;
2249 *) CC=$withval
2250 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002251 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002252else
Martin v. Löwis11437992002-04-12 09:54:03 +00002253
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002254 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002255 AIX*) CC=cc_r
2256 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002257 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002258 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002259fi
2260
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002261{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2262echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002263
Guido van Rossum8b131c51995-03-09 14:10:13 +00002264# If the user switches compilers, we can't believe the cache
2265if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2266then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002267 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002268(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002269echo "$as_me: 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)" >&2;}
2271 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002272fi
2273
Martin v. Löwis11437992002-04-12 09:54:03 +00002274ac_ext=c
2275ac_cpp='$CPP $CPPFLAGS'
2276ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2277ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2278ac_compiler_gnu=$ac_cv_c_compiler_gnu
2279if test -n "$ac_tool_prefix"; then
2280 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2281set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002282{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2283echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002284if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002285 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002286else
2287 if test -n "$CC"; then
2288 ac_cv_prog_CC="$CC" # Let the user override the test.
2289else
Martin v. Löwis11437992002-04-12 09:54:03 +00002290as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2291for as_dir in $PATH
2292do
2293 IFS=$as_save_IFS
2294 test -z "$as_dir" && as_dir=.
2295 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002296 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 +00002297 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002298 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002299 break 2
2300 fi
2301done
2302done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002303IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002304
Jack Jansendd19cf82001-12-06 22:36:17 +00002305fi
2306fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002307CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002308if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002309 { echo "$as_me:$LINENO: result: $CC" >&5
2310echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002311else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002312 { echo "$as_me:$LINENO: result: no" >&5
2313echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002314fi
2315
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002316
Martin v. Löwis11437992002-04-12 09:54:03 +00002317fi
2318if test -z "$ac_cv_prog_CC"; then
2319 ac_ct_CC=$CC
2320 # Extract the first word of "gcc", so it can be a program name with args.
2321set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002322{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2323echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002324if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002325 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002326else
2327 if test -n "$ac_ct_CC"; then
2328 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2329else
2330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2331for as_dir in $PATH
2332do
2333 IFS=$as_save_IFS
2334 test -z "$as_dir" && as_dir=.
2335 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002336 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 +00002337 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002338 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002339 break 2
2340 fi
2341done
2342done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002343IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002344
2345fi
2346fi
2347ac_ct_CC=$ac_cv_prog_ac_ct_CC
2348if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002349 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2350echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002351else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002352 { echo "$as_me:$LINENO: result: no" >&5
2353echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002354fi
2355
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002356 if test "x$ac_ct_CC" = x; then
2357 CC=""
2358 else
2359 case $cross_compiling:$ac_tool_warned in
2360yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002361{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2362whose name does not start with the host triplet. If you think this
2363configuration is useful to you, please write to autoconf@gnu.org." >&5
2364echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2365whose name does not start with the host triplet. If you think this
2366configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002367ac_tool_warned=yes ;;
2368esac
2369 CC=$ac_ct_CC
2370 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002371else
2372 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002373fi
2374
Jack Jansendd19cf82001-12-06 22:36:17 +00002375if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002376 if test -n "$ac_tool_prefix"; then
2377 # 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 +00002378set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002379{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2380echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002381if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002382 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002383else
2384 if test -n "$CC"; then
2385 ac_cv_prog_CC="$CC" # Let the user override the test.
2386else
Martin v. Löwis11437992002-04-12 09:54:03 +00002387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2388for as_dir in $PATH
2389do
2390 IFS=$as_save_IFS
2391 test -z "$as_dir" && as_dir=.
2392 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002393 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 +00002394 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002395 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002396 break 2
2397 fi
2398done
2399done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002400IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002401
2402fi
2403fi
2404CC=$ac_cv_prog_CC
2405if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002406 { echo "$as_me:$LINENO: result: $CC" >&5
2407echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002408else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002409 { echo "$as_me:$LINENO: result: no" >&5
2410echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002411fi
2412
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002413
Martin v. Löwis11437992002-04-12 09:54:03 +00002414 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002415fi
2416if test -z "$CC"; then
2417 # Extract the first word of "cc", so it can be a program name with args.
2418set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002419{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2420echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002421if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002422 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002423else
2424 if test -n "$CC"; then
2425 ac_cv_prog_CC="$CC" # Let the user override the test.
2426else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002427 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2429for as_dir in $PATH
2430do
2431 IFS=$as_save_IFS
2432 test -z "$as_dir" && as_dir=.
2433 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002434 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 +00002435 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2436 ac_prog_rejected=yes
2437 continue
2438 fi
2439 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002440 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002441 break 2
2442 fi
2443done
2444done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002445IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002446
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002447if test $ac_prog_rejected = yes; then
2448 # We found a bogon in the path, so make sure we never use it.
2449 set dummy $ac_cv_prog_CC
2450 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002451 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002452 # We chose a different compiler from the bogus one.
2453 # However, it has the same basename, so the bogon will be chosen
2454 # first if we set CC to just the basename; use the full file name.
2455 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002456 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002457 fi
2458fi
2459fi
2460fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002461CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002462if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002463 { echo "$as_me:$LINENO: result: $CC" >&5
2464echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002465else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002466 { echo "$as_me:$LINENO: result: no" >&5
2467echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002468fi
2469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470
Martin v. Löwis11437992002-04-12 09:54:03 +00002471fi
2472if test -z "$CC"; then
2473 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 do
2476 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2477set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002478{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2479echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002480if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002481 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002482else
2483 if test -n "$CC"; then
2484 ac_cv_prog_CC="$CC" # Let the user override the test.
2485else
Martin v. Löwis11437992002-04-12 09:54:03 +00002486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2487for as_dir in $PATH
2488do
2489 IFS=$as_save_IFS
2490 test -z "$as_dir" && as_dir=.
2491 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 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 +00002493 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002494 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002495 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002497done
2498done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002500
2501fi
2502fi
2503CC=$ac_cv_prog_CC
2504if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002505 { echo "$as_me:$LINENO: result: $CC" >&5
2506echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002507else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002508 { echo "$as_me:$LINENO: result: no" >&5
2509echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002510fi
2511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 test -n "$CC" && break
2514 done
2515fi
2516if test -z "$CC"; then
2517 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002519do
2520 # Extract the first word of "$ac_prog", so it can be a program name with args.
2521set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002522{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2523echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002524if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002525 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002526else
2527 if test -n "$ac_ct_CC"; then
2528 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2529else
2530as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2531for as_dir in $PATH
2532do
2533 IFS=$as_save_IFS
2534 test -z "$as_dir" && as_dir=.
2535 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 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 +00002537 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002538 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 break 2
2540 fi
2541done
2542done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545fi
2546fi
2547ac_ct_CC=$ac_cv_prog_ac_ct_CC
2548if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002549 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2550echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002551else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002552 { echo "$as_me:$LINENO: result: no" >&5
2553echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002554fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 test -n "$ac_ct_CC" && break
2558done
Michael W. Hudson54241132001-12-07 15:38:26 +00002559
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002560 if test "x$ac_ct_CC" = x; then
2561 CC=""
2562 else
2563 case $cross_compiling:$ac_tool_warned in
2564yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002565{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2566whose name does not start with the host triplet. If you think this
2567configuration is useful to you, please write to autoconf@gnu.org." >&5
2568echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2569whose name does not start with the host triplet. If you think this
2570configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571ac_tool_warned=yes ;;
2572esac
2573 CC=$ac_ct_CC
2574 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002575fi
2576
2577fi
2578
2579
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002580test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002581See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002582echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002583See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002584 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002585
2586# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002587echo "$as_me:$LINENO: checking for C compiler version" >&5
2588ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589{ (ac_try="$ac_compiler --version >&5"
2590case "(($ac_try" in
2591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2592 *) ac_try_echo=$ac_try;;
2593esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599{ (ac_try="$ac_compiler -v >&5"
2600case "(($ac_try" in
2601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2602 *) ac_try_echo=$ac_try;;
2603esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609{ (ac_try="$ac_compiler -V >&5"
2610case "(($ac_try" in
2611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2612 *) ac_try_echo=$ac_try;;
2613esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 (exit $ac_status); }
2619
2620cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002621/* confdefs.h. */
2622_ACEOF
2623cat confdefs.h >>conftest.$ac_ext
2624cat >>conftest.$ac_ext <<_ACEOF
2625/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002626
Martin v. Löwis11437992002-04-12 09:54:03 +00002627int
2628main ()
2629{
2630
2631 ;
2632 return 0;
2633}
2634_ACEOF
2635ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002636ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002637# Try to create an executable without -o first, disregard a.out.
2638# It will help us diagnose broken compilers, and finding out an intuition
2639# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002640{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2641echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2642ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2643#
2644# List of possible output files, starting from the most likely.
2645# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2646# only as a last resort. b.out is created by i960 compilers.
2647ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2648#
2649# The IRIX 6 linker writes into existing files which may not be
2650# executable, retaining their permissions. Remove them first so a
2651# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002652ac_rmfiles=
2653for ac_file in $ac_files
2654do
2655 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002656 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002657 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2658 esac
2659done
2660rm -f $ac_rmfiles
2661
2662if { (ac_try="$ac_link_default"
2663case "(($ac_try" in
2664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2665 *) ac_try_echo=$ac_try;;
2666esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002668 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002672 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2673# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2674# in a Makefile. We should not override ac_cv_exeext if it was cached,
2675# so that the user can short-circuit this test for compilers unknown to
2676# Autoconf.
2677for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002678do
2679 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002681 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002682 ;;
2683 [ab].out )
2684 # We found the default executable, but exeext='' is most
2685 # certainly right.
2686 break;;
2687 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002688 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2689 then :; else
2690 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2691 fi
2692 # We set ac_cv_exeext here because the later test for it is not
2693 # safe: cross compilers may not add the suffix if given an `-o'
2694 # argument, so we may need to know it at that point already.
2695 # Even if this section looks crufty: it has the advantage of
2696 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002697 break;;
2698 * )
2699 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 esac
2701done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002702test "$ac_cv_exeext" = no && ac_cv_exeext=
2703
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002704else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002705 ac_file=''
2706fi
2707
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002708{ echo "$as_me:$LINENO: result: $ac_file" >&5
2709echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002710if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002712sed 's/^/| /' conftest.$ac_ext >&5
2713
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002714{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002715See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002716echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002717See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002718 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002719fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002720
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002721ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002722
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002723# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002724# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002725{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2726echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002727# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2728# If not cross compiling, check that we can run a simple program.
2729if test "$cross_compiling" != yes; then
2730 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002731 { (case "(($ac_try" in
2732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2733 *) ac_try_echo=$ac_try;;
2734esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002736 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002737 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 (exit $ac_status); }; }; then
2740 cross_compiling=no
2741 else
2742 if test "$cross_compiling" = maybe; then
2743 cross_compiling=yes
2744 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002745 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002746If you meant to cross compile, use \`--host'.
2747See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002748echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002749If you meant to cross compile, use \`--host'.
2750See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002751 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002752 fi
2753 fi
2754fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002755{ echo "$as_me:$LINENO: result: yes" >&5
2756echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002757
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002758rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002759ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002760# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002761# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002762{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2763echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2764{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2765echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002766
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002767{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2768echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002769if { (ac_try="$ac_link"
2770case "(($ac_try" in
2771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2772 *) ac_try_echo=$ac_try;;
2773esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002775 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002776 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002778 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002779 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2780# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2781# work properly (i.e., refer to `conftest.exe'), while it won't with
2782# `rm'.
2783for ac_file in conftest.exe conftest conftest.*; do
2784 test -f "$ac_file" || continue
2785 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002786 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002787 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2788 break;;
2789 * ) break;;
2790 esac
2791done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002792else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002793 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002794See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002795echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002796See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002797 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002798fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002799
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002800rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002801{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2802echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002803
2804rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002805EXEEXT=$ac_cv_exeext
2806ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002807{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2808echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002809if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002810 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002811else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002812 cat >conftest.$ac_ext <<_ACEOF
2813/* confdefs.h. */
2814_ACEOF
2815cat confdefs.h >>conftest.$ac_ext
2816cat >>conftest.$ac_ext <<_ACEOF
2817/* end confdefs.h. */
2818
2819int
2820main ()
2821{
2822
2823 ;
2824 return 0;
2825}
2826_ACEOF
2827rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002828if { (ac_try="$ac_compile"
2829case "(($ac_try" in
2830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2831 *) ac_try_echo=$ac_try;;
2832esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002834 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002835 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002837 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002838 for ac_file in conftest.o conftest.obj conftest.*; do
2839 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002840 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002841 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002842 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2843 break;;
2844 esac
2845done
2846else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002848sed 's/^/| /' conftest.$ac_ext >&5
2849
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002850{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002851See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002852echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002853See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002854 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002855fi
2856
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002857rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002858fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002859{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2860echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002861OBJEXT=$ac_cv_objext
2862ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002863{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2864echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002865if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002866 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002867else
2868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002869/* confdefs.h. */
2870_ACEOF
2871cat confdefs.h >>conftest.$ac_ext
2872cat >>conftest.$ac_ext <<_ACEOF
2873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002874
Martin v. Löwis11437992002-04-12 09:54:03 +00002875int
2876main ()
2877{
2878#ifndef __GNUC__
2879 choke me
2880#endif
2881
2882 ;
2883 return 0;
2884}
2885_ACEOF
2886rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002887if { (ac_try="$ac_compile"
2888case "(($ac_try" in
2889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2890 *) ac_try_echo=$ac_try;;
2891esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002893 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002895 grep -v '^ *+' conftest.er1 >conftest.err
2896 rm -f conftest.er1
2897 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002899 (exit $ac_status); } && {
2900 test -z "$ac_c_werror_flag" ||
2901 test ! -s conftest.err
2902 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002903 ac_compiler_gnu=yes
2904else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002906sed 's/^/| /' conftest.$ac_ext >&5
2907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002908 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002910
2911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002912ac_cv_c_compiler_gnu=$ac_compiler_gnu
2913
2914fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002915{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2916echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2917GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002918ac_test_CFLAGS=${CFLAGS+set}
2919ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002920{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2921echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002922if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002923 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002924else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002925 ac_save_c_werror_flag=$ac_c_werror_flag
2926 ac_c_werror_flag=yes
2927 ac_cv_prog_cc_g=no
2928 CFLAGS="-g"
2929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002930/* confdefs.h. */
2931_ACEOF
2932cat confdefs.h >>conftest.$ac_ext
2933cat >>conftest.$ac_ext <<_ACEOF
2934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002935
Martin v. Löwis11437992002-04-12 09:54:03 +00002936int
2937main ()
2938{
2939
2940 ;
2941 return 0;
2942}
2943_ACEOF
2944rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002945if { (ac_try="$ac_compile"
2946case "(($ac_try" in
2947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2948 *) ac_try_echo=$ac_try;;
2949esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002953 grep -v '^ *+' conftest.er1 >conftest.err
2954 rm -f conftest.er1
2955 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002957 (exit $ac_status); } && {
2958 test -z "$ac_c_werror_flag" ||
2959 test ! -s conftest.err
2960 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002961 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002962else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002964sed 's/^/| /' conftest.$ac_ext >&5
2965
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002966 CFLAGS=""
2967 cat >conftest.$ac_ext <<_ACEOF
2968/* confdefs.h. */
2969_ACEOF
2970cat confdefs.h >>conftest.$ac_ext
2971cat >>conftest.$ac_ext <<_ACEOF
2972/* end confdefs.h. */
2973
2974int
2975main ()
2976{
2977
2978 ;
2979 return 0;
2980}
2981_ACEOF
2982rm -f conftest.$ac_objext
2983if { (ac_try="$ac_compile"
2984case "(($ac_try" in
2985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2986 *) ac_try_echo=$ac_try;;
2987esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002989 (eval "$ac_compile") 2>conftest.er1
2990 ac_status=$?
2991 grep -v '^ *+' conftest.er1 >conftest.err
2992 rm -f conftest.er1
2993 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002995 (exit $ac_status); } && {
2996 test -z "$ac_c_werror_flag" ||
2997 test ! -s conftest.err
2998 } && test -s conftest.$ac_objext; then
2999 :
3000else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003001 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003002sed 's/^/| /' conftest.$ac_ext >&5
3003
3004 ac_c_werror_flag=$ac_save_c_werror_flag
3005 CFLAGS="-g"
3006 cat >conftest.$ac_ext <<_ACEOF
3007/* confdefs.h. */
3008_ACEOF
3009cat confdefs.h >>conftest.$ac_ext
3010cat >>conftest.$ac_ext <<_ACEOF
3011/* end confdefs.h. */
3012
3013int
3014main ()
3015{
3016
3017 ;
3018 return 0;
3019}
3020_ACEOF
3021rm -f conftest.$ac_objext
3022if { (ac_try="$ac_compile"
3023case "(($ac_try" in
3024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3025 *) ac_try_echo=$ac_try;;
3026esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003028 (eval "$ac_compile") 2>conftest.er1
3029 ac_status=$?
3030 grep -v '^ *+' conftest.er1 >conftest.err
3031 rm -f conftest.er1
3032 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003034 (exit $ac_status); } && {
3035 test -z "$ac_c_werror_flag" ||
3036 test ! -s conftest.err
3037 } && test -s conftest.$ac_objext; then
3038 ac_cv_prog_cc_g=yes
3039else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003040 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003041sed 's/^/| /' conftest.$ac_ext >&5
3042
3043
Guido van Rossum627b2d71993-12-24 10:39:16 +00003044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003045
3046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003048
3049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3050fi
3051
3052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3053 ac_c_werror_flag=$ac_save_c_werror_flag
3054fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003055{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3056echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003057if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003058 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003059elif test $ac_cv_prog_cc_g = yes; then
3060 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003061 CFLAGS="-g -O2"
3062 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003063 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003064 fi
3065else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003066 if test "$GCC" = yes; then
3067 CFLAGS="-O2"
3068 else
3069 CFLAGS=
3070 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003071fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003072{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3073echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003074if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003075 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003076else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003077 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003078ac_save_CC=$CC
3079cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003080/* confdefs.h. */
3081_ACEOF
3082cat confdefs.h >>conftest.$ac_ext
3083cat >>conftest.$ac_ext <<_ACEOF
3084/* end confdefs.h. */
3085#include <stdarg.h>
3086#include <stdio.h>
3087#include <sys/types.h>
3088#include <sys/stat.h>
3089/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3090struct buf { int x; };
3091FILE * (*rcsopen) (struct buf *, struct stat *, int);
3092static char *e (p, i)
3093 char **p;
3094 int i;
3095{
3096 return p[i];
3097}
3098static char *f (char * (*g) (char **, int), char **p, ...)
3099{
3100 char *s;
3101 va_list v;
3102 va_start (v,p);
3103 s = g (p, va_arg (v,int));
3104 va_end (v);
3105 return s;
3106}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003107
3108/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3109 function prototypes and stuff, but not '\xHH' hex character constants.
3110 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003111 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003112 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3113 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003114 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003115int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003117/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3118 inside strings and character constants. */
3119#define FOO(x) 'x'
3120int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3121
Skip Montanaro6dead952003-09-25 14:50:04 +00003122int test (int i, double x);
3123struct s1 {int (*f) (int a);};
3124struct s2 {int (*f) (double a);};
3125int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3126int argc;
3127char **argv;
3128int
3129main ()
3130{
3131return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3132 ;
3133 return 0;
3134}
3135_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003136for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3137 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003138do
3139 CC="$ac_save_CC $ac_arg"
3140 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003141if { (ac_try="$ac_compile"
3142case "(($ac_try" in
3143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3144 *) ac_try_echo=$ac_try;;
3145esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003147 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003149 grep -v '^ *+' conftest.er1 >conftest.err
3150 rm -f conftest.er1
3151 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003153 (exit $ac_status); } && {
3154 test -z "$ac_c_werror_flag" ||
3155 test ! -s conftest.err
3156 } && test -s conftest.$ac_objext; then
3157 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003158else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003159 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003160sed 's/^/| /' conftest.$ac_ext >&5
3161
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003162
Skip Montanaro6dead952003-09-25 14:50:04 +00003163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164
3165rm -f core conftest.err conftest.$ac_objext
3166 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003167done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003168rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003169CC=$ac_save_CC
3170
3171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003172# AC_CACHE_VAL
3173case "x$ac_cv_prog_cc_c89" in
3174 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003175 { echo "$as_me:$LINENO: result: none needed" >&5
3176echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003177 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003178 { echo "$as_me:$LINENO: result: unsupported" >&5
3179echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003180 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003181 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003182 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3183echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003184esac
3185
Skip Montanaro6dead952003-09-25 14:50:04 +00003186
Martin v. Löwis11437992002-04-12 09:54:03 +00003187ac_ext=c
3188ac_cpp='$CPP $CPPFLAGS'
3189ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3190ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3191ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003192
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003193
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003194
3195
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003196{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3197echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003198
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003199# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003200if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003202
3203 case $withval in
3204 no) with_cxx_main=no
3205 MAINCC='$(CC)';;
3206 yes) with_cxx_main=yes
3207 MAINCC='$(CXX)';;
3208 *) with_cxx_main=yes
3209 MAINCC=$withval
3210 if test -z "$CXX"
3211 then
3212 CXX=$withval
3213 fi;;
3214 esac
3215else
3216
3217 with_cxx_main=no
3218 MAINCC='$(CC)'
3219
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003220fi
3221
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003222{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3223echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003224
3225preset_cxx="$CXX"
3226if test -z "$CXX"
3227then
3228 case "$CC" in
3229 gcc) # Extract the first word of "g++", so it can be a program name with args.
3230set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003231{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3232echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003233if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003234 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003235else
3236 case $CXX in
3237 [\\/]* | ?:[\\/]*)
3238 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3239 ;;
3240 *)
3241 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3242for as_dir in notfound
3243do
3244 IFS=$as_save_IFS
3245 test -z "$as_dir" && as_dir=.
3246 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003247 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 +00003248 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003249 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003250 break 2
3251 fi
3252done
3253done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003254IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003255
3256 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3257 ;;
3258esac
3259fi
3260CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003261if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003262 { echo "$as_me:$LINENO: result: $CXX" >&5
3263echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003264else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003265 { echo "$as_me:$LINENO: result: no" >&5
3266echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003268
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003269 ;;
3270 cc) # Extract the first word of "c++", so it can be a program name with args.
3271set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003272{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3273echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003274if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003275 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003276else
3277 case $CXX in
3278 [\\/]* | ?:[\\/]*)
3279 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3280 ;;
3281 *)
3282 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3283for as_dir in notfound
3284do
3285 IFS=$as_save_IFS
3286 test -z "$as_dir" && as_dir=.
3287 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003288 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 +00003289 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003290 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003291 break 2
3292 fi
3293done
3294done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003295IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003296
3297 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3298 ;;
3299esac
3300fi
3301CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003302if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003303 { echo "$as_me:$LINENO: result: $CXX" >&5
3304echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003306 { echo "$as_me:$LINENO: result: no" >&5
3307echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003309
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003310 ;;
3311 esac
3312 if test "$CXX" = "notfound"
3313 then
3314 CXX=""
3315 fi
3316fi
3317if test -z "$CXX"
3318then
3319 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3320do
3321 # Extract the first word of "$ac_prog", so it can be a program name with args.
3322set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003323{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3324echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003325if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003326 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003327else
3328 if test -n "$CXX"; then
3329 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3330else
3331as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3332for as_dir in $PATH
3333do
3334 IFS=$as_save_IFS
3335 test -z "$as_dir" && as_dir=.
3336 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003337 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 +00003338 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003339 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003340 break 2
3341 fi
3342done
3343done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003344IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003345
3346fi
3347fi
3348CXX=$ac_cv_prog_CXX
3349if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003350 { echo "$as_me:$LINENO: result: $CXX" >&5
3351echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003352else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003353 { echo "$as_me:$LINENO: result: no" >&5
3354echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003355fi
3356
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003357
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003358 test -n "$CXX" && break
3359done
3360test -n "$CXX" || CXX="notfound"
3361
3362 if test "$CXX" = "notfound"
3363 then
3364 CXX=""
3365 fi
3366fi
3367if test "$preset_cxx" != "$CXX"
3368then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003369 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003370
3371 By default, distutils will build C++ extension modules with \"$CXX\".
3372 If this is not intended, then set CXX on the configure command line.
3373 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003374echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003375
3376 By default, distutils will build C++ extension modules with \"$CXX\".
3377 If this is not intended, then set CXX on the configure command line.
3378 " >&2;}
3379fi
3380
3381
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003382# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003383
3384ac_ext=c
3385ac_cpp='$CPP $CPPFLAGS'
3386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3388ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003389{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3390echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003391# On Suns, sometimes $CPP names a directory.
3392if test -n "$CPP" && test -d "$CPP"; then
3393 CPP=
3394fi
3395if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003396 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003397 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003398else
Martin v. Löwis11437992002-04-12 09:54:03 +00003399 # Double quotes because CPP needs to be expanded
3400 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3401 do
3402 ac_preproc_ok=false
3403for ac_c_preproc_warn_flag in '' yes
3404do
3405 # Use a header file that comes with gcc, so configuring glibc
3406 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003407 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3408 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003409 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003410 # not just through cpp. "Syntax error" is here to catch this case.
3411 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003412/* confdefs.h. */
3413_ACEOF
3414cat confdefs.h >>conftest.$ac_ext
3415cat >>conftest.$ac_ext <<_ACEOF
3416/* end confdefs.h. */
3417#ifdef __STDC__
3418# include <limits.h>
3419#else
3420# include <assert.h>
3421#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003422 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003423_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003424if { (ac_try="$ac_cpp conftest.$ac_ext"
3425case "(($ac_try" in
3426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3427 *) ac_try_echo=$ac_try;;
3428esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003430 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003431 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003432 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 rm -f conftest.er1
3434 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003436 (exit $ac_status); } >/dev/null && {
3437 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3438 test ! -s conftest.err
3439 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003440 :
3441else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003443sed 's/^/| /' conftest.$ac_ext >&5
3444
Martin v. Löwis11437992002-04-12 09:54:03 +00003445 # Broken: fails on valid input.
3446continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003448
Martin v. Löwis11437992002-04-12 09:54:03 +00003449rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003450
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003451 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003452 # can be detected and how.
3453 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003454/* confdefs.h. */
3455_ACEOF
3456cat confdefs.h >>conftest.$ac_ext
3457cat >>conftest.$ac_ext <<_ACEOF
3458/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003459#include <ac_nonexistent.h>
3460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003461if { (ac_try="$ac_cpp conftest.$ac_ext"
3462case "(($ac_try" in
3463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3464 *) ac_try_echo=$ac_try;;
3465esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003468 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003469 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 rm -f conftest.er1
3471 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473 (exit $ac_status); } >/dev/null && {
3474 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3475 test ! -s conftest.err
3476 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003477 # Broken: success on invalid input.
3478continue
3479else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003481sed 's/^/| /' conftest.$ac_ext >&5
3482
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 # Passes both tests.
3484ac_preproc_ok=:
3485break
3486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003487
Martin v. Löwis11437992002-04-12 09:54:03 +00003488rm -f conftest.err conftest.$ac_ext
3489
3490done
3491# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3492rm -f conftest.err conftest.$ac_ext
3493if $ac_preproc_ok; then
3494 break
3495fi
3496
3497 done
3498 ac_cv_prog_CPP=$CPP
3499
3500fi
3501 CPP=$ac_cv_prog_CPP
3502else
3503 ac_cv_prog_CPP=$CPP
3504fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003505{ echo "$as_me:$LINENO: result: $CPP" >&5
3506echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003507ac_preproc_ok=false
3508for ac_c_preproc_warn_flag in '' yes
3509do
3510 # Use a header file that comes with gcc, so configuring glibc
3511 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003512 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3513 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003514 # On the NeXT, cc -E runs the code through the compiler's parser,
3515 # not just through cpp. "Syntax error" is here to catch this case.
3516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003517/* confdefs.h. */
3518_ACEOF
3519cat confdefs.h >>conftest.$ac_ext
3520cat >>conftest.$ac_ext <<_ACEOF
3521/* end confdefs.h. */
3522#ifdef __STDC__
3523# include <limits.h>
3524#else
3525# include <assert.h>
3526#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003527 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003528_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003529if { (ac_try="$ac_cpp conftest.$ac_ext"
3530case "(($ac_try" in
3531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3532 *) ac_try_echo=$ac_try;;
3533esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003535 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003536 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003537 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 rm -f conftest.er1
3539 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003541 (exit $ac_status); } >/dev/null && {
3542 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3543 test ! -s conftest.err
3544 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003545 :
3546else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003548sed 's/^/| /' conftest.$ac_ext >&5
3549
Martin v. Löwis11437992002-04-12 09:54:03 +00003550 # Broken: fails on valid input.
3551continue
3552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003553
Martin v. Löwis11437992002-04-12 09:54:03 +00003554rm -f conftest.err conftest.$ac_ext
3555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003556 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 # can be detected and how.
3558 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003559/* confdefs.h. */
3560_ACEOF
3561cat confdefs.h >>conftest.$ac_ext
3562cat >>conftest.$ac_ext <<_ACEOF
3563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003564#include <ac_nonexistent.h>
3565_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003566if { (ac_try="$ac_cpp conftest.$ac_ext"
3567case "(($ac_try" in
3568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3569 *) ac_try_echo=$ac_try;;
3570esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003572 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003573 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003574 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 rm -f conftest.er1
3576 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003578 (exit $ac_status); } >/dev/null && {
3579 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3580 test ! -s conftest.err
3581 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003582 # Broken: success on invalid input.
3583continue
3584else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003586sed 's/^/| /' conftest.$ac_ext >&5
3587
Martin v. Löwis11437992002-04-12 09:54:03 +00003588 # Passes both tests.
3589ac_preproc_ok=:
3590break
3591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003592
Martin v. Löwis11437992002-04-12 09:54:03 +00003593rm -f conftest.err conftest.$ac_ext
3594
3595done
3596# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3597rm -f conftest.err conftest.$ac_ext
3598if $ac_preproc_ok; then
3599 :
3600else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003601 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003602See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003603echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003604See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003605 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003606fi
3607
3608ac_ext=c
3609ac_cpp='$CPP $CPPFLAGS'
3610ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3611ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3612ac_compiler_gnu=$ac_cv_c_compiler_gnu
3613
3614
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003615{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3616echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003617if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003618 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003619else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003620 # Extract the first word of "grep ggrep" to use in msg output
3621if test -z "$GREP"; then
3622set dummy grep ggrep; ac_prog_name=$2
3623if test "${ac_cv_path_GREP+set}" = set; then
3624 echo $ECHO_N "(cached) $ECHO_C" >&6
3625else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003627# Loop through the user's path and test for each of PROGNAME-LIST
3628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3630do
3631 IFS=$as_save_IFS
3632 test -z "$as_dir" && as_dir=.
3633 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003634 for ac_exec_ext in '' $ac_executable_extensions; do
3635 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3636 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3637 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003638 # Check for GNU $ac_path_GREP
3639case `"$ac_path_GREP" --version 2>&1` in
3640*GNU*)
3641 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3642*)
3643 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003644 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645 while :
3646 do
3647 cat "conftest.in" "conftest.in" >"conftest.tmp"
3648 mv "conftest.tmp" "conftest.in"
3649 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003650 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3652 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3653 ac_count=`expr $ac_count + 1`
3654 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3655 # Best one so far, save it but keep looking for a better one
3656 ac_cv_path_GREP="$ac_path_GREP"
3657 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003658 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659 # 10*(2^10) chars as input seems more than enough
3660 test $ac_count -gt 10 && break
3661 done
3662 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3663esac
3664
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003665
3666 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003667 done
3668done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003669
3670done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003671IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003672
3673
3674fi
3675
3676GREP="$ac_cv_path_GREP"
3677if test -z "$GREP"; then
3678 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3679echo "$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 +00003680 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003681fi
3682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003683else
3684 ac_cv_path_GREP=$GREP
3685fi
3686
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003689{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3690echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003691 GREP="$ac_cv_path_GREP"
3692
3693
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003694{ echo "$as_me:$LINENO: checking for egrep" >&5
3695echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003697 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698else
3699 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3700 then ac_cv_path_EGREP="$GREP -E"
3701 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003702 # Extract the first word of "egrep" to use in msg output
3703if test -z "$EGREP"; then
3704set dummy egrep; ac_prog_name=$2
3705if test "${ac_cv_path_EGREP+set}" = set; then
3706 echo $ECHO_N "(cached) $ECHO_C" >&6
3707else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003708 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003709# Loop through the user's path and test for each of PROGNAME-LIST
3710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003711for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3712do
3713 IFS=$as_save_IFS
3714 test -z "$as_dir" && as_dir=.
3715 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003716 for ac_exec_ext in '' $ac_executable_extensions; do
3717 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3718 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3719 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003720 # Check for GNU $ac_path_EGREP
3721case `"$ac_path_EGREP" --version 2>&1` in
3722*GNU*)
3723 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3724*)
3725 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003726 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727 while :
3728 do
3729 cat "conftest.in" "conftest.in" >"conftest.tmp"
3730 mv "conftest.tmp" "conftest.in"
3731 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003732 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003733 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3734 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3735 ac_count=`expr $ac_count + 1`
3736 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3737 # Best one so far, save it but keep looking for a better one
3738 ac_cv_path_EGREP="$ac_path_EGREP"
3739 ac_path_EGREP_max=$ac_count
3740 fi
3741 # 10*(2^10) chars as input seems more than enough
3742 test $ac_count -gt 10 && break
3743 done
3744 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3745esac
3746
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003747
3748 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749 done
3750done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003751
3752done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003753IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003754
3755
3756fi
3757
3758EGREP="$ac_cv_path_EGREP"
3759if test -z "$EGREP"; then
3760 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3761echo "$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 +00003762 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003763fi
3764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003765else
3766 ac_cv_path_EGREP=$EGREP
3767fi
3768
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770 fi
3771fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003772{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3773echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003774 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003775
3776
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003777
3778{ echo "$as_me:$LINENO: checking for AIX" >&5
3779echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3780cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003781/* confdefs.h. */
3782_ACEOF
3783cat confdefs.h >>conftest.$ac_ext
3784cat >>conftest.$ac_ext <<_ACEOF
3785/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003786#ifdef _AIX
3787 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003788#endif
3789
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003790_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003791if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3792 $EGREP "yes" >/dev/null 2>&1; then
3793 { echo "$as_me:$LINENO: result: yes" >&5
3794echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003795cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003796#define _ALL_SOURCE 1
3797_ACEOF
3798
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003799else
3800 { echo "$as_me:$LINENO: result: no" >&5
3801echo "${ECHO_T}no" >&6; }
3802fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +00003803rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003804
3805
3806
3807# Check for unsupported systems
3808case $ac_sys_system/$ac_sys_release in
3809atheos*|Linux*/1*)
3810 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3811 echo See README for details.
3812 exit 1;;
3813esac
3814
3815
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003816{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3817echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003818
3819# Check whether --with-suffix was given.
3820if test "${with_suffix+set}" = set; then
3821 withval=$with_suffix;
3822 case $withval in
3823 no) EXEEXT=;;
3824 yes) EXEEXT=.exe;;
3825 *) EXEEXT=$withval;;
3826 esac
3827fi
3828
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003829{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3830echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003831
3832# Test whether we're running on a non-case-sensitive system, in which
3833# case we give a warning if no ext is given
3834
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003835{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3836echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003837if test ! -d CaseSensitiveTestDir; then
3838mkdir CaseSensitiveTestDir
3839fi
3840
3841if test -d casesensitivetestdir
3842then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003843 { echo "$as_me:$LINENO: result: yes" >&5
3844echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003845 BUILDEXEEXT=.exe
3846else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003847 { echo "$as_me:$LINENO: result: no" >&5
3848echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003849 BUILDEXEEXT=$EXEEXT
3850fi
3851rmdir CaseSensitiveTestDir
3852
3853case $MACHDEP in
3854bsdos*)
3855 case $CC in
3856 gcc) CC="$CC -D_HAVE_BSDI";;
3857 esac;;
3858esac
3859
3860case $ac_sys_system in
3861hp*|HP*)
3862 case $CC in
3863 cc|*/cc) CC="$CC -Ae";;
3864 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003865SunOS*)
3866 # Some functions have a prototype only with that define, e.g. confstr
3867
3868cat >>confdefs.h <<\_ACEOF
3869#define __EXTENSIONS__ 1
3870_ACEOF
3871
3872 ;;
3873esac
3874
3875
3876
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003877{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3878echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003879if test -z "$LIBRARY"
3880then
3881 LIBRARY='libpython$(VERSION).a'
3882fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003883{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3884echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003885
3886# LDLIBRARY is the name of the library to link against (as opposed to the
3887# name of the library into which to insert object files). BLDLIBRARY is also
3888# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3889# is blank as the main program is not linked directly against LDLIBRARY.
3890# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3891# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3892# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3893# DLLLIBRARY is the shared (i.e., DLL) library.
3894#
3895# RUNSHARED is used to run shared python without installed libraries
3896#
3897# INSTSONAME is the name of the shared library that will be use to install
3898# on the system - some systems like version suffix, others don't
3899
3900
3901
3902
3903
3904
3905LDLIBRARY="$LIBRARY"
3906BLDLIBRARY='$(LDLIBRARY)'
3907INSTSONAME='$(LDLIBRARY)'
3908DLLLIBRARY=''
3909LDLIBRARYDIR=''
3910RUNSHARED=''
3911
3912# LINKCC is the command that links the python executable -- default is $(CC).
3913# If CXX is set, and if it is needed to link a main function that was
3914# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3915# python might then depend on the C++ runtime
3916# This is altered for AIX in order to build the export list before
3917# linking.
3918
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003919{ echo "$as_me:$LINENO: checking LINKCC" >&5
3920echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003921if test -z "$LINKCC"
3922then
3923 LINKCC='$(PURIFY) $(MAINCC)'
3924 case $ac_sys_system in
3925 AIX*)
3926 exp_extra="\"\""
3927 if test $ac_sys_release -ge 5 -o \
3928 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3929 exp_extra="."
3930 fi
3931 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003932 QNX*)
3933 # qcc must be used because the other compilers do not
3934 # support -N.
3935 LINKCC=qcc;;
3936 esac
3937fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003938{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3939echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003940
3941# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3942# make sure we default having it set to "no": this is used by
3943# distutils.unixccompiler to know if it should add --enable-new-dtags
3944# to linker command lines, and failing to detect GNU ld simply results
3945# in the same bahaviour as before.
3946
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003947{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3948echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003949ac_prog=ld
3950if test "$GCC" = yes; then
3951 ac_prog=`$CC -print-prog-name=ld`
3952fi
3953case `"$ac_prog" -V 2>&1 < /dev/null` in
3954 *GNU*)
3955 GNULD=yes;;
3956 *)
3957 GNULD=no;;
3958esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003959{ echo "$as_me:$LINENO: result: $GNULD" >&5
3960echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003961
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003962{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3963echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003964# Check whether --enable-shared was given.
3965if test "${enable_shared+set}" = set; then
3966 enableval=$enable_shared;
3967fi
3968
3969
3970if test -z "$enable_shared"
3971then
3972 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00003973 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003974 enable_shared="yes";;
3975 *)
3976 enable_shared="no";;
3977 esac
3978fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003979{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3980echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003981
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003982{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3983echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003984# Check whether --enable-profiling was given.
3985if test "${enable_profiling+set}" = set; then
3986 enableval=$enable_profiling; ac_save_cc="$CC"
3987 CC="$CC -pg"
3988 if test "$cross_compiling" = yes; then
3989 ac_enable_profiling="no"
3990else
3991 cat >conftest.$ac_ext <<_ACEOF
3992/* confdefs.h. */
3993_ACEOF
3994cat confdefs.h >>conftest.$ac_ext
3995cat >>conftest.$ac_ext <<_ACEOF
3996/* end confdefs.h. */
3997int main() { return 0; }
3998_ACEOF
3999rm -f conftest$ac_exeext
4000if { (ac_try="$ac_link"
4001case "(($ac_try" in
4002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4003 *) ac_try_echo=$ac_try;;
4004esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004006 (eval "$ac_link") 2>&5
4007 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004009 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4010 { (case "(($ac_try" in
4011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4012 *) ac_try_echo=$ac_try;;
4013esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004015 (eval "$ac_try") 2>&5
4016 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004018 (exit $ac_status); }; }; then
4019 ac_enable_profiling="yes"
4020else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004021 echo "$as_me: program exited with status $ac_status" >&5
4022echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004023sed 's/^/| /' conftest.$ac_ext >&5
4024
4025( exit $ac_status )
4026ac_enable_profiling="no"
4027fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4029fi
4030
4031
4032 CC="$ac_save_cc"
4033fi
4034
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004035{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4036echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004037
4038case "$ac_enable_profiling" in
4039 "yes")
4040 BASECFLAGS="-pg $BASECFLAGS"
4041 LDFLAGS="-pg $LDFLAGS"
4042 ;;
4043esac
4044
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004045{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4046echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004047
4048# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4049# library that we build, but we do not want to link against it (we
4050# will find it with a -framework option). For this reason there is an
4051# extra variable BLDLIBRARY against which Python and the extension
4052# modules are linked, BLDLIBRARY. This is normally the same as
4053# LDLIBRARY, but empty for MacOSX framework builds.
4054if test "$enable_framework"
4055then
4056 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4057 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4058 BLDLIBRARY=''
4059else
4060 BLDLIBRARY='$(LDLIBRARY)'
4061fi
4062
4063# Other platforms follow
4064if test $enable_shared = "yes"; then
4065
4066cat >>confdefs.h <<\_ACEOF
4067#define Py_ENABLE_SHARED 1
4068_ACEOF
4069
4070 case $ac_sys_system in
4071 CYGWIN*)
4072 LDLIBRARY='libpython$(VERSION).dll.a'
4073 DLLLIBRARY='libpython$(VERSION).dll'
4074 ;;
4075 SunOS*)
4076 LDLIBRARY='libpython$(VERSION).so'
4077 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4078 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4079 INSTSONAME="$LDLIBRARY".$SOVERSION
4080 ;;
4081 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4082 LDLIBRARY='libpython$(VERSION).so'
4083 BLDLIBRARY='-L. -lpython$(VERSION)'
4084 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4085 case $ac_sys_system in
4086 FreeBSD*)
4087 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4088 ;;
4089 esac
4090 INSTSONAME="$LDLIBRARY".$SOVERSION
4091 ;;
4092 hp*|HP*)
4093 case `uname -m` in
4094 ia64)
4095 LDLIBRARY='libpython$(VERSION).so'
4096 ;;
4097 *)
4098 LDLIBRARY='libpython$(VERSION).sl'
4099 ;;
4100 esac
4101 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4102 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4103 ;;
4104 OSF*)
4105 LDLIBRARY='libpython$(VERSION).so'
4106 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4107 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4108 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004109 Darwin*)
4110 LDLIBRARY='libpython$(VERSION).dylib'
4111 BLDLIBRARY='-L. -lpython$(VERSION)'
4112 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4113 ;;
4114
4115 esac
4116else # shared is disabled
4117 case $ac_sys_system in
4118 CYGWIN*)
4119 BLDLIBRARY='$(LIBRARY)'
4120 LDLIBRARY='libpython$(VERSION).dll.a'
4121 ;;
4122 esac
4123fi
4124
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004125{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4126echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004127
4128if test -n "$ac_tool_prefix"; then
4129 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4130set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004131{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4132echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004133if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004134 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004135else
4136 if test -n "$RANLIB"; then
4137 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4138else
4139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4140for as_dir in $PATH
4141do
4142 IFS=$as_save_IFS
4143 test -z "$as_dir" && as_dir=.
4144 for ac_exec_ext in '' $ac_executable_extensions; do
4145 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4146 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004147 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004148 break 2
4149 fi
4150done
4151done
4152IFS=$as_save_IFS
4153
4154fi
4155fi
4156RANLIB=$ac_cv_prog_RANLIB
4157if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004158 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4159echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004160else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004161 { echo "$as_me:$LINENO: result: no" >&5
4162echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004163fi
4164
4165
4166fi
4167if test -z "$ac_cv_prog_RANLIB"; then
4168 ac_ct_RANLIB=$RANLIB
4169 # Extract the first word of "ranlib", so it can be a program name with args.
4170set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004171{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4172echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004173if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004174 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004175else
4176 if test -n "$ac_ct_RANLIB"; then
4177 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4178else
4179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4180for as_dir in $PATH
4181do
4182 IFS=$as_save_IFS
4183 test -z "$as_dir" && as_dir=.
4184 for ac_exec_ext in '' $ac_executable_extensions; do
4185 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4186 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004187 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004188 break 2
4189 fi
4190done
4191done
4192IFS=$as_save_IFS
4193
4194fi
4195fi
4196ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4197if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004198 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4199echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004200else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004201 { echo "$as_me:$LINENO: result: no" >&5
4202echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004203fi
4204
4205 if test "x$ac_ct_RANLIB" = x; then
4206 RANLIB=":"
4207 else
4208 case $cross_compiling:$ac_tool_warned in
4209yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004210{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4211whose name does not start with the host triplet. If you think this
4212configuration is useful to you, please write to autoconf@gnu.org." >&5
4213echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4214whose name does not start with the host triplet. If you think this
4215configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004216ac_tool_warned=yes ;;
4217esac
4218 RANLIB=$ac_ct_RANLIB
4219 fi
4220else
4221 RANLIB="$ac_cv_prog_RANLIB"
4222fi
4223
4224
4225for ac_prog in ar aal
4226do
4227 # Extract the first word of "$ac_prog", so it can be a program name with args.
4228set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004229{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4230echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004231if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004232 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004233else
4234 if test -n "$AR"; then
4235 ac_cv_prog_AR="$AR" # Let the user override the test.
4236else
4237as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4238for as_dir in $PATH
4239do
4240 IFS=$as_save_IFS
4241 test -z "$as_dir" && as_dir=.
4242 for ac_exec_ext in '' $ac_executable_extensions; do
4243 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4244 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004245 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004246 break 2
4247 fi
4248done
4249done
4250IFS=$as_save_IFS
4251
4252fi
4253fi
4254AR=$ac_cv_prog_AR
4255if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004256 { echo "$as_me:$LINENO: result: $AR" >&5
4257echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004258else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004259 { echo "$as_me:$LINENO: result: no" >&5
4260echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004261fi
4262
4263
4264 test -n "$AR" && break
4265done
4266test -n "$AR" || AR="ar"
4267
4268
4269# tweak ARFLAGS only if the user didn't set it on the command line
4270
4271if test -z "$ARFLAGS"
4272then
4273 ARFLAGS="rc"
4274fi
4275
4276
4277# Extract the first word of "svnversion", so it can be a program name with args.
4278set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004279{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4280echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004281if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004282 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004283else
4284 if test -n "$SVNVERSION"; then
4285 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4286else
4287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4288for as_dir in $PATH
4289do
4290 IFS=$as_save_IFS
4291 test -z "$as_dir" && as_dir=.
4292 for ac_exec_ext in '' $ac_executable_extensions; do
4293 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4294 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004295 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004296 break 2
4297 fi
4298done
4299done
4300IFS=$as_save_IFS
4301
4302 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4303fi
4304fi
4305SVNVERSION=$ac_cv_prog_SVNVERSION
4306if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004307 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4308echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004309else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004310 { echo "$as_me:$LINENO: result: no" >&5
4311echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004312fi
4313
4314
4315if test $SVNVERSION = found
4316then
4317 SVNVERSION="svnversion \$(srcdir)"
4318else
4319 SVNVERSION="echo Unversioned directory"
4320fi
4321
4322case $MACHDEP in
4323bsdos*|hp*|HP*)
4324 # install -d does not work on BSDI or HP-UX
4325 if test -z "$INSTALL"
4326 then
4327 INSTALL="${srcdir}/install-sh -c"
4328 fi
4329esac
4330ac_aux_dir=
4331for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4332 if test -f "$ac_dir/install-sh"; then
4333 ac_aux_dir=$ac_dir
4334 ac_install_sh="$ac_aux_dir/install-sh -c"
4335 break
4336 elif test -f "$ac_dir/install.sh"; then
4337 ac_aux_dir=$ac_dir
4338 ac_install_sh="$ac_aux_dir/install.sh -c"
4339 break
4340 elif test -f "$ac_dir/shtool"; then
4341 ac_aux_dir=$ac_dir
4342 ac_install_sh="$ac_aux_dir/shtool install -c"
4343 break
4344 fi
4345done
4346if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004347 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4348echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004349 { (exit 1); exit 1; }; }
4350fi
4351
4352# These three variables are undocumented and unsupported,
4353# and are intended to be withdrawn in a future Autoconf release.
4354# They can cause serious problems if a builder's source tree is in a directory
4355# whose full name contains unusual characters.
4356ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4357ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4358ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4359
4360
4361# Find a good install program. We prefer a C program (faster),
4362# so one script is as good as another. But avoid the broken or
4363# incompatible versions:
4364# SysV /etc/install, /usr/sbin/install
4365# SunOS /usr/etc/install
4366# IRIX /sbin/install
4367# AIX /bin/install
4368# AmigaOS /C/install, which installs bootblocks on floppy discs
4369# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4370# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4371# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4372# OS/2's system install, which has a completely different semantic
4373# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004374{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4375echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004376if test -z "$INSTALL"; then
4377if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004378 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004379else
4380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4381for as_dir in $PATH
4382do
4383 IFS=$as_save_IFS
4384 test -z "$as_dir" && as_dir=.
4385 # Account for people who put trailing slashes in PATH elements.
4386case $as_dir/ in
4387 ./ | .// | /cC/* | \
4388 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4389 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4390 /usr/ucb/* ) ;;
4391 *)
4392 # OSF1 and SCO ODT 3.0 have their own names for install.
4393 # Don't use installbsd from OSF since it installs stuff as root
4394 # by default.
4395 for ac_prog in ginstall scoinst install; do
4396 for ac_exec_ext in '' $ac_executable_extensions; do
4397 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4398 if test $ac_prog = install &&
4399 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4400 # AIX install. It has an incompatible calling convention.
4401 :
4402 elif test $ac_prog = install &&
4403 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4404 # program-specific install script used by HP pwplus--don't use.
4405 :
4406 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004407 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4408 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004409 fi
4410 fi
4411 done
4412 done
4413 ;;
4414esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004415done
4416IFS=$as_save_IFS
4417
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004418
4419fi
4420 if test "${ac_cv_path_install+set}" = set; then
4421 INSTALL=$ac_cv_path_install
4422 else
4423 # As a last resort, use the slow shell script. Don't cache a
4424 # value for INSTALL within a source directory, because that will
4425 # break other packages using the cache if that directory is
4426 # removed, or if the value is a relative name.
4427 INSTALL=$ac_install_sh
4428 fi
4429fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004430{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4431echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004432
4433# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4434# It thinks the first close brace ends the variable substitution.
4435test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4436
4437test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4438
4439test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4440
4441
4442# Not every filesystem supports hard links
4443
4444if test -z "$LN" ; then
4445 case $ac_sys_system in
4446 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004447 *) LN=ln;;
4448 esac
4449fi
4450
4451# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004452{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4453echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004454
4455# Check whether --with-pydebug was given.
4456if test "${with_pydebug+set}" = set; then
4457 withval=$with_pydebug;
4458if test "$withval" != no
4459then
4460
4461cat >>confdefs.h <<\_ACEOF
4462#define Py_DEBUG 1
4463_ACEOF
4464
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004465 { echo "$as_me:$LINENO: result: yes" >&5
4466echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004467 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004468else { echo "$as_me:$LINENO: result: no" >&5
4469echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004470fi
4471else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004472 { echo "$as_me:$LINENO: result: no" >&5
4473echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004474fi
4475
4476
4477# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4478# merged with this chunk of code?
4479
4480# Optimizer/debugger flags
4481# ------------------------
4482# (The following bit of code is complicated enough - please keep things
4483# indented properly. Just pretend you're editing Python code. ;-)
4484
4485# There are two parallel sets of case statements below, one that checks to
4486# see if OPT was set and one that does BASECFLAGS setting based upon
4487# compiler and platform. BASECFLAGS tweaks need to be made even if the
4488# user set OPT.
4489
4490# tweak OPT based on compiler and platform, only if the user didn't set
4491# it on the command line
4492
4493if test -z "$OPT"
4494then
4495 case $GCC in
4496 yes)
4497 if test "$CC" != 'g++' ; then
4498 STRICT_PROTO="-Wstrict-prototypes"
4499 fi
4500 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4501 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4502 WRAP="-fwrapv"
4503 fi
4504 case $ac_cv_prog_cc_g in
4505 yes)
4506 if test "$Py_DEBUG" = 'true' ; then
4507 # Optimization messes up debuggers, so turn it off for
4508 # debug builds.
4509 OPT="-g -Wall $STRICT_PROTO"
4510 else
4511 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4512 fi
4513 ;;
4514 *)
4515 OPT="-O3 -Wall $STRICT_PROTO"
4516 ;;
4517 esac
4518 case $ac_sys_system in
4519 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4520 ;;
4521 esac
4522 ;;
4523
4524 *)
4525 OPT="-O"
4526 ;;
4527 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004528fi
4529
4530
4531
4532# The -arch flags for universal builds on OSX
4533UNIVERSAL_ARCH_FLAGS=
4534
4535
4536# tweak BASECFLAGS based on compiler and platform
4537case $GCC in
4538yes)
4539 # Python violates C99 rules, by casting between incompatible
4540 # pointer types. GCC may generate bad code as a result of that,
4541 # so use -fno-strict-aliasing if supported.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004542 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4543echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004544 ac_save_cc="$CC"
4545 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004546 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004547 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004548else
4549 if test "$cross_compiling" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004550 ac_cv_no_strict_aliasing_ok=no
4551else
4552 cat >conftest.$ac_ext <<_ACEOF
4553/* confdefs.h. */
4554_ACEOF
4555cat confdefs.h >>conftest.$ac_ext
4556cat >>conftest.$ac_ext <<_ACEOF
4557/* end confdefs.h. */
4558int main() { return 0; }
4559_ACEOF
4560rm -f conftest$ac_exeext
4561if { (ac_try="$ac_link"
4562case "(($ac_try" in
4563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4564 *) ac_try_echo=$ac_try;;
4565esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004567 (eval "$ac_link") 2>&5
4568 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004570 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4571 { (case "(($ac_try" in
4572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4573 *) ac_try_echo=$ac_try;;
4574esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004576 (eval "$ac_try") 2>&5
4577 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004579 (exit $ac_status); }; }; then
4580 ac_cv_no_strict_aliasing_ok=yes
4581else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004582 echo "$as_me: program exited with status $ac_status" >&5
4583echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004584sed 's/^/| /' conftest.$ac_ext >&5
4585
4586( exit $ac_status )
4587ac_cv_no_strict_aliasing_ok=no
4588fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4590fi
4591
4592
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004593fi
4594
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004595 CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004596 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4597echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004598 if test $ac_cv_no_strict_aliasing_ok = yes
4599 then
4600 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4601 fi
4602
4603 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4604 # support. Without this, treatment of subnormals doesn't follow
4605 # the standard.
4606 case $ac_sys_machine in
4607 alpha*)
4608 BASECFLAGS="$BASECFLAGS -mieee"
4609 ;;
4610 esac
4611
4612 case $ac_sys_system in
4613 SCO_SV*)
4614 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4615 ;;
4616 # is there any other compiler on Darwin besides gcc?
4617 Darwin*)
4618 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4619 # used to be here, but non-Apple gcc doesn't accept them.
4620
4621
4622 if test "${enable_universalsdk}"; then
4623 UNIVERSAL_ARCH_FLAGS=""
4624 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4625 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4626 ARCH_RUN_32BIT=""
4627
4628 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4629 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004630 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004631
4632 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4633 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4634 ARCH_RUN_32BIT="arch -i386 -ppc"
4635
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004636 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4637 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4638 ARCH_RUN_32BIT="arch -i386"
4639
4640 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4641 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4642 ARCH_RUN_32BIT="arch -i386 -ppc"
4643
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004644 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004645 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4646echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004647 { (exit 1); exit 1; }; }
4648
4649 fi
4650
4651
4652 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4653 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4654 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4655 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4656 fi
4657 fi
4658
4659 # Calculate the right deployment target for this build.
4660 #
4661 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4662 if test ${cur_target} '>' 10.2; then
4663 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004664 if test ${enable_universalsdk}; then
4665 if test "${UNIVERSAL_ARCHS}" = "all"; then
4666 # Ensure that the default platform for a
4667 # 4-way universal build is OSX 10.5,
4668 # that's the first OS release where
4669 # 4-way builds make sense.
4670 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004671
4672 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4673 cur_target='10.5'
4674
4675 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4676 cur_target='10.5'
4677
4678 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4679 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004680 fi
4681 else
4682 if test `arch` = "i386"; then
4683 # On Intel macs default to a deployment
4684 # target of 10.4, that's the first OSX
4685 # release with Intel support.
4686 cur_target="10.4"
4687 fi
4688 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004689 fi
4690 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4691
4692 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4693 # environment with a value that is the same as what we'll use
4694 # in the Makefile to ensure that we'll get the same compiler
4695 # environment during configure and build time.
4696 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4697 export MACOSX_DEPLOYMENT_TARGET
4698 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4699
4700 ;;
4701 OSF*)
4702 BASECFLAGS="$BASECFLAGS -mieee"
4703 ;;
4704 esac
4705 ;;
4706
4707*)
4708 case $ac_sys_system in
4709 OpenUNIX*|UnixWare*)
4710 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4711 ;;
4712 OSF*)
4713 BASECFLAGS="$BASECFLAGS -ieee -std"
4714 ;;
4715 SCO_SV*)
4716 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4717 ;;
4718 esac
4719 ;;
4720esac
4721
4722if test "$Py_DEBUG" = 'true'; then
4723 :
4724else
4725 OPT="-DNDEBUG $OPT"
4726fi
4727
4728if test "$ac_arch_flags"
4729then
4730 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4731fi
4732
4733# disable check for icc since it seems to pass, but generates a warning
4734if test "$CC" = icc
4735then
4736 ac_cv_opt_olimit_ok=no
4737fi
4738
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004739{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4740echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004741if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004742 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004743else
4744 ac_save_cc="$CC"
4745CC="$CC -OPT:Olimit=0"
4746if test "$cross_compiling" = yes; then
4747 ac_cv_opt_olimit_ok=no
4748else
4749 cat >conftest.$ac_ext <<_ACEOF
4750/* confdefs.h. */
4751_ACEOF
4752cat confdefs.h >>conftest.$ac_ext
4753cat >>conftest.$ac_ext <<_ACEOF
4754/* end confdefs.h. */
4755int main() { return 0; }
4756_ACEOF
4757rm -f conftest$ac_exeext
4758if { (ac_try="$ac_link"
4759case "(($ac_try" in
4760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4761 *) ac_try_echo=$ac_try;;
4762esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004764 (eval "$ac_link") 2>&5
4765 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004767 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4768 { (case "(($ac_try" in
4769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4770 *) ac_try_echo=$ac_try;;
4771esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004773 (eval "$ac_try") 2>&5
4774 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004776 (exit $ac_status); }; }; then
4777 ac_cv_opt_olimit_ok=yes
4778else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004779 echo "$as_me: program exited with status $ac_status" >&5
4780echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004781sed 's/^/| /' conftest.$ac_ext >&5
4782
4783( exit $ac_status )
4784ac_cv_opt_olimit_ok=no
4785fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004786rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4787fi
4788
4789
4790CC="$ac_save_cc"
4791fi
4792
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004793{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4794echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004795if test $ac_cv_opt_olimit_ok = yes; then
4796 case $ac_sys_system in
4797 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4798 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4799 # environment?
4800 Darwin*)
4801 ;;
4802 *)
4803 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4804 ;;
4805 esac
4806else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004807 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4808echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004809 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004810 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004811else
4812 ac_save_cc="$CC"
4813 CC="$CC -Olimit 1500"
4814 if test "$cross_compiling" = yes; then
4815 ac_cv_olimit_ok=no
4816else
4817 cat >conftest.$ac_ext <<_ACEOF
4818/* confdefs.h. */
4819_ACEOF
4820cat confdefs.h >>conftest.$ac_ext
4821cat >>conftest.$ac_ext <<_ACEOF
4822/* end confdefs.h. */
4823int main() { return 0; }
4824_ACEOF
4825rm -f conftest$ac_exeext
4826if { (ac_try="$ac_link"
4827case "(($ac_try" in
4828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4829 *) ac_try_echo=$ac_try;;
4830esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832 (eval "$ac_link") 2>&5
4833 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004835 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4836 { (case "(($ac_try" in
4837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4838 *) ac_try_echo=$ac_try;;
4839esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004841 (eval "$ac_try") 2>&5
4842 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004844 (exit $ac_status); }; }; then
4845 ac_cv_olimit_ok=yes
4846else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004847 echo "$as_me: program exited with status $ac_status" >&5
4848echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004849sed 's/^/| /' conftest.$ac_ext >&5
4850
4851( exit $ac_status )
4852ac_cv_olimit_ok=no
4853fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4855fi
4856
4857
4858 CC="$ac_save_cc"
4859fi
4860
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004861 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4862echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004863 if test $ac_cv_olimit_ok = yes; then
4864 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4865 fi
4866fi
4867
4868# Check whether GCC supports PyArg_ParseTuple format
4869if test "$GCC" = "yes"
4870then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004871 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4872echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004873 save_CFLAGS=$CFLAGS
4874 CFLAGS="$CFLAGS -Werror"
4875 cat >conftest.$ac_ext <<_ACEOF
4876/* confdefs.h. */
4877_ACEOF
4878cat confdefs.h >>conftest.$ac_ext
4879cat >>conftest.$ac_ext <<_ACEOF
4880/* end confdefs.h. */
4881
4882 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4883
4884int
4885main ()
4886{
4887
4888 ;
4889 return 0;
4890}
4891_ACEOF
4892rm -f conftest.$ac_objext
4893if { (ac_try="$ac_compile"
4894case "(($ac_try" in
4895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4896 *) ac_try_echo=$ac_try;;
4897esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004899 (eval "$ac_compile") 2>conftest.er1
4900 ac_status=$?
4901 grep -v '^ *+' conftest.er1 >conftest.err
4902 rm -f conftest.er1
4903 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004905 (exit $ac_status); } && {
4906 test -z "$ac_c_werror_flag" ||
4907 test ! -s conftest.err
4908 } && test -s conftest.$ac_objext; then
4909
4910cat >>confdefs.h <<\_ACEOF
4911#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4912_ACEOF
4913
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004914 { echo "$as_me:$LINENO: result: yes" >&5
4915echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004916else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004917 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004918sed 's/^/| /' conftest.$ac_ext >&5
4919
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004920 { echo "$as_me:$LINENO: result: no" >&5
4921echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004922
4923fi
4924
4925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4926 CFLAGS=$save_CFLAGS
4927fi
4928
4929# On some compilers, pthreads are available without further options
4930# (e.g. MacOS X). On some of these systems, the compiler will not
4931# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4932# So we have to see first whether pthreads are available without
4933# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004934{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4935echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004936if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004937 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938else
4939 if test "$cross_compiling" = yes; then
4940 ac_cv_pthread_is_default=no
4941else
4942 cat >conftest.$ac_ext <<_ACEOF
4943/* confdefs.h. */
4944_ACEOF
4945cat confdefs.h >>conftest.$ac_ext
4946cat >>conftest.$ac_ext <<_ACEOF
4947/* end confdefs.h. */
4948
4949#include <pthread.h>
4950
4951void* routine(void* p){return NULL;}
4952
4953int main(){
4954 pthread_t p;
4955 if(pthread_create(&p,NULL,routine,NULL)!=0)
4956 return 1;
4957 (void)pthread_detach(p);
4958 return 0;
4959}
4960
4961_ACEOF
4962rm -f conftest$ac_exeext
4963if { (ac_try="$ac_link"
4964case "(($ac_try" in
4965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4966 *) ac_try_echo=$ac_try;;
4967esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004969 (eval "$ac_link") 2>&5
4970 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004972 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4973 { (case "(($ac_try" in
4974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4975 *) ac_try_echo=$ac_try;;
4976esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978 (eval "$ac_try") 2>&5
4979 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981 (exit $ac_status); }; }; then
4982
4983 ac_cv_pthread_is_default=yes
4984 ac_cv_kthread=no
4985 ac_cv_pthread=no
4986
4987else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004988 echo "$as_me: program exited with status $ac_status" >&5
4989echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004990sed 's/^/| /' conftest.$ac_ext >&5
4991
4992( exit $ac_status )
4993ac_cv_pthread_is_default=no
4994fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4996fi
4997
4998
4999
5000fi
5001
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005002{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5003echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005004
5005
5006if test $ac_cv_pthread_is_default = yes
5007then
5008 ac_cv_kpthread=no
5009else
5010# -Kpthread, if available, provides the right #defines
5011# and linker options to make pthread_create available
5012# Some compilers won't report that they do not support -Kpthread,
5013# so we need to run a program to see whether it really made the
5014# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005015{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5016echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005017if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005018 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005019else
5020 ac_save_cc="$CC"
5021CC="$CC -Kpthread"
5022if test "$cross_compiling" = yes; then
5023 ac_cv_kpthread=no
5024else
5025 cat >conftest.$ac_ext <<_ACEOF
5026/* confdefs.h. */
5027_ACEOF
5028cat confdefs.h >>conftest.$ac_ext
5029cat >>conftest.$ac_ext <<_ACEOF
5030/* end confdefs.h. */
5031
5032#include <pthread.h>
5033
5034void* routine(void* p){return NULL;}
5035
5036int main(){
5037 pthread_t p;
5038 if(pthread_create(&p,NULL,routine,NULL)!=0)
5039 return 1;
5040 (void)pthread_detach(p);
5041 return 0;
5042}
5043
5044_ACEOF
5045rm -f conftest$ac_exeext
5046if { (ac_try="$ac_link"
5047case "(($ac_try" in
5048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5049 *) ac_try_echo=$ac_try;;
5050esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052 (eval "$ac_link") 2>&5
5053 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005055 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5056 { (case "(($ac_try" in
5057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5058 *) ac_try_echo=$ac_try;;
5059esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005061 (eval "$ac_try") 2>&5
5062 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005064 (exit $ac_status); }; }; then
5065 ac_cv_kpthread=yes
5066else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005067 echo "$as_me: program exited with status $ac_status" >&5
5068echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005069sed 's/^/| /' conftest.$ac_ext >&5
5070
5071( exit $ac_status )
5072ac_cv_kpthread=no
5073fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5075fi
5076
5077
5078CC="$ac_save_cc"
5079fi
5080
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005081{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5082echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005083fi
5084
5085if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5086then
5087# -Kthread, if available, provides the right #defines
5088# and linker options to make pthread_create available
5089# Some compilers won't report that they do not support -Kthread,
5090# so we need to run a program to see whether it really made the
5091# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005092{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5093echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005094if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005095 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005096else
5097 ac_save_cc="$CC"
5098CC="$CC -Kthread"
5099if test "$cross_compiling" = yes; then
5100 ac_cv_kthread=no
5101else
5102 cat >conftest.$ac_ext <<_ACEOF
5103/* confdefs.h. */
5104_ACEOF
5105cat confdefs.h >>conftest.$ac_ext
5106cat >>conftest.$ac_ext <<_ACEOF
5107/* end confdefs.h. */
5108
5109#include <pthread.h>
5110
5111void* routine(void* p){return NULL;}
5112
5113int main(){
5114 pthread_t p;
5115 if(pthread_create(&p,NULL,routine,NULL)!=0)
5116 return 1;
5117 (void)pthread_detach(p);
5118 return 0;
5119}
5120
5121_ACEOF
5122rm -f conftest$ac_exeext
5123if { (ac_try="$ac_link"
5124case "(($ac_try" in
5125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5126 *) ac_try_echo=$ac_try;;
5127esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005129 (eval "$ac_link") 2>&5
5130 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005132 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5133 { (case "(($ac_try" in
5134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5135 *) ac_try_echo=$ac_try;;
5136esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005138 (eval "$ac_try") 2>&5
5139 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005141 (exit $ac_status); }; }; then
5142 ac_cv_kthread=yes
5143else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005144 echo "$as_me: program exited with status $ac_status" >&5
5145echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005146sed 's/^/| /' conftest.$ac_ext >&5
5147
5148( exit $ac_status )
5149ac_cv_kthread=no
5150fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5152fi
5153
5154
5155CC="$ac_save_cc"
5156fi
5157
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005158{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5159echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005160fi
5161
5162if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5163then
5164# -pthread, if available, provides the right #defines
5165# and linker options to make pthread_create available
5166# Some compilers won't report that they do not support -pthread,
5167# so we need to run a program to see whether it really made the
5168# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005169{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5170echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005171if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005172 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005173else
5174 ac_save_cc="$CC"
5175CC="$CC -pthread"
5176if test "$cross_compiling" = yes; then
5177 ac_cv_pthread=no
5178else
5179 cat >conftest.$ac_ext <<_ACEOF
5180/* confdefs.h. */
5181_ACEOF
5182cat confdefs.h >>conftest.$ac_ext
5183cat >>conftest.$ac_ext <<_ACEOF
5184/* end confdefs.h. */
5185
5186#include <pthread.h>
5187
5188void* routine(void* p){return NULL;}
5189
5190int main(){
5191 pthread_t p;
5192 if(pthread_create(&p,NULL,routine,NULL)!=0)
5193 return 1;
5194 (void)pthread_detach(p);
5195 return 0;
5196}
5197
5198_ACEOF
5199rm -f conftest$ac_exeext
5200if { (ac_try="$ac_link"
5201case "(($ac_try" in
5202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5203 *) ac_try_echo=$ac_try;;
5204esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005206 (eval "$ac_link") 2>&5
5207 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005209 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5210 { (case "(($ac_try" in
5211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5212 *) ac_try_echo=$ac_try;;
5213esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005215 (eval "$ac_try") 2>&5
5216 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005218 (exit $ac_status); }; }; then
5219 ac_cv_pthread=yes
5220else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005221 echo "$as_me: program exited with status $ac_status" >&5
5222echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005223sed 's/^/| /' conftest.$ac_ext >&5
5224
5225( exit $ac_status )
5226ac_cv_pthread=no
5227fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005228rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5229fi
5230
5231
5232CC="$ac_save_cc"
5233fi
5234
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005235{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5236echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005237fi
5238
5239# If we have set a CC compiler flag for thread support then
5240# check if it works for CXX, too.
5241ac_cv_cxx_thread=no
5242if test ! -z "$CXX"
5243then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005244{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5245echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005246ac_save_cxx="$CXX"
5247
5248if test "$ac_cv_kpthread" = "yes"
5249then
5250 CXX="$CXX -Kpthread"
5251 ac_cv_cxx_thread=yes
5252elif test "$ac_cv_kthread" = "yes"
5253then
5254 CXX="$CXX -Kthread"
5255 ac_cv_cxx_thread=yes
5256elif test "$ac_cv_pthread" = "yes"
5257then
5258 CXX="$CXX -pthread"
5259 ac_cv_cxx_thread=yes
5260fi
5261
5262if test $ac_cv_cxx_thread = yes
5263then
5264 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5265 $CXX -c conftest.$ac_ext 2>&5
5266 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5267 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5268 then
5269 ac_cv_cxx_thread=yes
5270 else
5271 ac_cv_cxx_thread=no
5272 fi
5273 rm -fr conftest*
5274fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005275{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5276echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005277fi
5278CXX="$ac_save_cxx"
5279
5280
5281# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005282{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5283echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005284if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005285 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005286else
5287 cat >conftest.$ac_ext <<_ACEOF
5288/* confdefs.h. */
5289_ACEOF
5290cat confdefs.h >>conftest.$ac_ext
5291cat >>conftest.$ac_ext <<_ACEOF
5292/* end confdefs.h. */
5293#include <stdlib.h>
5294#include <stdarg.h>
5295#include <string.h>
5296#include <float.h>
5297
5298int
5299main ()
5300{
5301
5302 ;
5303 return 0;
5304}
5305_ACEOF
5306rm -f conftest.$ac_objext
5307if { (ac_try="$ac_compile"
5308case "(($ac_try" in
5309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5310 *) ac_try_echo=$ac_try;;
5311esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005313 (eval "$ac_compile") 2>conftest.er1
5314 ac_status=$?
5315 grep -v '^ *+' conftest.er1 >conftest.err
5316 rm -f conftest.er1
5317 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005319 (exit $ac_status); } && {
5320 test -z "$ac_c_werror_flag" ||
5321 test ! -s conftest.err
5322 } && test -s conftest.$ac_objext; then
5323 ac_cv_header_stdc=yes
5324else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005325 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005326sed 's/^/| /' conftest.$ac_ext >&5
5327
5328 ac_cv_header_stdc=no
5329fi
5330
5331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5332
5333if test $ac_cv_header_stdc = yes; then
5334 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5335 cat >conftest.$ac_ext <<_ACEOF
5336/* confdefs.h. */
5337_ACEOF
5338cat confdefs.h >>conftest.$ac_ext
5339cat >>conftest.$ac_ext <<_ACEOF
5340/* end confdefs.h. */
5341#include <string.h>
5342
5343_ACEOF
5344if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5345 $EGREP "memchr" >/dev/null 2>&1; then
5346 :
5347else
5348 ac_cv_header_stdc=no
5349fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005350rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005351
5352fi
5353
5354if test $ac_cv_header_stdc = yes; then
5355 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5356 cat >conftest.$ac_ext <<_ACEOF
5357/* confdefs.h. */
5358_ACEOF
5359cat confdefs.h >>conftest.$ac_ext
5360cat >>conftest.$ac_ext <<_ACEOF
5361/* end confdefs.h. */
5362#include <stdlib.h>
5363
5364_ACEOF
5365if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5366 $EGREP "free" >/dev/null 2>&1; then
5367 :
5368else
5369 ac_cv_header_stdc=no
5370fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005371rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005372
5373fi
5374
5375if test $ac_cv_header_stdc = yes; then
5376 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5377 if test "$cross_compiling" = yes; then
5378 :
5379else
5380 cat >conftest.$ac_ext <<_ACEOF
5381/* confdefs.h. */
5382_ACEOF
5383cat confdefs.h >>conftest.$ac_ext
5384cat >>conftest.$ac_ext <<_ACEOF
5385/* end confdefs.h. */
5386#include <ctype.h>
5387#include <stdlib.h>
5388#if ((' ' & 0x0FF) == 0x020)
5389# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5390# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5391#else
5392# define ISLOWER(c) \
5393 (('a' <= (c) && (c) <= 'i') \
5394 || ('j' <= (c) && (c) <= 'r') \
5395 || ('s' <= (c) && (c) <= 'z'))
5396# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5397#endif
5398
5399#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5400int
5401main ()
5402{
5403 int i;
5404 for (i = 0; i < 256; i++)
5405 if (XOR (islower (i), ISLOWER (i))
5406 || toupper (i) != TOUPPER (i))
5407 return 2;
5408 return 0;
5409}
5410_ACEOF
5411rm -f conftest$ac_exeext
5412if { (ac_try="$ac_link"
5413case "(($ac_try" in
5414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5415 *) ac_try_echo=$ac_try;;
5416esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418 (eval "$ac_link") 2>&5
5419 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005421 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5422 { (case "(($ac_try" in
5423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5424 *) ac_try_echo=$ac_try;;
5425esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005427 (eval "$ac_try") 2>&5
5428 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005430 (exit $ac_status); }; }; then
5431 :
5432else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005433 echo "$as_me: program exited with status $ac_status" >&5
5434echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005435sed 's/^/| /' conftest.$ac_ext >&5
5436
5437( exit $ac_status )
5438ac_cv_header_stdc=no
5439fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005440rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5441fi
5442
5443
5444fi
5445fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005446{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5447echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005448if test $ac_cv_header_stdc = yes; then
5449
5450cat >>confdefs.h <<\_ACEOF
5451#define STDC_HEADERS 1
5452_ACEOF
5453
5454fi
5455
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005456# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5467 inttypes.h stdint.h unistd.h
5468do
5469as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5470{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5471echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5472if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5473 echo $ECHO_N "(cached) $ECHO_C" >&6
5474else
5475 cat >conftest.$ac_ext <<_ACEOF
5476/* confdefs.h. */
5477_ACEOF
5478cat confdefs.h >>conftest.$ac_ext
5479cat >>conftest.$ac_ext <<_ACEOF
5480/* end confdefs.h. */
5481$ac_includes_default
5482
5483#include <$ac_header>
5484_ACEOF
5485rm -f conftest.$ac_objext
5486if { (ac_try="$ac_compile"
5487case "(($ac_try" in
5488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5489 *) ac_try_echo=$ac_try;;
5490esac
5491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5492 (eval "$ac_compile") 2>conftest.er1
5493 ac_status=$?
5494 grep -v '^ *+' conftest.er1 >conftest.err
5495 rm -f conftest.er1
5496 cat conftest.err >&5
5497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5498 (exit $ac_status); } && {
5499 test -z "$ac_c_werror_flag" ||
5500 test ! -s conftest.err
5501 } && test -s conftest.$ac_objext; then
5502 eval "$as_ac_Header=yes"
5503else
5504 echo "$as_me: failed program was:" >&5
5505sed 's/^/| /' conftest.$ac_ext >&5
5506
5507 eval "$as_ac_Header=no"
5508fi
5509
5510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5511fi
5512ac_res=`eval echo '${'$as_ac_Header'}'`
5513 { echo "$as_me:$LINENO: result: $ac_res" >&5
5514echo "${ECHO_T}$ac_res" >&6; }
5515if test `eval echo '${'$as_ac_Header'}'` = yes; then
5516 cat >>confdefs.h <<_ACEOF
5517#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5518_ACEOF
5519
5520fi
5521
5522done
5523
5524
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005525
Martin v. Löwis11437992002-04-12 09:54:03 +00005526
5527
5528
5529
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
Anthony Baxter8a560de2004-10-13 15:30:56 +00005561
Martin v. Löwisc3001752005-01-23 09:27:24 +00005562
Martin v. Löwis11017b12006-01-14 18:12:57 +00005563
Thomas Wouters477c8d52006-05-27 19:21:47 +00005564
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005565
5566
5567
5568
5569
5570
5571
5572
Thomas Wouters89f507f2006-12-13 04:49:30 +00005573
Christian Heimes043d6f62008-01-07 17:19:16 +00005574
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005575
5576
Christian Heimesbbe741d2008-03-28 10:53:29 +00005577
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005578
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005579for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5580fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005581ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005582shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005583unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005584sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5585sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005586sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005587sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005588sys/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 +00005589sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005590bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005591do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005592as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005593if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005594 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5595echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005596if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005597 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005598fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005599ac_res=`eval echo '${'$as_ac_Header'}'`
5600 { echo "$as_me:$LINENO: result: $ac_res" >&5
5601echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005602else
Martin v. Löwis11437992002-04-12 09:54:03 +00005603 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005604{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5605echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005606cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005607/* confdefs.h. */
5608_ACEOF
5609cat confdefs.h >>conftest.$ac_ext
5610cat >>conftest.$ac_ext <<_ACEOF
5611/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005612$ac_includes_default
5613#include <$ac_header>
5614_ACEOF
5615rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005616if { (ac_try="$ac_compile"
5617case "(($ac_try" in
5618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5619 *) ac_try_echo=$ac_try;;
5620esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005622 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005624 grep -v '^ *+' conftest.er1 >conftest.err
5625 rm -f conftest.er1
5626 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005628 (exit $ac_status); } && {
5629 test -z "$ac_c_werror_flag" ||
5630 test ! -s conftest.err
5631 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005632 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005633else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005635sed 's/^/| /' conftest.$ac_ext >&5
5636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005637 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005639
5640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005641{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5642echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005643
5644# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005645{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5646echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005647cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005648/* confdefs.h. */
5649_ACEOF
5650cat confdefs.h >>conftest.$ac_ext
5651cat >>conftest.$ac_ext <<_ACEOF
5652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005653#include <$ac_header>
5654_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005655if { (ac_try="$ac_cpp conftest.$ac_ext"
5656case "(($ac_try" in
5657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5658 *) ac_try_echo=$ac_try;;
5659esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005661 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005662 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005663 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005664 rm -f conftest.er1
5665 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005667 (exit $ac_status); } >/dev/null && {
5668 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5669 test ! -s conftest.err
5670 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005671 ac_header_preproc=yes
5672else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005674sed 's/^/| /' conftest.$ac_ext >&5
5675
Martin v. Löwis11437992002-04-12 09:54:03 +00005676 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005678
Martin v. Löwis11437992002-04-12 09:54:03 +00005679rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005680{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5681echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005682
5683# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005684case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5685 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005686 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5687echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5688 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5689echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005690 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005691 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005692 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005693 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5694echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5695 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5696echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5697 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5698echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5699 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5700echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5701 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5702echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5703 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5704echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005705 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005706## -------------------------------------- ##
5707## Report this to http://bugs.python.org/ ##
5708## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005709_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005710 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005711 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005712esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005713{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5714echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005715if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005716 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005717else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005718 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005719fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005720ac_res=`eval echo '${'$as_ac_Header'}'`
5721 { echo "$as_me:$LINENO: result: $ac_res" >&5
5722echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005723
5724fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005725if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005726 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005727#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005728_ACEOF
5729
5730fi
5731
Guido van Rossum627b2d71993-12-24 10:39:16 +00005732done
5733
Martin v. Löwis11437992002-04-12 09:54:03 +00005734
5735
5736
5737
5738
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005739ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005740for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005741 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5742{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5743echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005744if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005745 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005746else
Martin v. Löwis11437992002-04-12 09:54:03 +00005747 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005748/* confdefs.h. */
5749_ACEOF
5750cat confdefs.h >>conftest.$ac_ext
5751cat >>conftest.$ac_ext <<_ACEOF
5752/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005753#include <sys/types.h>
5754#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005755
Martin v. Löwis11437992002-04-12 09:54:03 +00005756int
5757main ()
5758{
5759if ((DIR *) 0)
5760return 0;
5761 ;
5762 return 0;
5763}
5764_ACEOF
5765rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005766if { (ac_try="$ac_compile"
5767case "(($ac_try" in
5768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5769 *) ac_try_echo=$ac_try;;
5770esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005772 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005774 grep -v '^ *+' conftest.er1 >conftest.err
5775 rm -f conftest.er1
5776 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005778 (exit $ac_status); } && {
5779 test -z "$ac_c_werror_flag" ||
5780 test ! -s conftest.err
5781 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005782 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005783else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005785sed 's/^/| /' conftest.$ac_ext >&5
5786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005787 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005789
5790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005791fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005792ac_res=`eval echo '${'$as_ac_Header'}'`
5793 { echo "$as_me:$LINENO: result: $ac_res" >&5
5794echo "${ECHO_T}$ac_res" >&6; }
5795if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005796 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005797#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005798_ACEOF
5799
5800ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005801fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005802
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005803done
5804# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5805if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005806 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5807echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005808if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005809 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005810else
Martin v. Löwis11437992002-04-12 09:54:03 +00005811 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005812cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005813/* confdefs.h. */
5814_ACEOF
5815cat confdefs.h >>conftest.$ac_ext
5816cat >>conftest.$ac_ext <<_ACEOF
5817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005818
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005819/* Override any GCC internal prototype to avoid an error.
5820 Use char because int might match the return type of a GCC
5821 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005822#ifdef __cplusplus
5823extern "C"
5824#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005825char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005826int
5827main ()
5828{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005829return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005830 ;
5831 return 0;
5832}
5833_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005834for ac_lib in '' dir; do
5835 if test -z "$ac_lib"; then
5836 ac_res="none required"
5837 else
5838 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005839 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005840 fi
5841 rm -f conftest.$ac_objext conftest$ac_exeext
5842if { (ac_try="$ac_link"
5843case "(($ac_try" in
5844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5845 *) ac_try_echo=$ac_try;;
5846esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005848 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005849 ac_status=$?
5850 grep -v '^ *+' conftest.er1 >conftest.err
5851 rm -f conftest.er1
5852 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005854 (exit $ac_status); } && {
5855 test -z "$ac_c_werror_flag" ||
5856 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005857 } && test -s conftest$ac_exeext &&
5858 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005859 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005860else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005861 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005862sed 's/^/| /' conftest.$ac_ext >&5
5863
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005864
Thomas Wouters477c8d52006-05-27 19:21:47 +00005865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005866
5867rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5868 conftest$ac_exeext
5869 if test "${ac_cv_search_opendir+set}" = set; then
5870 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005872done
5873if test "${ac_cv_search_opendir+set}" = set; then
5874 :
5875else
5876 ac_cv_search_opendir=no
5877fi
5878rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005879LIBS=$ac_func_search_save_LIBS
5880fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005881{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5882echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005883ac_res=$ac_cv_search_opendir
5884if test "$ac_res" != no; then
5885 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005886
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005887fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005888
Michael W. Hudson54241132001-12-07 15:38:26 +00005889else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005890 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5891echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005892if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005893 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005894else
5895 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005896cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005897/* confdefs.h. */
5898_ACEOF
5899cat confdefs.h >>conftest.$ac_ext
5900cat >>conftest.$ac_ext <<_ACEOF
5901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005902
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005903/* Override any GCC internal prototype to avoid an error.
5904 Use char because int might match the return type of a GCC
5905 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005906#ifdef __cplusplus
5907extern "C"
5908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005909char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005910int
5911main ()
5912{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005913return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005914 ;
5915 return 0;
5916}
5917_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005918for ac_lib in '' x; do
5919 if test -z "$ac_lib"; then
5920 ac_res="none required"
5921 else
5922 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005923 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005924 fi
5925 rm -f conftest.$ac_objext conftest$ac_exeext
5926if { (ac_try="$ac_link"
5927case "(($ac_try" in
5928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5929 *) ac_try_echo=$ac_try;;
5930esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005932 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005933 ac_status=$?
5934 grep -v '^ *+' conftest.er1 >conftest.err
5935 rm -f conftest.er1
5936 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005938 (exit $ac_status); } && {
5939 test -z "$ac_c_werror_flag" ||
5940 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005941 } && test -s conftest$ac_exeext &&
5942 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005943 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005944else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005945 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005946sed 's/^/| /' conftest.$ac_ext >&5
5947
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005948
Thomas Wouters477c8d52006-05-27 19:21:47 +00005949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005950
5951rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5952 conftest$ac_exeext
5953 if test "${ac_cv_search_opendir+set}" = set; then
5954 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005956done
5957if test "${ac_cv_search_opendir+set}" = set; then
5958 :
5959else
5960 ac_cv_search_opendir=no
5961fi
5962rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005963LIBS=$ac_func_search_save_LIBS
5964fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005965{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5966echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005967ac_res=$ac_cv_search_opendir
5968if test "$ac_res" != no; then
5969 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005970
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005971fi
5972
5973fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005974
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005975{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5976echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005977if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005978 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005979else
5980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005981/* confdefs.h. */
5982_ACEOF
5983cat confdefs.h >>conftest.$ac_ext
5984cat >>conftest.$ac_ext <<_ACEOF
5985/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005986#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005987int
5988main ()
5989{
5990return makedev(0, 0);
5991 ;
5992 return 0;
5993}
5994_ACEOF
5995rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005996if { (ac_try="$ac_link"
5997case "(($ac_try" in
5998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5999 *) ac_try_echo=$ac_try;;
6000esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006002 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006003 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006004 grep -v '^ *+' conftest.er1 >conftest.err
6005 rm -f conftest.er1
6006 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006008 (exit $ac_status); } && {
6009 test -z "$ac_c_werror_flag" ||
6010 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006011 } && test -s conftest$ac_exeext &&
6012 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006013 ac_cv_header_sys_types_h_makedev=yes
6014else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006016sed 's/^/| /' conftest.$ac_ext >&5
6017
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006018 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006020
6021rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006022 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006023
6024fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006025{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6026echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006027
6028if test $ac_cv_header_sys_types_h_makedev = no; then
6029if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006030 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6031echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006032if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006033 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006034fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006035{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6036echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006037else
6038 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006039{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6040echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006041cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006042/* confdefs.h. */
6043_ACEOF
6044cat confdefs.h >>conftest.$ac_ext
6045cat >>conftest.$ac_ext <<_ACEOF
6046/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006047$ac_includes_default
6048#include <sys/mkdev.h>
6049_ACEOF
6050rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006051if { (ac_try="$ac_compile"
6052case "(($ac_try" in
6053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6054 *) ac_try_echo=$ac_try;;
6055esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006057 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006059 grep -v '^ *+' conftest.er1 >conftest.err
6060 rm -f conftest.er1
6061 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006063 (exit $ac_status); } && {
6064 test -z "$ac_c_werror_flag" ||
6065 test ! -s conftest.err
6066 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006067 ac_header_compiler=yes
6068else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006069 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006070sed 's/^/| /' conftest.$ac_ext >&5
6071
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006072 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006074
6075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006076{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6077echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006078
6079# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006080{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6081echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006082cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006083/* confdefs.h. */
6084_ACEOF
6085cat confdefs.h >>conftest.$ac_ext
6086cat >>conftest.$ac_ext <<_ACEOF
6087/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088#include <sys/mkdev.h>
6089_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006090if { (ac_try="$ac_cpp conftest.$ac_ext"
6091case "(($ac_try" in
6092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6093 *) ac_try_echo=$ac_try;;
6094esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006096 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006097 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006098 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006099 rm -f conftest.er1
6100 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006102 (exit $ac_status); } >/dev/null && {
6103 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6104 test ! -s conftest.err
6105 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006106 ac_header_preproc=yes
6107else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006108 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006109sed 's/^/| /' conftest.$ac_ext >&5
6110
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006111 ac_header_preproc=no
6112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006113
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006115{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6116echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006117
6118# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006119case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6120 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006121 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6122echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6123 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6124echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006125 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006126 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006127 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006128 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6129echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6130 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6131echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6132 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6133echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6134 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6135echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6136 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6137echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6138 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6139echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006140 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006141## -------------------------------------- ##
6142## Report this to http://bugs.python.org/ ##
6143## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006144_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006145 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006146 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006147esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006148{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6149echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006150if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006151 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006152else
6153 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6154fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006155{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6156echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006157
6158fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006159if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006160
6161cat >>confdefs.h <<\_ACEOF
6162#define MAJOR_IN_MKDEV 1
6163_ACEOF
6164
6165fi
6166
6167
6168
6169 if test $ac_cv_header_sys_mkdev_h = no; then
6170 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006171 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6172echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006174 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006175fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006176{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6177echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178else
6179 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006180{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6181echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006183/* confdefs.h. */
6184_ACEOF
6185cat confdefs.h >>conftest.$ac_ext
6186cat >>conftest.$ac_ext <<_ACEOF
6187/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188$ac_includes_default
6189#include <sys/sysmacros.h>
6190_ACEOF
6191rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006192if { (ac_try="$ac_compile"
6193case "(($ac_try" in
6194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6195 *) ac_try_echo=$ac_try;;
6196esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006200 grep -v '^ *+' conftest.er1 >conftest.err
6201 rm -f conftest.er1
6202 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006204 (exit $ac_status); } && {
6205 test -z "$ac_c_werror_flag" ||
6206 test ! -s conftest.err
6207 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006208 ac_header_compiler=yes
6209else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006211sed 's/^/| /' conftest.$ac_ext >&5
6212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006213 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006215
6216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006217{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6218echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006219
6220# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006221{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6222echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006224/* confdefs.h. */
6225_ACEOF
6226cat confdefs.h >>conftest.$ac_ext
6227cat >>conftest.$ac_ext <<_ACEOF
6228/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006229#include <sys/sysmacros.h>
6230_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006231if { (ac_try="$ac_cpp conftest.$ac_ext"
6232case "(($ac_try" in
6233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6234 *) ac_try_echo=$ac_try;;
6235esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006237 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006238 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006239 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006240 rm -f conftest.er1
6241 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006243 (exit $ac_status); } >/dev/null && {
6244 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6245 test ! -s conftest.err
6246 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006247 ac_header_preproc=yes
6248else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006250sed 's/^/| /' conftest.$ac_ext >&5
6251
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006252 ac_header_preproc=no
6253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006254
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006256{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6257echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006258
6259# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006260case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6261 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006262 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6263echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6264 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6265echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006266 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006267 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006268 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006269 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6270echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6271 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6272echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6273 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6274echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6275 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6276echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6277 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6278echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6279 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6280echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006281 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006282## -------------------------------------- ##
6283## Report this to http://bugs.python.org/ ##
6284## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006285_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006286 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006287 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006288esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006289{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6290echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006291if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006292 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006293else
6294 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6295fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006296{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6297echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006298
6299fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006300if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301
6302cat >>confdefs.h <<\_ACEOF
6303#define MAJOR_IN_SYSMACROS 1
6304_ACEOF
6305
6306fi
6307
6308
6309 fi
6310fi
6311
Michael W. Hudson54241132001-12-07 15:38:26 +00006312
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006313# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006314
6315for ac_header in term.h
6316do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006317as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6318{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6319echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006320if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006321 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006322else
6323 cat >conftest.$ac_ext <<_ACEOF
6324/* confdefs.h. */
6325_ACEOF
6326cat confdefs.h >>conftest.$ac_ext
6327cat >>conftest.$ac_ext <<_ACEOF
6328/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006329
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006330#ifdef HAVE_CURSES_H
6331#include <curses.h>
6332#endif
6333
6334
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006335#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006336_ACEOF
6337rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006338if { (ac_try="$ac_compile"
6339case "(($ac_try" in
6340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6341 *) ac_try_echo=$ac_try;;
6342esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006344 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006345 ac_status=$?
6346 grep -v '^ *+' conftest.er1 >conftest.err
6347 rm -f conftest.er1
6348 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006350 (exit $ac_status); } && {
6351 test -z "$ac_c_werror_flag" ||
6352 test ! -s conftest.err
6353 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006354 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006355else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006356 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006357sed 's/^/| /' conftest.$ac_ext >&5
6358
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006359 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006361
6362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006363fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006364ac_res=`eval echo '${'$as_ac_Header'}'`
6365 { echo "$as_me:$LINENO: result: $ac_res" >&5
6366echo "${ECHO_T}$ac_res" >&6; }
6367if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006368 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006369#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006370_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006371
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006372fi
6373
6374done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006375
6376
Martin v. Löwis11017b12006-01-14 18:12:57 +00006377# On Linux, netlink.h requires asm/types.h
6378
6379for ac_header in linux/netlink.h
6380do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006381as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6382{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6383echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006384if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006385 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006386else
6387 cat >conftest.$ac_ext <<_ACEOF
6388/* confdefs.h. */
6389_ACEOF
6390cat confdefs.h >>conftest.$ac_ext
6391cat >>conftest.$ac_ext <<_ACEOF
6392/* end confdefs.h. */
6393
6394#ifdef HAVE_ASM_TYPES_H
6395#include <asm/types.h>
6396#endif
6397#ifdef HAVE_SYS_SOCKET_H
6398#include <sys/socket.h>
6399#endif
6400
6401
6402#include <$ac_header>
6403_ACEOF
6404rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006405if { (ac_try="$ac_compile"
6406case "(($ac_try" in
6407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6408 *) ac_try_echo=$ac_try;;
6409esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006411 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006412 ac_status=$?
6413 grep -v '^ *+' conftest.er1 >conftest.err
6414 rm -f conftest.er1
6415 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006417 (exit $ac_status); } && {
6418 test -z "$ac_c_werror_flag" ||
6419 test ! -s conftest.err
6420 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006421 eval "$as_ac_Header=yes"
6422else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006423 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006424sed 's/^/| /' conftest.$ac_ext >&5
6425
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006426 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006428
6429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006430fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006431ac_res=`eval echo '${'$as_ac_Header'}'`
6432 { echo "$as_me:$LINENO: result: $ac_res" >&5
6433echo "${ECHO_T}$ac_res" >&6; }
6434if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006435 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006436#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006437_ACEOF
6438
6439fi
6440
6441done
6442
6443
Guido van Rossum627b2d71993-12-24 10:39:16 +00006444# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006445was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006446{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6447echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006448cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006449/* confdefs.h. */
6450_ACEOF
6451cat confdefs.h >>conftest.$ac_ext
6452cat >>conftest.$ac_ext <<_ACEOF
6453/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006454#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006455
6456_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006457if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006458 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006459 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006460else
Martin v. Löwis11437992002-04-12 09:54:03 +00006461
6462
6463cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006464#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006465_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006466
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006467
Guido van Rossum627b2d71993-12-24 10:39:16 +00006468fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +00006469rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006470
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006471{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6472echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006473
Neal Norwitz11690112002-07-30 01:08:28 +00006474# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006475{ echo "$as_me:$LINENO: checking for makedev" >&5
6476echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006477cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006478/* confdefs.h. */
6479_ACEOF
6480cat confdefs.h >>conftest.$ac_ext
6481cat >>conftest.$ac_ext <<_ACEOF
6482/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006483#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006484int
6485main ()
6486{
6487 makedev(0, 0)
6488 ;
6489 return 0;
6490}
6491_ACEOF
6492rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006493if { (ac_try="$ac_link"
6494case "(($ac_try" in
6495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6496 *) ac_try_echo=$ac_try;;
6497esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006499 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006500 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006501 grep -v '^ *+' conftest.er1 >conftest.err
6502 rm -f conftest.er1
6503 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006505 (exit $ac_status); } && {
6506 test -z "$ac_c_werror_flag" ||
6507 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006508 } && test -s conftest$ac_exeext &&
6509 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006510 ac_cv_has_makedev=yes
6511else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006513sed 's/^/| /' conftest.$ac_ext >&5
6514
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006515 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006517
6518rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006519 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006520if test "$ac_cv_has_makedev" = "no"; then
6521 # we didn't link, try if _OSF_SOURCE will allow us to link
6522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006523/* confdefs.h. */
6524_ACEOF
6525cat confdefs.h >>conftest.$ac_ext
6526cat >>conftest.$ac_ext <<_ACEOF
6527/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006528
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006529#define _OSF_SOURCE 1
6530#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006531
Neal Norwitz11690112002-07-30 01:08:28 +00006532int
6533main ()
6534{
6535 makedev(0, 0)
6536 ;
6537 return 0;
6538}
6539_ACEOF
6540rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006541if { (ac_try="$ac_link"
6542case "(($ac_try" in
6543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6544 *) ac_try_echo=$ac_try;;
6545esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006547 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006549 grep -v '^ *+' conftest.er1 >conftest.err
6550 rm -f conftest.er1
6551 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006553 (exit $ac_status); } && {
6554 test -z "$ac_c_werror_flag" ||
6555 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006556 } && test -s conftest$ac_exeext &&
6557 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006558 ac_cv_has_makedev=yes
6559else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006561sed 's/^/| /' conftest.$ac_ext >&5
6562
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006563 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006565
6566rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006567 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006568 if test "$ac_cv_has_makedev" = "yes"; then
6569
6570cat >>confdefs.h <<\_ACEOF
6571#define _OSF_SOURCE 1
6572_ACEOF
6573
6574 fi
6575fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006576{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6577echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006578if test "$ac_cv_has_makedev" = "yes"; then
6579
6580cat >>confdefs.h <<\_ACEOF
6581#define HAVE_MAKEDEV 1
6582_ACEOF
6583
6584fi
6585
Martin v. Löwis399a6892002-10-04 10:22:02 +00006586# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6587# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6588# defined, but the compiler does not support pragma redefine_extname,
6589# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6590# structures (such as rlimit64) without declaring them. As a
6591# work-around, disable LFS on such configurations
6592
6593use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006594{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6595echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006596cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006597/* confdefs.h. */
6598_ACEOF
6599cat confdefs.h >>conftest.$ac_ext
6600cat >>conftest.$ac_ext <<_ACEOF
6601/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006602
6603#define _LARGEFILE_SOURCE 1
6604#define _FILE_OFFSET_BITS 64
6605#include <sys/resource.h>
6606
Martin v. Löwis399a6892002-10-04 10:22:02 +00006607int
6608main ()
6609{
6610struct rlimit foo;
6611 ;
6612 return 0;
6613}
6614_ACEOF
6615rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006616if { (ac_try="$ac_compile"
6617case "(($ac_try" in
6618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6619 *) ac_try_echo=$ac_try;;
6620esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006622 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006624 grep -v '^ *+' conftest.er1 >conftest.err
6625 rm -f conftest.er1
6626 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006628 (exit $ac_status); } && {
6629 test -z "$ac_c_werror_flag" ||
6630 test ! -s conftest.err
6631 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006632 sol_lfs_bug=no
6633else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006635sed 's/^/| /' conftest.$ac_ext >&5
6636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006637 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006639
6640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006641{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6642echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006643if test "$sol_lfs_bug" = "yes"; then
6644 use_lfs=no
6645fi
6646
6647if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006648# Two defines needed to enable largefile support on various platforms
6649# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006650
Martin v. Löwis11437992002-04-12 09:54:03 +00006651cat >>confdefs.h <<\_ACEOF
6652#define _LARGEFILE_SOURCE 1
6653_ACEOF
6654
6655
6656cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006657#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006658_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006659
Martin v. Löwis399a6892002-10-04 10:22:02 +00006660fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006661
Guido van Rossum84e7b241996-08-19 21:59:00 +00006662# Add some code to confdefs.h so that the test for off_t works on SCO
6663cat >> confdefs.h <<\EOF
6664#if defined(SCO_DS)
6665#undef _OFF_T
6666#endif
6667EOF
6668
Guido van Rossumef2255b2000-03-10 22:30:29 +00006669# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006670{ echo "$as_me:$LINENO: checking for mode_t" >&5
6671echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006672if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006673 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006674else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006675 cat >conftest.$ac_ext <<_ACEOF
6676/* confdefs.h. */
6677_ACEOF
6678cat confdefs.h >>conftest.$ac_ext
6679cat >>conftest.$ac_ext <<_ACEOF
6680/* end confdefs.h. */
6681$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006682typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006683int
6684main ()
6685{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006686if ((ac__type_new_ *) 0)
6687 return 0;
6688if (sizeof (ac__type_new_))
6689 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006690 ;
6691 return 0;
6692}
6693_ACEOF
6694rm -f conftest.$ac_objext
6695if { (ac_try="$ac_compile"
6696case "(($ac_try" in
6697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6698 *) ac_try_echo=$ac_try;;
6699esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006701 (eval "$ac_compile") 2>conftest.er1
6702 ac_status=$?
6703 grep -v '^ *+' conftest.er1 >conftest.err
6704 rm -f conftest.er1
6705 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006707 (exit $ac_status); } && {
6708 test -z "$ac_c_werror_flag" ||
6709 test ! -s conftest.err
6710 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006711 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006712else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006714sed 's/^/| /' conftest.$ac_ext >&5
6715
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006716 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006718
6719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006720fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006721{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6722echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6723if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006724 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006725else
Martin v. Löwis11437992002-04-12 09:54:03 +00006726
6727cat >>confdefs.h <<_ACEOF
6728#define mode_t int
6729_ACEOF
6730
6731fi
6732
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006733{ echo "$as_me:$LINENO: checking for off_t" >&5
6734echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006735if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006736 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006737else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006738 cat >conftest.$ac_ext <<_ACEOF
6739/* confdefs.h. */
6740_ACEOF
6741cat confdefs.h >>conftest.$ac_ext
6742cat >>conftest.$ac_ext <<_ACEOF
6743/* end confdefs.h. */
6744$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006745typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006746int
6747main ()
6748{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006749if ((ac__type_new_ *) 0)
6750 return 0;
6751if (sizeof (ac__type_new_))
6752 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006753 ;
6754 return 0;
6755}
6756_ACEOF
6757rm -f conftest.$ac_objext
6758if { (ac_try="$ac_compile"
6759case "(($ac_try" in
6760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6761 *) ac_try_echo=$ac_try;;
6762esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006764 (eval "$ac_compile") 2>conftest.er1
6765 ac_status=$?
6766 grep -v '^ *+' conftest.er1 >conftest.err
6767 rm -f conftest.er1
6768 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006770 (exit $ac_status); } && {
6771 test -z "$ac_c_werror_flag" ||
6772 test ! -s conftest.err
6773 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006774 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006775else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006777sed 's/^/| /' conftest.$ac_ext >&5
6778
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006779 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006781
6782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006783fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006784{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6785echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6786if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006787 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006788else
Martin v. Löwis11437992002-04-12 09:54:03 +00006789
6790cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006791#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006792_ACEOF
6793
6794fi
6795
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006796{ echo "$as_me:$LINENO: checking for pid_t" >&5
6797echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006798if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006799 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006800else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006801 cat >conftest.$ac_ext <<_ACEOF
6802/* confdefs.h. */
6803_ACEOF
6804cat confdefs.h >>conftest.$ac_ext
6805cat >>conftest.$ac_ext <<_ACEOF
6806/* end confdefs.h. */
6807$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006808typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006809int
6810main ()
6811{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006812if ((ac__type_new_ *) 0)
6813 return 0;
6814if (sizeof (ac__type_new_))
6815 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006816 ;
6817 return 0;
6818}
6819_ACEOF
6820rm -f conftest.$ac_objext
6821if { (ac_try="$ac_compile"
6822case "(($ac_try" in
6823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6824 *) ac_try_echo=$ac_try;;
6825esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006827 (eval "$ac_compile") 2>conftest.er1
6828 ac_status=$?
6829 grep -v '^ *+' conftest.er1 >conftest.err
6830 rm -f conftest.er1
6831 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006833 (exit $ac_status); } && {
6834 test -z "$ac_c_werror_flag" ||
6835 test ! -s conftest.err
6836 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006837 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006838else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006840sed 's/^/| /' conftest.$ac_ext >&5
6841
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006842 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006844
6845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006846fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006847{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6848echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6849if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006850 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006851else
Martin v. Löwis11437992002-04-12 09:54:03 +00006852
6853cat >>confdefs.h <<_ACEOF
6854#define pid_t int
6855_ACEOF
6856
6857fi
6858
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006859{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6860echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006861if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006862 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006863else
6864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006865/* confdefs.h. */
6866_ACEOF
6867cat confdefs.h >>conftest.$ac_ext
6868cat >>conftest.$ac_ext <<_ACEOF
6869/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006870#include <sys/types.h>
6871#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006872
Martin v. Löwis11437992002-04-12 09:54:03 +00006873int
6874main ()
6875{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006876return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006877 ;
6878 return 0;
6879}
6880_ACEOF
6881rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006882if { (ac_try="$ac_compile"
6883case "(($ac_try" in
6884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6885 *) ac_try_echo=$ac_try;;
6886esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006888 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006890 grep -v '^ *+' conftest.er1 >conftest.err
6891 rm -f conftest.er1
6892 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006894 (exit $ac_status); } && {
6895 test -z "$ac_c_werror_flag" ||
6896 test ! -s conftest.err
6897 } && test -s conftest.$ac_objext; then
6898 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006899else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006901sed 's/^/| /' conftest.$ac_ext >&5
6902
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006903 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006905
6906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006907fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006908{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6909echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006910
Martin v. Löwis11437992002-04-12 09:54:03 +00006911cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006912#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006913_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006914
Michael W. Hudson54241132001-12-07 15:38:26 +00006915
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006916{ echo "$as_me:$LINENO: checking for size_t" >&5
6917echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006918if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006919 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006920else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006921 cat >conftest.$ac_ext <<_ACEOF
6922/* confdefs.h. */
6923_ACEOF
6924cat confdefs.h >>conftest.$ac_ext
6925cat >>conftest.$ac_ext <<_ACEOF
6926/* end confdefs.h. */
6927$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006928typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006929int
6930main ()
6931{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006932if ((ac__type_new_ *) 0)
6933 return 0;
6934if (sizeof (ac__type_new_))
6935 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006936 ;
6937 return 0;
6938}
6939_ACEOF
6940rm -f conftest.$ac_objext
6941if { (ac_try="$ac_compile"
6942case "(($ac_try" in
6943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6944 *) ac_try_echo=$ac_try;;
6945esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006947 (eval "$ac_compile") 2>conftest.er1
6948 ac_status=$?
6949 grep -v '^ *+' conftest.er1 >conftest.err
6950 rm -f conftest.er1
6951 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006953 (exit $ac_status); } && {
6954 test -z "$ac_c_werror_flag" ||
6955 test ! -s conftest.err
6956 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006957 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006958else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006960sed 's/^/| /' conftest.$ac_ext >&5
6961
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006962 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006964
6965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006966fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006967{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6968echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6969if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006970 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006971else
Martin v. Löwis11437992002-04-12 09:54:03 +00006972
6973cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006974#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006975_ACEOF
6976
6977fi
6978
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006979{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6980echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006981if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006982 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006983else
6984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006985/* confdefs.h. */
6986_ACEOF
6987cat confdefs.h >>conftest.$ac_ext
6988cat >>conftest.$ac_ext <<_ACEOF
6989/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006990#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006991
6992_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006994 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006995 ac_cv_type_uid_t=yes
6996else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006997 ac_cv_type_uid_t=no
6998fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +00006999rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007000
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007001fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007002{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7003echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007004if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007005
Martin v. Löwis11437992002-04-12 09:54:03 +00007006cat >>confdefs.h <<\_ACEOF
7007#define uid_t int
7008_ACEOF
7009
7010
7011cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007012#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007013_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007014
7015fi
7016
Mark Dickinsonbd792642009-03-18 20:06:12 +00007017
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007018 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7019echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007020if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007021 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007022else
7023 ac_cv_c_uint32_t=no
7024 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7025 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7026 cat >conftest.$ac_ext <<_ACEOF
7027/* confdefs.h. */
7028_ACEOF
7029cat confdefs.h >>conftest.$ac_ext
7030cat >>conftest.$ac_ext <<_ACEOF
7031/* end confdefs.h. */
7032$ac_includes_default
7033int
7034main ()
7035{
7036static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7037test_array [0] = 0
7038
7039 ;
7040 return 0;
7041}
7042_ACEOF
7043rm -f conftest.$ac_objext
7044if { (ac_try="$ac_compile"
7045case "(($ac_try" in
7046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7047 *) ac_try_echo=$ac_try;;
7048esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007050 (eval "$ac_compile") 2>conftest.er1
7051 ac_status=$?
7052 grep -v '^ *+' conftest.er1 >conftest.err
7053 rm -f conftest.er1
7054 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007056 (exit $ac_status); } && {
7057 test -z "$ac_c_werror_flag" ||
7058 test ! -s conftest.err
7059 } && test -s conftest.$ac_objext; then
7060 case $ac_type in
7061 uint32_t) ac_cv_c_uint32_t=yes ;;
7062 *) ac_cv_c_uint32_t=$ac_type ;;
7063esac
7064
7065else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007066 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007067sed 's/^/| /' conftest.$ac_ext >&5
7068
7069
7070fi
7071
7072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7073 test "$ac_cv_c_uint32_t" != no && break
7074 done
7075fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007076{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7077echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007078 case $ac_cv_c_uint32_t in #(
7079 no|yes) ;; #(
7080 *)
7081
7082cat >>confdefs.h <<\_ACEOF
7083#define _UINT32_T 1
7084_ACEOF
7085
7086
7087cat >>confdefs.h <<_ACEOF
7088#define uint32_t $ac_cv_c_uint32_t
7089_ACEOF
7090;;
7091 esac
7092
7093
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007094 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7095echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007096if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007097 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007098else
7099 ac_cv_c_uint64_t=no
7100 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7101 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7102 cat >conftest.$ac_ext <<_ACEOF
7103/* confdefs.h. */
7104_ACEOF
7105cat confdefs.h >>conftest.$ac_ext
7106cat >>conftest.$ac_ext <<_ACEOF
7107/* end confdefs.h. */
7108$ac_includes_default
7109int
7110main ()
7111{
7112static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7113test_array [0] = 0
7114
7115 ;
7116 return 0;
7117}
7118_ACEOF
7119rm -f conftest.$ac_objext
7120if { (ac_try="$ac_compile"
7121case "(($ac_try" in
7122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7123 *) ac_try_echo=$ac_try;;
7124esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007126 (eval "$ac_compile") 2>conftest.er1
7127 ac_status=$?
7128 grep -v '^ *+' conftest.er1 >conftest.err
7129 rm -f conftest.er1
7130 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007132 (exit $ac_status); } && {
7133 test -z "$ac_c_werror_flag" ||
7134 test ! -s conftest.err
7135 } && test -s conftest.$ac_objext; then
7136 case $ac_type in
7137 uint64_t) ac_cv_c_uint64_t=yes ;;
7138 *) ac_cv_c_uint64_t=$ac_type ;;
7139esac
7140
7141else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007142 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007143sed 's/^/| /' conftest.$ac_ext >&5
7144
7145
7146fi
7147
7148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7149 test "$ac_cv_c_uint64_t" != no && break
7150 done
7151fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007152{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7153echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007154 case $ac_cv_c_uint64_t in #(
7155 no|yes) ;; #(
7156 *)
7157
7158cat >>confdefs.h <<\_ACEOF
7159#define _UINT64_T 1
7160_ACEOF
7161
7162
7163cat >>confdefs.h <<_ACEOF
7164#define uint64_t $ac_cv_c_uint64_t
7165_ACEOF
7166;;
7167 esac
7168
7169
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007170 { echo "$as_me:$LINENO: checking for int32_t" >&5
7171echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007172if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007173 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007174else
7175 ac_cv_c_int32_t=no
7176 for ac_type in 'int32_t' 'int' 'long int' \
7177 'long long int' 'short int' 'signed char'; do
7178 cat >conftest.$ac_ext <<_ACEOF
7179/* confdefs.h. */
7180_ACEOF
7181cat confdefs.h >>conftest.$ac_ext
7182cat >>conftest.$ac_ext <<_ACEOF
7183/* end confdefs.h. */
7184$ac_includes_default
7185int
7186main ()
7187{
7188static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7189test_array [0] = 0
7190
7191 ;
7192 return 0;
7193}
7194_ACEOF
7195rm -f conftest.$ac_objext
7196if { (ac_try="$ac_compile"
7197case "(($ac_try" in
7198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7199 *) ac_try_echo=$ac_try;;
7200esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007202 (eval "$ac_compile") 2>conftest.er1
7203 ac_status=$?
7204 grep -v '^ *+' conftest.er1 >conftest.err
7205 rm -f conftest.er1
7206 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007208 (exit $ac_status); } && {
7209 test -z "$ac_c_werror_flag" ||
7210 test ! -s conftest.err
7211 } && test -s conftest.$ac_objext; then
7212 cat >conftest.$ac_ext <<_ACEOF
7213/* confdefs.h. */
7214_ACEOF
7215cat confdefs.h >>conftest.$ac_ext
7216cat >>conftest.$ac_ext <<_ACEOF
7217/* end confdefs.h. */
7218$ac_includes_default
7219int
7220main ()
7221{
7222static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007223 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007224test_array [0] = 0
7225
7226 ;
7227 return 0;
7228}
7229_ACEOF
7230rm -f conftest.$ac_objext
7231if { (ac_try="$ac_compile"
7232case "(($ac_try" in
7233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7234 *) ac_try_echo=$ac_try;;
7235esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007237 (eval "$ac_compile") 2>conftest.er1
7238 ac_status=$?
7239 grep -v '^ *+' conftest.er1 >conftest.err
7240 rm -f conftest.er1
7241 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007243 (exit $ac_status); } && {
7244 test -z "$ac_c_werror_flag" ||
7245 test ! -s conftest.err
7246 } && test -s conftest.$ac_objext; then
7247 :
7248else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007249 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007250sed 's/^/| /' conftest.$ac_ext >&5
7251
7252 case $ac_type in
7253 int32_t) ac_cv_c_int32_t=yes ;;
7254 *) ac_cv_c_int32_t=$ac_type ;;
7255esac
7256
7257fi
7258
7259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7260else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007261 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007262sed 's/^/| /' conftest.$ac_ext >&5
7263
7264
7265fi
7266
7267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7268 test "$ac_cv_c_int32_t" != no && break
7269 done
7270fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007271{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7272echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007273 case $ac_cv_c_int32_t in #(
7274 no|yes) ;; #(
7275 *)
7276
7277cat >>confdefs.h <<_ACEOF
7278#define int32_t $ac_cv_c_int32_t
7279_ACEOF
7280;;
7281 esac
7282
7283
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007284 { echo "$as_me:$LINENO: checking for int64_t" >&5
7285echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007286if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007287 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007288else
7289 ac_cv_c_int64_t=no
7290 for ac_type in 'int64_t' 'int' 'long int' \
7291 'long long int' 'short int' 'signed char'; do
7292 cat >conftest.$ac_ext <<_ACEOF
7293/* confdefs.h. */
7294_ACEOF
7295cat confdefs.h >>conftest.$ac_ext
7296cat >>conftest.$ac_ext <<_ACEOF
7297/* end confdefs.h. */
7298$ac_includes_default
7299int
7300main ()
7301{
7302static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7303test_array [0] = 0
7304
7305 ;
7306 return 0;
7307}
7308_ACEOF
7309rm -f conftest.$ac_objext
7310if { (ac_try="$ac_compile"
7311case "(($ac_try" in
7312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7313 *) ac_try_echo=$ac_try;;
7314esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007316 (eval "$ac_compile") 2>conftest.er1
7317 ac_status=$?
7318 grep -v '^ *+' conftest.er1 >conftest.err
7319 rm -f conftest.er1
7320 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007322 (exit $ac_status); } && {
7323 test -z "$ac_c_werror_flag" ||
7324 test ! -s conftest.err
7325 } && test -s conftest.$ac_objext; then
7326 cat >conftest.$ac_ext <<_ACEOF
7327/* confdefs.h. */
7328_ACEOF
7329cat confdefs.h >>conftest.$ac_ext
7330cat >>conftest.$ac_ext <<_ACEOF
7331/* end confdefs.h. */
7332$ac_includes_default
7333int
7334main ()
7335{
7336static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007337 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007338test_array [0] = 0
7339
7340 ;
7341 return 0;
7342}
7343_ACEOF
7344rm -f conftest.$ac_objext
7345if { (ac_try="$ac_compile"
7346case "(($ac_try" in
7347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7348 *) ac_try_echo=$ac_try;;
7349esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007351 (eval "$ac_compile") 2>conftest.er1
7352 ac_status=$?
7353 grep -v '^ *+' conftest.er1 >conftest.err
7354 rm -f conftest.er1
7355 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007357 (exit $ac_status); } && {
7358 test -z "$ac_c_werror_flag" ||
7359 test ! -s conftest.err
7360 } && test -s conftest.$ac_objext; then
7361 :
7362else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007363 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007364sed 's/^/| /' conftest.$ac_ext >&5
7365
7366 case $ac_type in
7367 int64_t) ac_cv_c_int64_t=yes ;;
7368 *) ac_cv_c_int64_t=$ac_type ;;
7369esac
7370
7371fi
7372
7373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7374else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007375 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007376sed 's/^/| /' conftest.$ac_ext >&5
7377
7378
7379fi
7380
7381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7382 test "$ac_cv_c_int64_t" != no && break
7383 done
7384fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007385{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7386echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007387 case $ac_cv_c_int64_t in #(
7388 no|yes) ;; #(
7389 *)
7390
7391cat >>confdefs.h <<_ACEOF
7392#define int64_t $ac_cv_c_int64_t
7393_ACEOF
7394;;
7395 esac
7396
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007397{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7398echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007399if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007400 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007401else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007402 cat >conftest.$ac_ext <<_ACEOF
7403/* confdefs.h. */
7404_ACEOF
7405cat confdefs.h >>conftest.$ac_ext
7406cat >>conftest.$ac_ext <<_ACEOF
7407/* end confdefs.h. */
7408$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007409typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007410int
7411main ()
7412{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007413if ((ac__type_new_ *) 0)
7414 return 0;
7415if (sizeof (ac__type_new_))
7416 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007417 ;
7418 return 0;
7419}
7420_ACEOF
7421rm -f conftest.$ac_objext
7422if { (ac_try="$ac_compile"
7423case "(($ac_try" in
7424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7425 *) ac_try_echo=$ac_try;;
7426esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007428 (eval "$ac_compile") 2>conftest.er1
7429 ac_status=$?
7430 grep -v '^ *+' conftest.er1 >conftest.err
7431 rm -f conftest.er1
7432 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007434 (exit $ac_status); } && {
7435 test -z "$ac_c_werror_flag" ||
7436 test ! -s conftest.err
7437 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007438 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007439else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007440 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007441sed 's/^/| /' conftest.$ac_ext >&5
7442
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007443 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007445
7446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007447fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007448{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7449echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7450if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007451
7452cat >>confdefs.h <<\_ACEOF
7453#define HAVE_SSIZE_T 1
7454_ACEOF
7455
7456fi
7457
Jack Jansendd19cf82001-12-06 22:36:17 +00007458
Michael W. Hudson54241132001-12-07 15:38:26 +00007459# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007460# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007461{ echo "$as_me:$LINENO: checking for int" >&5
7462echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7463if test "${ac_cv_type_int+set}" = set; then
7464 echo $ECHO_N "(cached) $ECHO_C" >&6
7465else
7466 cat >conftest.$ac_ext <<_ACEOF
7467/* confdefs.h. */
7468_ACEOF
7469cat confdefs.h >>conftest.$ac_ext
7470cat >>conftest.$ac_ext <<_ACEOF
7471/* end confdefs.h. */
7472$ac_includes_default
7473typedef int ac__type_new_;
7474int
7475main ()
7476{
7477if ((ac__type_new_ *) 0)
7478 return 0;
7479if (sizeof (ac__type_new_))
7480 return 0;
7481 ;
7482 return 0;
7483}
7484_ACEOF
7485rm -f conftest.$ac_objext
7486if { (ac_try="$ac_compile"
7487case "(($ac_try" in
7488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7489 *) ac_try_echo=$ac_try;;
7490esac
7491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7492 (eval "$ac_compile") 2>conftest.er1
7493 ac_status=$?
7494 grep -v '^ *+' conftest.er1 >conftest.err
7495 rm -f conftest.er1
7496 cat conftest.err >&5
7497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7498 (exit $ac_status); } && {
7499 test -z "$ac_c_werror_flag" ||
7500 test ! -s conftest.err
7501 } && test -s conftest.$ac_objext; then
7502 ac_cv_type_int=yes
7503else
7504 echo "$as_me: failed program was:" >&5
7505sed 's/^/| /' conftest.$ac_ext >&5
7506
7507 ac_cv_type_int=no
7508fi
7509
7510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7511fi
7512{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7513echo "${ECHO_T}$ac_cv_type_int" >&6; }
7514
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007515# The cast to long int works around a bug in the HP C Compiler
7516# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7517# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7518# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007519{ echo "$as_me:$LINENO: checking size of int" >&5
7520echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007521if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007522 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007523else
Martin v. Löwis11437992002-04-12 09:54:03 +00007524 if test "$cross_compiling" = yes; then
7525 # Depending upon the size, compute the lo and hi bounds.
7526cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007527/* confdefs.h. */
7528_ACEOF
7529cat confdefs.h >>conftest.$ac_ext
7530cat >>conftest.$ac_ext <<_ACEOF
7531/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007532$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007533 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007534int
7535main ()
7536{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007537static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007538test_array [0] = 0
7539
7540 ;
7541 return 0;
7542}
7543_ACEOF
7544rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007545if { (ac_try="$ac_compile"
7546case "(($ac_try" in
7547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7548 *) ac_try_echo=$ac_try;;
7549esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007551 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007553 grep -v '^ *+' conftest.er1 >conftest.err
7554 rm -f conftest.er1
7555 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007557 (exit $ac_status); } && {
7558 test -z "$ac_c_werror_flag" ||
7559 test ! -s conftest.err
7560 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007561 ac_lo=0 ac_mid=0
7562 while :; do
7563 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007564/* confdefs.h. */
7565_ACEOF
7566cat confdefs.h >>conftest.$ac_ext
7567cat >>conftest.$ac_ext <<_ACEOF
7568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007569$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007570 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007571int
7572main ()
7573{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007574static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007575test_array [0] = 0
7576
7577 ;
7578 return 0;
7579}
7580_ACEOF
7581rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007582if { (ac_try="$ac_compile"
7583case "(($ac_try" in
7584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7585 *) ac_try_echo=$ac_try;;
7586esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007588 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007589 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007590 grep -v '^ *+' conftest.er1 >conftest.err
7591 rm -f conftest.er1
7592 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007594 (exit $ac_status); } && {
7595 test -z "$ac_c_werror_flag" ||
7596 test ! -s conftest.err
7597 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007598 ac_hi=$ac_mid; break
7599else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007600 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007601sed 's/^/| /' conftest.$ac_ext >&5
7602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007603 ac_lo=`expr $ac_mid + 1`
7604 if test $ac_lo -le $ac_mid; then
7605 ac_lo= ac_hi=
7606 break
7607 fi
7608 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007610
7611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007612 done
7613else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007615sed 's/^/| /' conftest.$ac_ext >&5
7616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007617 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007618/* confdefs.h. */
7619_ACEOF
7620cat confdefs.h >>conftest.$ac_ext
7621cat >>conftest.$ac_ext <<_ACEOF
7622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007623$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007624 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007625int
7626main ()
7627{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007628static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007629test_array [0] = 0
7630
7631 ;
7632 return 0;
7633}
7634_ACEOF
7635rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007636if { (ac_try="$ac_compile"
7637case "(($ac_try" in
7638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7639 *) ac_try_echo=$ac_try;;
7640esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007642 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007643 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007644 grep -v '^ *+' conftest.er1 >conftest.err
7645 rm -f conftest.er1
7646 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007648 (exit $ac_status); } && {
7649 test -z "$ac_c_werror_flag" ||
7650 test ! -s conftest.err
7651 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007652 ac_hi=-1 ac_mid=-1
7653 while :; do
7654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007655/* confdefs.h. */
7656_ACEOF
7657cat confdefs.h >>conftest.$ac_ext
7658cat >>conftest.$ac_ext <<_ACEOF
7659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007660$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007661 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007662int
7663main ()
7664{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007665static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007666test_array [0] = 0
7667
7668 ;
7669 return 0;
7670}
7671_ACEOF
7672rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007673if { (ac_try="$ac_compile"
7674case "(($ac_try" in
7675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7676 *) ac_try_echo=$ac_try;;
7677esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007679 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007680 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007681 grep -v '^ *+' conftest.er1 >conftest.err
7682 rm -f conftest.er1
7683 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007685 (exit $ac_status); } && {
7686 test -z "$ac_c_werror_flag" ||
7687 test ! -s conftest.err
7688 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007689 ac_lo=$ac_mid; break
7690else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007692sed 's/^/| /' conftest.$ac_ext >&5
7693
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007694 ac_hi=`expr '(' $ac_mid ')' - 1`
7695 if test $ac_mid -le $ac_hi; then
7696 ac_lo= ac_hi=
7697 break
7698 fi
7699 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007701
7702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007703 done
7704else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007706sed 's/^/| /' conftest.$ac_ext >&5
7707
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007708 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007710
7711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +00007715# Binary search between lo and hi bounds.
7716while test "x$ac_lo" != "x$ac_hi"; do
7717 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7718 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007719/* confdefs.h. */
7720_ACEOF
7721cat confdefs.h >>conftest.$ac_ext
7722cat >>conftest.$ac_ext <<_ACEOF
7723/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007724$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007725 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007726int
7727main ()
7728{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007729static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007730test_array [0] = 0
7731
7732 ;
7733 return 0;
7734}
7735_ACEOF
7736rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007737if { (ac_try="$ac_compile"
7738case "(($ac_try" in
7739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7740 *) ac_try_echo=$ac_try;;
7741esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007743 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007745 grep -v '^ *+' conftest.er1 >conftest.err
7746 rm -f conftest.er1
7747 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007749 (exit $ac_status); } && {
7750 test -z "$ac_c_werror_flag" ||
7751 test ! -s conftest.err
7752 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007753 ac_hi=$ac_mid
7754else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007756sed 's/^/| /' conftest.$ac_ext >&5
7757
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007758 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007760
7761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007762done
7763case $ac_lo in
7764?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007765'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007766 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007767See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007768echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007769See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007770 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007771 else
7772 ac_cv_sizeof_int=0
7773 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007774esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007775else
Martin v. Löwis11437992002-04-12 09:54:03 +00007776 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007777/* confdefs.h. */
7778_ACEOF
7779cat confdefs.h >>conftest.$ac_ext
7780cat >>conftest.$ac_ext <<_ACEOF
7781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007782$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007783 typedef int ac__type_sizeof_;
7784static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7785static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007786#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007787#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007788int
7789main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007790{
Martin v. Löwis11437992002-04-12 09:54:03 +00007791
7792 FILE *f = fopen ("conftest.val", "w");
7793 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007794 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007795 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007796 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007798 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007799 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007800 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007801 }
7802 else
7803 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007804 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007805 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007807 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007808 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007809 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007810
7811 ;
7812 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007813}
Martin v. Löwis11437992002-04-12 09:54:03 +00007814_ACEOF
7815rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007816if { (ac_try="$ac_link"
7817case "(($ac_try" in
7818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7819 *) ac_try_echo=$ac_try;;
7820esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007822 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007823 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007825 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007826 { (case "(($ac_try" in
7827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7828 *) ac_try_echo=$ac_try;;
7829esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007832 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007834 (exit $ac_status); }; }; then
7835 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007836else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007837 echo "$as_me: program exited with status $ac_status" >&5
7838echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007839sed 's/^/| /' conftest.$ac_ext >&5
7840
Martin v. Löwis11437992002-04-12 09:54:03 +00007841( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007842if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007843 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007844See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007845echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007846See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007847 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007848 else
7849 ac_cv_sizeof_int=0
7850 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007852rm -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 +00007853fi
7854rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007855fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007856{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7857echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007858
7859
7860
Martin v. Löwis11437992002-04-12 09:54:03 +00007861cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007862#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007863_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007864
7865
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007866{ echo "$as_me:$LINENO: checking for long" >&5
7867echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7868if test "${ac_cv_type_long+set}" = set; then
7869 echo $ECHO_N "(cached) $ECHO_C" >&6
7870else
7871 cat >conftest.$ac_ext <<_ACEOF
7872/* confdefs.h. */
7873_ACEOF
7874cat confdefs.h >>conftest.$ac_ext
7875cat >>conftest.$ac_ext <<_ACEOF
7876/* end confdefs.h. */
7877$ac_includes_default
7878typedef long ac__type_new_;
7879int
7880main ()
7881{
7882if ((ac__type_new_ *) 0)
7883 return 0;
7884if (sizeof (ac__type_new_))
7885 return 0;
7886 ;
7887 return 0;
7888}
7889_ACEOF
7890rm -f conftest.$ac_objext
7891if { (ac_try="$ac_compile"
7892case "(($ac_try" in
7893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7894 *) ac_try_echo=$ac_try;;
7895esac
7896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7897 (eval "$ac_compile") 2>conftest.er1
7898 ac_status=$?
7899 grep -v '^ *+' conftest.er1 >conftest.err
7900 rm -f conftest.er1
7901 cat conftest.err >&5
7902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7903 (exit $ac_status); } && {
7904 test -z "$ac_c_werror_flag" ||
7905 test ! -s conftest.err
7906 } && test -s conftest.$ac_objext; then
7907 ac_cv_type_long=yes
7908else
7909 echo "$as_me: failed program was:" >&5
7910sed 's/^/| /' conftest.$ac_ext >&5
7911
7912 ac_cv_type_long=no
7913fi
7914
7915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7916fi
7917{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7918echo "${ECHO_T}$ac_cv_type_long" >&6; }
7919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007920# The cast to long int works around a bug in the HP C Compiler
7921# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7922# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7923# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007924{ echo "$as_me:$LINENO: checking size of long" >&5
7925echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007926if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007927 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007928else
Martin v. Löwis11437992002-04-12 09:54:03 +00007929 if test "$cross_compiling" = yes; then
7930 # Depending upon the size, compute the lo and hi bounds.
7931cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007932/* confdefs.h. */
7933_ACEOF
7934cat confdefs.h >>conftest.$ac_ext
7935cat >>conftest.$ac_ext <<_ACEOF
7936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007937$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007938 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007939int
7940main ()
7941{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007942static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007943test_array [0] = 0
7944
7945 ;
7946 return 0;
7947}
7948_ACEOF
7949rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007950if { (ac_try="$ac_compile"
7951case "(($ac_try" in
7952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7953 *) ac_try_echo=$ac_try;;
7954esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007956 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007957 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007958 grep -v '^ *+' conftest.er1 >conftest.err
7959 rm -f conftest.er1
7960 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007962 (exit $ac_status); } && {
7963 test -z "$ac_c_werror_flag" ||
7964 test ! -s conftest.err
7965 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007966 ac_lo=0 ac_mid=0
7967 while :; do
7968 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007969/* confdefs.h. */
7970_ACEOF
7971cat confdefs.h >>conftest.$ac_ext
7972cat >>conftest.$ac_ext <<_ACEOF
7973/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007974$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007975 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007976int
7977main ()
7978{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007979static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007980test_array [0] = 0
7981
7982 ;
7983 return 0;
7984}
7985_ACEOF
7986rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007987if { (ac_try="$ac_compile"
7988case "(($ac_try" in
7989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7990 *) ac_try_echo=$ac_try;;
7991esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007995 grep -v '^ *+' conftest.er1 >conftest.err
7996 rm -f conftest.er1
7997 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007999 (exit $ac_status); } && {
8000 test -z "$ac_c_werror_flag" ||
8001 test ! -s conftest.err
8002 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008003 ac_hi=$ac_mid; break
8004else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008006sed 's/^/| /' conftest.$ac_ext >&5
8007
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008008 ac_lo=`expr $ac_mid + 1`
8009 if test $ac_lo -le $ac_mid; then
8010 ac_lo= ac_hi=
8011 break
8012 fi
8013 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015
8016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008017 done
8018else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008019 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008020sed 's/^/| /' conftest.$ac_ext >&5
8021
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008023/* confdefs.h. */
8024_ACEOF
8025cat confdefs.h >>conftest.$ac_ext
8026cat >>conftest.$ac_ext <<_ACEOF
8027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008028$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008029 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008030int
8031main ()
8032{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008033static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008034test_array [0] = 0
8035
8036 ;
8037 return 0;
8038}
8039_ACEOF
8040rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008041if { (ac_try="$ac_compile"
8042case "(($ac_try" in
8043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8044 *) ac_try_echo=$ac_try;;
8045esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008047 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008049 grep -v '^ *+' conftest.er1 >conftest.err
8050 rm -f conftest.er1
8051 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008053 (exit $ac_status); } && {
8054 test -z "$ac_c_werror_flag" ||
8055 test ! -s conftest.err
8056 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008057 ac_hi=-1 ac_mid=-1
8058 while :; do
8059 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008060/* confdefs.h. */
8061_ACEOF
8062cat confdefs.h >>conftest.$ac_ext
8063cat >>conftest.$ac_ext <<_ACEOF
8064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008065$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008066 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008067int
8068main ()
8069{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008070static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008071test_array [0] = 0
8072
8073 ;
8074 return 0;
8075}
8076_ACEOF
8077rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008078if { (ac_try="$ac_compile"
8079case "(($ac_try" in
8080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8081 *) ac_try_echo=$ac_try;;
8082esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008084 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008085 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008086 grep -v '^ *+' conftest.er1 >conftest.err
8087 rm -f conftest.er1
8088 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008090 (exit $ac_status); } && {
8091 test -z "$ac_c_werror_flag" ||
8092 test ! -s conftest.err
8093 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008094 ac_lo=$ac_mid; break
8095else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008097sed 's/^/| /' conftest.$ac_ext >&5
8098
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008099 ac_hi=`expr '(' $ac_mid ')' - 1`
8100 if test $ac_mid -le $ac_hi; then
8101 ac_lo= ac_hi=
8102 break
8103 fi
8104 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008106
8107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008108 done
8109else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008111sed 's/^/| /' conftest.$ac_ext >&5
8112
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008113 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008115
8116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +00008120# Binary search between lo and hi bounds.
8121while test "x$ac_lo" != "x$ac_hi"; do
8122 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8123 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008124/* confdefs.h. */
8125_ACEOF
8126cat confdefs.h >>conftest.$ac_ext
8127cat >>conftest.$ac_ext <<_ACEOF
8128/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008129$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008130 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008131int
8132main ()
8133{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008134static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008135test_array [0] = 0
8136
8137 ;
8138 return 0;
8139}
8140_ACEOF
8141rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008142if { (ac_try="$ac_compile"
8143case "(($ac_try" in
8144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8145 *) ac_try_echo=$ac_try;;
8146esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008148 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008149 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008150 grep -v '^ *+' conftest.er1 >conftest.err
8151 rm -f conftest.er1
8152 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008154 (exit $ac_status); } && {
8155 test -z "$ac_c_werror_flag" ||
8156 test ! -s conftest.err
8157 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008158 ac_hi=$ac_mid
8159else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008160 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008161sed 's/^/| /' conftest.$ac_ext >&5
8162
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008163 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008165
8166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008167done
8168case $ac_lo in
8169?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008170'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008171 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008172See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008173echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008174See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008175 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008176 else
8177 ac_cv_sizeof_long=0
8178 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008179esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008180else
Martin v. Löwis11437992002-04-12 09:54:03 +00008181 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008182/* confdefs.h. */
8183_ACEOF
8184cat confdefs.h >>conftest.$ac_ext
8185cat >>conftest.$ac_ext <<_ACEOF
8186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008187$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008188 typedef long ac__type_sizeof_;
8189static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8190static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008191#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008192#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008193int
8194main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008195{
Martin v. Löwis11437992002-04-12 09:54:03 +00008196
8197 FILE *f = fopen ("conftest.val", "w");
8198 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008199 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008200 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008201 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008202 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008203 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008204 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008205 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008206 }
8207 else
8208 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008209 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008210 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008211 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008212 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008213 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008214 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008215
8216 ;
8217 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008218}
Martin v. Löwis11437992002-04-12 09:54:03 +00008219_ACEOF
8220rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008221if { (ac_try="$ac_link"
8222case "(($ac_try" in
8223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8224 *) ac_try_echo=$ac_try;;
8225esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008227 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008228 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008230 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008231 { (case "(($ac_try" in
8232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8233 *) ac_try_echo=$ac_try;;
8234esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008236 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008237 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008239 (exit $ac_status); }; }; then
8240 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008241else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008242 echo "$as_me: program exited with status $ac_status" >&5
8243echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008244sed 's/^/| /' conftest.$ac_ext >&5
8245
Martin v. Löwis11437992002-04-12 09:54:03 +00008246( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008247if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008248 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008249See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008250echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008251See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008252 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008253 else
8254 ac_cv_sizeof_long=0
8255 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008257rm -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 +00008258fi
8259rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008260fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008261{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8262echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263
8264
8265
Martin v. Löwis11437992002-04-12 09:54:03 +00008266cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008267#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008268_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008269
8270
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008271{ echo "$as_me:$LINENO: checking for void *" >&5
8272echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8273if test "${ac_cv_type_void_p+set}" = set; then
8274 echo $ECHO_N "(cached) $ECHO_C" >&6
8275else
8276 cat >conftest.$ac_ext <<_ACEOF
8277/* confdefs.h. */
8278_ACEOF
8279cat confdefs.h >>conftest.$ac_ext
8280cat >>conftest.$ac_ext <<_ACEOF
8281/* end confdefs.h. */
8282$ac_includes_default
8283typedef void * ac__type_new_;
8284int
8285main ()
8286{
8287if ((ac__type_new_ *) 0)
8288 return 0;
8289if (sizeof (ac__type_new_))
8290 return 0;
8291 ;
8292 return 0;
8293}
8294_ACEOF
8295rm -f conftest.$ac_objext
8296if { (ac_try="$ac_compile"
8297case "(($ac_try" in
8298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8299 *) ac_try_echo=$ac_try;;
8300esac
8301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8302 (eval "$ac_compile") 2>conftest.er1
8303 ac_status=$?
8304 grep -v '^ *+' conftest.er1 >conftest.err
8305 rm -f conftest.er1
8306 cat conftest.err >&5
8307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8308 (exit $ac_status); } && {
8309 test -z "$ac_c_werror_flag" ||
8310 test ! -s conftest.err
8311 } && test -s conftest.$ac_objext; then
8312 ac_cv_type_void_p=yes
8313else
8314 echo "$as_me: failed program was:" >&5
8315sed 's/^/| /' conftest.$ac_ext >&5
8316
8317 ac_cv_type_void_p=no
8318fi
8319
8320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8321fi
8322{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8323echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8324
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008325# The cast to long int works around a bug in the HP C Compiler
8326# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8327# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8328# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008329{ echo "$as_me:$LINENO: checking size of void *" >&5
8330echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008331if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008332 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008333else
Martin v. Löwis11437992002-04-12 09:54:03 +00008334 if test "$cross_compiling" = yes; then
8335 # Depending upon the size, compute the lo and hi bounds.
8336cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008337/* confdefs.h. */
8338_ACEOF
8339cat confdefs.h >>conftest.$ac_ext
8340cat >>conftest.$ac_ext <<_ACEOF
8341/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008342$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008343 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008344int
8345main ()
8346{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008347static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008348test_array [0] = 0
8349
8350 ;
8351 return 0;
8352}
8353_ACEOF
8354rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008355if { (ac_try="$ac_compile"
8356case "(($ac_try" in
8357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8358 *) ac_try_echo=$ac_try;;
8359esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008361 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008362 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008363 grep -v '^ *+' conftest.er1 >conftest.err
8364 rm -f conftest.er1
8365 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008367 (exit $ac_status); } && {
8368 test -z "$ac_c_werror_flag" ||
8369 test ! -s conftest.err
8370 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008371 ac_lo=0 ac_mid=0
8372 while :; do
8373 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008374/* confdefs.h. */
8375_ACEOF
8376cat confdefs.h >>conftest.$ac_ext
8377cat >>conftest.$ac_ext <<_ACEOF
8378/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008379$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008380 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008381int
8382main ()
8383{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008384static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008385test_array [0] = 0
8386
8387 ;
8388 return 0;
8389}
8390_ACEOF
8391rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008392if { (ac_try="$ac_compile"
8393case "(($ac_try" in
8394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8395 *) ac_try_echo=$ac_try;;
8396esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008398 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008400 grep -v '^ *+' conftest.er1 >conftest.err
8401 rm -f conftest.er1
8402 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008404 (exit $ac_status); } && {
8405 test -z "$ac_c_werror_flag" ||
8406 test ! -s conftest.err
8407 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008408 ac_hi=$ac_mid; break
8409else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008410 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008411sed 's/^/| /' conftest.$ac_ext >&5
8412
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008413 ac_lo=`expr $ac_mid + 1`
8414 if test $ac_lo -le $ac_mid; then
8415 ac_lo= ac_hi=
8416 break
8417 fi
8418 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008420
8421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008422 done
8423else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008424 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008425sed 's/^/| /' conftest.$ac_ext >&5
8426
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008427 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008428/* confdefs.h. */
8429_ACEOF
8430cat confdefs.h >>conftest.$ac_ext
8431cat >>conftest.$ac_ext <<_ACEOF
8432/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008433$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008434 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008435int
8436main ()
8437{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008438static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008439test_array [0] = 0
8440
8441 ;
8442 return 0;
8443}
8444_ACEOF
8445rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008446if { (ac_try="$ac_compile"
8447case "(($ac_try" in
8448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8449 *) ac_try_echo=$ac_try;;
8450esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008454 grep -v '^ *+' conftest.er1 >conftest.err
8455 rm -f conftest.er1
8456 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008458 (exit $ac_status); } && {
8459 test -z "$ac_c_werror_flag" ||
8460 test ! -s conftest.err
8461 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008462 ac_hi=-1 ac_mid=-1
8463 while :; do
8464 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008465/* confdefs.h. */
8466_ACEOF
8467cat confdefs.h >>conftest.$ac_ext
8468cat >>conftest.$ac_ext <<_ACEOF
8469/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008470$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008471 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008472int
8473main ()
8474{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008475static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008476test_array [0] = 0
8477
8478 ;
8479 return 0;
8480}
8481_ACEOF
8482rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008483if { (ac_try="$ac_compile"
8484case "(($ac_try" in
8485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8486 *) ac_try_echo=$ac_try;;
8487esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008489 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008491 grep -v '^ *+' conftest.er1 >conftest.err
8492 rm -f conftest.er1
8493 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008495 (exit $ac_status); } && {
8496 test -z "$ac_c_werror_flag" ||
8497 test ! -s conftest.err
8498 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008499 ac_lo=$ac_mid; break
8500else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008502sed 's/^/| /' conftest.$ac_ext >&5
8503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008504 ac_hi=`expr '(' $ac_mid ')' - 1`
8505 if test $ac_mid -le $ac_hi; then
8506 ac_lo= ac_hi=
8507 break
8508 fi
8509 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511
8512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008513 done
8514else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008516sed 's/^/| /' conftest.$ac_ext >&5
8517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008518 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008520
8521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +00008525# Binary search between lo and hi bounds.
8526while test "x$ac_lo" != "x$ac_hi"; do
8527 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8528 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008529/* confdefs.h. */
8530_ACEOF
8531cat confdefs.h >>conftest.$ac_ext
8532cat >>conftest.$ac_ext <<_ACEOF
8533/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008534$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008535 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008536int
8537main ()
8538{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008539static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008540test_array [0] = 0
8541
8542 ;
8543 return 0;
8544}
8545_ACEOF
8546rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008547if { (ac_try="$ac_compile"
8548case "(($ac_try" in
8549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8550 *) ac_try_echo=$ac_try;;
8551esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008553 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008555 grep -v '^ *+' conftest.er1 >conftest.err
8556 rm -f conftest.er1
8557 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008559 (exit $ac_status); } && {
8560 test -z "$ac_c_werror_flag" ||
8561 test ! -s conftest.err
8562 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 ac_hi=$ac_mid
8564else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008566sed 's/^/| /' conftest.$ac_ext >&5
8567
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008568 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008570
8571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008572done
8573case $ac_lo in
8574?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008575'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008576 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008577See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008578echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008579See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008580 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581 else
8582 ac_cv_sizeof_void_p=0
8583 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008584esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008585else
Martin v. Löwis11437992002-04-12 09:54:03 +00008586 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008587/* confdefs.h. */
8588_ACEOF
8589cat confdefs.h >>conftest.$ac_ext
8590cat >>conftest.$ac_ext <<_ACEOF
8591/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008592$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008593 typedef void * ac__type_sizeof_;
8594static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8595static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008596#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008597#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008598int
8599main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008600{
Martin v. Löwis11437992002-04-12 09:54:03 +00008601
8602 FILE *f = fopen ("conftest.val", "w");
8603 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008605 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008606 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008607 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008608 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008609 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008610 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008611 }
8612 else
8613 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008614 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008615 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008616 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008617 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008618 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008619 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008620
8621 ;
8622 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008623}
Martin v. Löwis11437992002-04-12 09:54:03 +00008624_ACEOF
8625rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008626if { (ac_try="$ac_link"
8627case "(($ac_try" in
8628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8629 *) ac_try_echo=$ac_try;;
8630esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008632 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008633 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008636 { (case "(($ac_try" in
8637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8638 *) ac_try_echo=$ac_try;;
8639esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008641 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008642 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008644 (exit $ac_status); }; }; then
8645 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008646else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008647 echo "$as_me: program exited with status $ac_status" >&5
8648echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008649sed 's/^/| /' conftest.$ac_ext >&5
8650
Martin v. Löwis11437992002-04-12 09:54:03 +00008651( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008652if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008653 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008654See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008655echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008656See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008657 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658 else
8659 ac_cv_sizeof_void_p=0
8660 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008662rm -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 +00008663fi
8664rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008665fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008666{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8667echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008668
8669
8670
Martin v. Löwis11437992002-04-12 09:54:03 +00008671cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008672#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008673_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008674
8675
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008676{ echo "$as_me:$LINENO: checking for short" >&5
8677echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8678if test "${ac_cv_type_short+set}" = set; then
8679 echo $ECHO_N "(cached) $ECHO_C" >&6
8680else
8681 cat >conftest.$ac_ext <<_ACEOF
8682/* confdefs.h. */
8683_ACEOF
8684cat confdefs.h >>conftest.$ac_ext
8685cat >>conftest.$ac_ext <<_ACEOF
8686/* end confdefs.h. */
8687$ac_includes_default
8688typedef short ac__type_new_;
8689int
8690main ()
8691{
8692if ((ac__type_new_ *) 0)
8693 return 0;
8694if (sizeof (ac__type_new_))
8695 return 0;
8696 ;
8697 return 0;
8698}
8699_ACEOF
8700rm -f conftest.$ac_objext
8701if { (ac_try="$ac_compile"
8702case "(($ac_try" in
8703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8704 *) ac_try_echo=$ac_try;;
8705esac
8706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8707 (eval "$ac_compile") 2>conftest.er1
8708 ac_status=$?
8709 grep -v '^ *+' conftest.er1 >conftest.err
8710 rm -f conftest.er1
8711 cat conftest.err >&5
8712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8713 (exit $ac_status); } && {
8714 test -z "$ac_c_werror_flag" ||
8715 test ! -s conftest.err
8716 } && test -s conftest.$ac_objext; then
8717 ac_cv_type_short=yes
8718else
8719 echo "$as_me: failed program was:" >&5
8720sed 's/^/| /' conftest.$ac_ext >&5
8721
8722 ac_cv_type_short=no
8723fi
8724
8725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8726fi
8727{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8728echo "${ECHO_T}$ac_cv_type_short" >&6; }
8729
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008730# The cast to long int works around a bug in the HP C Compiler
8731# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8732# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8733# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008734{ echo "$as_me:$LINENO: checking size of short" >&5
8735echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008736if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008737 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008738else
Martin v. Löwis11437992002-04-12 09:54:03 +00008739 if test "$cross_compiling" = yes; then
8740 # Depending upon the size, compute the lo and hi bounds.
8741cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008742/* confdefs.h. */
8743_ACEOF
8744cat confdefs.h >>conftest.$ac_ext
8745cat >>conftest.$ac_ext <<_ACEOF
8746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008747$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008748 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008749int
8750main ()
8751{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008752static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008753test_array [0] = 0
8754
8755 ;
8756 return 0;
8757}
8758_ACEOF
8759rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008760if { (ac_try="$ac_compile"
8761case "(($ac_try" in
8762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8763 *) ac_try_echo=$ac_try;;
8764esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008766 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008768 grep -v '^ *+' conftest.er1 >conftest.err
8769 rm -f conftest.er1
8770 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008772 (exit $ac_status); } && {
8773 test -z "$ac_c_werror_flag" ||
8774 test ! -s conftest.err
8775 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008776 ac_lo=0 ac_mid=0
8777 while :; do
8778 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008779/* confdefs.h. */
8780_ACEOF
8781cat confdefs.h >>conftest.$ac_ext
8782cat >>conftest.$ac_ext <<_ACEOF
8783/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008784$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008785 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008786int
8787main ()
8788{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008789static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008790test_array [0] = 0
8791
8792 ;
8793 return 0;
8794}
8795_ACEOF
8796rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008797if { (ac_try="$ac_compile"
8798case "(($ac_try" in
8799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8800 *) ac_try_echo=$ac_try;;
8801esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008803 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008805 grep -v '^ *+' conftest.er1 >conftest.err
8806 rm -f conftest.er1
8807 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008809 (exit $ac_status); } && {
8810 test -z "$ac_c_werror_flag" ||
8811 test ! -s conftest.err
8812 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008813 ac_hi=$ac_mid; break
8814else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008816sed 's/^/| /' conftest.$ac_ext >&5
8817
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008818 ac_lo=`expr $ac_mid + 1`
8819 if test $ac_lo -le $ac_mid; then
8820 ac_lo= ac_hi=
8821 break
8822 fi
8823 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008825
8826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008827 done
8828else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008830sed 's/^/| /' conftest.$ac_ext >&5
8831
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008832 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008833/* confdefs.h. */
8834_ACEOF
8835cat confdefs.h >>conftest.$ac_ext
8836cat >>conftest.$ac_ext <<_ACEOF
8837/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008838$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008839 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008840int
8841main ()
8842{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008843static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008844test_array [0] = 0
8845
8846 ;
8847 return 0;
8848}
8849_ACEOF
8850rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851if { (ac_try="$ac_compile"
8852case "(($ac_try" in
8853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8854 *) ac_try_echo=$ac_try;;
8855esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008857 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008859 grep -v '^ *+' conftest.er1 >conftest.err
8860 rm -f conftest.er1
8861 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008863 (exit $ac_status); } && {
8864 test -z "$ac_c_werror_flag" ||
8865 test ! -s conftest.err
8866 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008867 ac_hi=-1 ac_mid=-1
8868 while :; do
8869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008870/* confdefs.h. */
8871_ACEOF
8872cat confdefs.h >>conftest.$ac_ext
8873cat >>conftest.$ac_ext <<_ACEOF
8874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008875$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008876 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008877int
8878main ()
8879{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008880static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008881test_array [0] = 0
8882
8883 ;
8884 return 0;
8885}
8886_ACEOF
8887rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008888if { (ac_try="$ac_compile"
8889case "(($ac_try" in
8890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8891 *) ac_try_echo=$ac_try;;
8892esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008894 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008896 grep -v '^ *+' conftest.er1 >conftest.err
8897 rm -f conftest.er1
8898 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008900 (exit $ac_status); } && {
8901 test -z "$ac_c_werror_flag" ||
8902 test ! -s conftest.err
8903 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008904 ac_lo=$ac_mid; break
8905else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008907sed 's/^/| /' conftest.$ac_ext >&5
8908
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008909 ac_hi=`expr '(' $ac_mid ')' - 1`
8910 if test $ac_mid -le $ac_hi; then
8911 ac_lo= ac_hi=
8912 break
8913 fi
8914 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008916
8917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008918 done
8919else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008921sed 's/^/| /' conftest.$ac_ext >&5
8922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008923 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008925
8926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +00008930# Binary search between lo and hi bounds.
8931while test "x$ac_lo" != "x$ac_hi"; do
8932 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008934/* confdefs.h. */
8935_ACEOF
8936cat confdefs.h >>conftest.$ac_ext
8937cat >>conftest.$ac_ext <<_ACEOF
8938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008939$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008940 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008941int
8942main ()
8943{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008944static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008945test_array [0] = 0
8946
8947 ;
8948 return 0;
8949}
8950_ACEOF
8951rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008952if { (ac_try="$ac_compile"
8953case "(($ac_try" in
8954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8955 *) ac_try_echo=$ac_try;;
8956esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008958 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008960 grep -v '^ *+' conftest.er1 >conftest.err
8961 rm -f conftest.er1
8962 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008964 (exit $ac_status); } && {
8965 test -z "$ac_c_werror_flag" ||
8966 test ! -s conftest.err
8967 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008968 ac_hi=$ac_mid
8969else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008971sed 's/^/| /' conftest.$ac_ext >&5
8972
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008973 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008975
8976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008977done
8978case $ac_lo in
8979?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008980'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008981 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008982See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008983echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008984See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008985 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008986 else
8987 ac_cv_sizeof_short=0
8988 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008989esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008990else
Martin v. Löwis11437992002-04-12 09:54:03 +00008991 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008992/* confdefs.h. */
8993_ACEOF
8994cat confdefs.h >>conftest.$ac_ext
8995cat >>conftest.$ac_ext <<_ACEOF
8996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008997$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008998 typedef short ac__type_sizeof_;
8999static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9000static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009001#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009002#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009003int
9004main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009005{
Martin v. Löwis11437992002-04-12 09:54:03 +00009006
9007 FILE *f = fopen ("conftest.val", "w");
9008 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009009 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009010 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009011 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009012 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009013 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009014 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009015 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009016 }
9017 else
9018 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009019 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009020 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009021 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009022 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009023 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009024 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009025
9026 ;
9027 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009028}
Martin v. Löwis11437992002-04-12 09:54:03 +00009029_ACEOF
9030rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009031if { (ac_try="$ac_link"
9032case "(($ac_try" in
9033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9034 *) ac_try_echo=$ac_try;;
9035esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009037 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009041 { (case "(($ac_try" in
9042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9043 *) ac_try_echo=$ac_try;;
9044esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009046 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009047 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009049 (exit $ac_status); }; }; then
9050 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009051else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009052 echo "$as_me: program exited with status $ac_status" >&5
9053echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009054sed 's/^/| /' conftest.$ac_ext >&5
9055
Martin v. Löwis11437992002-04-12 09:54:03 +00009056( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009057if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009058 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009059See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009060echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009061See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009062 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009063 else
9064 ac_cv_sizeof_short=0
9065 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009067rm -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 +00009068fi
9069rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009070fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009071{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9072echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009073
9074
9075
Martin v. Löwis11437992002-04-12 09:54:03 +00009076cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009077#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009078_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009079
9080
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009081{ echo "$as_me:$LINENO: checking for float" >&5
9082echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9083if test "${ac_cv_type_float+set}" = set; then
9084 echo $ECHO_N "(cached) $ECHO_C" >&6
9085else
9086 cat >conftest.$ac_ext <<_ACEOF
9087/* confdefs.h. */
9088_ACEOF
9089cat confdefs.h >>conftest.$ac_ext
9090cat >>conftest.$ac_ext <<_ACEOF
9091/* end confdefs.h. */
9092$ac_includes_default
9093typedef float ac__type_new_;
9094int
9095main ()
9096{
9097if ((ac__type_new_ *) 0)
9098 return 0;
9099if (sizeof (ac__type_new_))
9100 return 0;
9101 ;
9102 return 0;
9103}
9104_ACEOF
9105rm -f conftest.$ac_objext
9106if { (ac_try="$ac_compile"
9107case "(($ac_try" in
9108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9109 *) ac_try_echo=$ac_try;;
9110esac
9111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9112 (eval "$ac_compile") 2>conftest.er1
9113 ac_status=$?
9114 grep -v '^ *+' conftest.er1 >conftest.err
9115 rm -f conftest.er1
9116 cat conftest.err >&5
9117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9118 (exit $ac_status); } && {
9119 test -z "$ac_c_werror_flag" ||
9120 test ! -s conftest.err
9121 } && test -s conftest.$ac_objext; then
9122 ac_cv_type_float=yes
9123else
9124 echo "$as_me: failed program was:" >&5
9125sed 's/^/| /' conftest.$ac_ext >&5
9126
9127 ac_cv_type_float=no
9128fi
9129
9130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9131fi
9132{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9133echo "${ECHO_T}$ac_cv_type_float" >&6; }
9134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009135# The cast to long int works around a bug in the HP C Compiler
9136# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9137# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9138# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009139{ echo "$as_me:$LINENO: checking size of float" >&5
9140echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009141if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009142 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009143else
Martin v. Löwis11437992002-04-12 09:54:03 +00009144 if test "$cross_compiling" = yes; then
9145 # Depending upon the size, compute the lo and hi bounds.
9146cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009147/* confdefs.h. */
9148_ACEOF
9149cat confdefs.h >>conftest.$ac_ext
9150cat >>conftest.$ac_ext <<_ACEOF
9151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009152$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009153 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009154int
9155main ()
9156{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009157static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009158test_array [0] = 0
9159
9160 ;
9161 return 0;
9162}
9163_ACEOF
9164rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009165if { (ac_try="$ac_compile"
9166case "(($ac_try" in
9167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9168 *) ac_try_echo=$ac_try;;
9169esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009171 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009172 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009173 grep -v '^ *+' conftest.er1 >conftest.err
9174 rm -f conftest.er1
9175 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009177 (exit $ac_status); } && {
9178 test -z "$ac_c_werror_flag" ||
9179 test ! -s conftest.err
9180 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009181 ac_lo=0 ac_mid=0
9182 while :; do
9183 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009184/* confdefs.h. */
9185_ACEOF
9186cat confdefs.h >>conftest.$ac_ext
9187cat >>conftest.$ac_ext <<_ACEOF
9188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009189$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009190 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009191int
9192main ()
9193{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009194static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009195test_array [0] = 0
9196
9197 ;
9198 return 0;
9199}
9200_ACEOF
9201rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009202if { (ac_try="$ac_compile"
9203case "(($ac_try" in
9204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9205 *) ac_try_echo=$ac_try;;
9206esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009208 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009210 grep -v '^ *+' conftest.er1 >conftest.err
9211 rm -f conftest.er1
9212 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009214 (exit $ac_status); } && {
9215 test -z "$ac_c_werror_flag" ||
9216 test ! -s conftest.err
9217 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009218 ac_hi=$ac_mid; break
9219else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009221sed 's/^/| /' conftest.$ac_ext >&5
9222
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009223 ac_lo=`expr $ac_mid + 1`
9224 if test $ac_lo -le $ac_mid; then
9225 ac_lo= ac_hi=
9226 break
9227 fi
9228 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009230
9231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009232 done
9233else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009235sed 's/^/| /' conftest.$ac_ext >&5
9236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009237 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009238/* confdefs.h. */
9239_ACEOF
9240cat confdefs.h >>conftest.$ac_ext
9241cat >>conftest.$ac_ext <<_ACEOF
9242/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009243$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009244 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009245int
9246main ()
9247{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009248static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009249test_array [0] = 0
9250
9251 ;
9252 return 0;
9253}
9254_ACEOF
9255rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009256if { (ac_try="$ac_compile"
9257case "(($ac_try" in
9258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9259 *) ac_try_echo=$ac_try;;
9260esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009262 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009263 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009264 grep -v '^ *+' conftest.er1 >conftest.err
9265 rm -f conftest.er1
9266 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009268 (exit $ac_status); } && {
9269 test -z "$ac_c_werror_flag" ||
9270 test ! -s conftest.err
9271 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009272 ac_hi=-1 ac_mid=-1
9273 while :; do
9274 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009275/* confdefs.h. */
9276_ACEOF
9277cat confdefs.h >>conftest.$ac_ext
9278cat >>conftest.$ac_ext <<_ACEOF
9279/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009280$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009281 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009282int
9283main ()
9284{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009285static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009286test_array [0] = 0
9287
9288 ;
9289 return 0;
9290}
9291_ACEOF
9292rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009293if { (ac_try="$ac_compile"
9294case "(($ac_try" in
9295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9296 *) ac_try_echo=$ac_try;;
9297esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009299 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009301 grep -v '^ *+' conftest.er1 >conftest.err
9302 rm -f conftest.er1
9303 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009305 (exit $ac_status); } && {
9306 test -z "$ac_c_werror_flag" ||
9307 test ! -s conftest.err
9308 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009309 ac_lo=$ac_mid; break
9310else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009312sed 's/^/| /' conftest.$ac_ext >&5
9313
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009314 ac_hi=`expr '(' $ac_mid ')' - 1`
9315 if test $ac_mid -le $ac_hi; then
9316 ac_lo= ac_hi=
9317 break
9318 fi
9319 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009321
9322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009323 done
9324else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009325 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009326sed 's/^/| /' conftest.$ac_ext >&5
9327
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009328 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009330
9331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +00009335# Binary search between lo and hi bounds.
9336while test "x$ac_lo" != "x$ac_hi"; do
9337 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9338 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009339/* confdefs.h. */
9340_ACEOF
9341cat confdefs.h >>conftest.$ac_ext
9342cat >>conftest.$ac_ext <<_ACEOF
9343/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009344$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009345 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009346int
9347main ()
9348{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009349static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009350test_array [0] = 0
9351
9352 ;
9353 return 0;
9354}
9355_ACEOF
9356rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009357if { (ac_try="$ac_compile"
9358case "(($ac_try" in
9359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9360 *) ac_try_echo=$ac_try;;
9361esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009363 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009365 grep -v '^ *+' conftest.er1 >conftest.err
9366 rm -f conftest.er1
9367 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009369 (exit $ac_status); } && {
9370 test -z "$ac_c_werror_flag" ||
9371 test ! -s conftest.err
9372 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009373 ac_hi=$ac_mid
9374else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009376sed 's/^/| /' conftest.$ac_ext >&5
9377
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009378 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009380
9381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009382done
9383case $ac_lo in
9384?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009385'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009386 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009387See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009388echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009389See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009390 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009391 else
9392 ac_cv_sizeof_float=0
9393 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009394esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009395else
Martin v. Löwis11437992002-04-12 09:54:03 +00009396 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009397/* confdefs.h. */
9398_ACEOF
9399cat confdefs.h >>conftest.$ac_ext
9400cat >>conftest.$ac_ext <<_ACEOF
9401/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009402$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009403 typedef float ac__type_sizeof_;
9404static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9405static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009406#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009407#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009408int
9409main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009410{
Martin v. Löwis11437992002-04-12 09:54:03 +00009411
9412 FILE *f = fopen ("conftest.val", "w");
9413 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009414 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009415 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009416 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009417 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009418 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009419 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009420 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009421 }
9422 else
9423 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009424 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009425 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009426 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009427 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009428 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009429 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009430
9431 ;
9432 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009433}
Martin v. Löwis11437992002-04-12 09:54:03 +00009434_ACEOF
9435rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009436if { (ac_try="$ac_link"
9437case "(($ac_try" in
9438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9439 *) ac_try_echo=$ac_try;;
9440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009442 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009443 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009445 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009446 { (case "(($ac_try" in
9447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9448 *) ac_try_echo=$ac_try;;
9449esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009451 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 (exit $ac_status); }; }; then
9455 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009456else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009457 echo "$as_me: program exited with status $ac_status" >&5
9458echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009459sed 's/^/| /' conftest.$ac_ext >&5
9460
Martin v. Löwis11437992002-04-12 09:54:03 +00009461( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009462if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009463 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009464See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009465echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009466See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009467 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009468 else
9469 ac_cv_sizeof_float=0
9470 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009472rm -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 +00009473fi
9474rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009475fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009476{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9477echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009478
9479
9480
Martin v. Löwis11437992002-04-12 09:54:03 +00009481cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009482#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009483_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009484
9485
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009486{ echo "$as_me:$LINENO: checking for double" >&5
9487echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9488if test "${ac_cv_type_double+set}" = set; then
9489 echo $ECHO_N "(cached) $ECHO_C" >&6
9490else
9491 cat >conftest.$ac_ext <<_ACEOF
9492/* confdefs.h. */
9493_ACEOF
9494cat confdefs.h >>conftest.$ac_ext
9495cat >>conftest.$ac_ext <<_ACEOF
9496/* end confdefs.h. */
9497$ac_includes_default
9498typedef double ac__type_new_;
9499int
9500main ()
9501{
9502if ((ac__type_new_ *) 0)
9503 return 0;
9504if (sizeof (ac__type_new_))
9505 return 0;
9506 ;
9507 return 0;
9508}
9509_ACEOF
9510rm -f conftest.$ac_objext
9511if { (ac_try="$ac_compile"
9512case "(($ac_try" in
9513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9514 *) ac_try_echo=$ac_try;;
9515esac
9516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9517 (eval "$ac_compile") 2>conftest.er1
9518 ac_status=$?
9519 grep -v '^ *+' conftest.er1 >conftest.err
9520 rm -f conftest.er1
9521 cat conftest.err >&5
9522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9523 (exit $ac_status); } && {
9524 test -z "$ac_c_werror_flag" ||
9525 test ! -s conftest.err
9526 } && test -s conftest.$ac_objext; then
9527 ac_cv_type_double=yes
9528else
9529 echo "$as_me: failed program was:" >&5
9530sed 's/^/| /' conftest.$ac_ext >&5
9531
9532 ac_cv_type_double=no
9533fi
9534
9535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9536fi
9537{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9538echo "${ECHO_T}$ac_cv_type_double" >&6; }
9539
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009540# The cast to long int works around a bug in the HP C Compiler
9541# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9542# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9543# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009544{ echo "$as_me:$LINENO: checking size of double" >&5
9545echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009546if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009547 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009548else
Martin v. Löwis11437992002-04-12 09:54:03 +00009549 if test "$cross_compiling" = yes; then
9550 # Depending upon the size, compute the lo and hi bounds.
9551cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009552/* confdefs.h. */
9553_ACEOF
9554cat confdefs.h >>conftest.$ac_ext
9555cat >>conftest.$ac_ext <<_ACEOF
9556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009557$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009558 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009559int
9560main ()
9561{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009562static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009563test_array [0] = 0
9564
9565 ;
9566 return 0;
9567}
9568_ACEOF
9569rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009570if { (ac_try="$ac_compile"
9571case "(($ac_try" in
9572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9573 *) ac_try_echo=$ac_try;;
9574esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009576 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009577 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009578 grep -v '^ *+' conftest.er1 >conftest.err
9579 rm -f conftest.er1
9580 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009582 (exit $ac_status); } && {
9583 test -z "$ac_c_werror_flag" ||
9584 test ! -s conftest.err
9585 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009586 ac_lo=0 ac_mid=0
9587 while :; do
9588 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009589/* confdefs.h. */
9590_ACEOF
9591cat confdefs.h >>conftest.$ac_ext
9592cat >>conftest.$ac_ext <<_ACEOF
9593/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009594$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009595 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009596int
9597main ()
9598{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009599static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009600test_array [0] = 0
9601
9602 ;
9603 return 0;
9604}
9605_ACEOF
9606rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009607if { (ac_try="$ac_compile"
9608case "(($ac_try" in
9609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9610 *) ac_try_echo=$ac_try;;
9611esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009615 grep -v '^ *+' conftest.er1 >conftest.err
9616 rm -f conftest.er1
9617 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009619 (exit $ac_status); } && {
9620 test -z "$ac_c_werror_flag" ||
9621 test ! -s conftest.err
9622 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009623 ac_hi=$ac_mid; break
9624else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009626sed 's/^/| /' conftest.$ac_ext >&5
9627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009628 ac_lo=`expr $ac_mid + 1`
9629 if test $ac_lo -le $ac_mid; then
9630 ac_lo= ac_hi=
9631 break
9632 fi
9633 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009635
9636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009637 done
9638else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009640sed 's/^/| /' conftest.$ac_ext >&5
9641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009642 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009643/* confdefs.h. */
9644_ACEOF
9645cat confdefs.h >>conftest.$ac_ext
9646cat >>conftest.$ac_ext <<_ACEOF
9647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009648$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009649 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009650int
9651main ()
9652{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009653static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009654test_array [0] = 0
9655
9656 ;
9657 return 0;
9658}
9659_ACEOF
9660rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009661if { (ac_try="$ac_compile"
9662case "(($ac_try" in
9663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9664 *) ac_try_echo=$ac_try;;
9665esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009667 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009669 grep -v '^ *+' conftest.er1 >conftest.err
9670 rm -f conftest.er1
9671 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009673 (exit $ac_status); } && {
9674 test -z "$ac_c_werror_flag" ||
9675 test ! -s conftest.err
9676 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009677 ac_hi=-1 ac_mid=-1
9678 while :; do
9679 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009680/* confdefs.h. */
9681_ACEOF
9682cat confdefs.h >>conftest.$ac_ext
9683cat >>conftest.$ac_ext <<_ACEOF
9684/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009685$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009686 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009687int
9688main ()
9689{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009690static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009691test_array [0] = 0
9692
9693 ;
9694 return 0;
9695}
9696_ACEOF
9697rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009698if { (ac_try="$ac_compile"
9699case "(($ac_try" in
9700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9701 *) ac_try_echo=$ac_try;;
9702esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009704 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009706 grep -v '^ *+' conftest.er1 >conftest.err
9707 rm -f conftest.er1
9708 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009710 (exit $ac_status); } && {
9711 test -z "$ac_c_werror_flag" ||
9712 test ! -s conftest.err
9713 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009714 ac_lo=$ac_mid; break
9715else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009717sed 's/^/| /' conftest.$ac_ext >&5
9718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009719 ac_hi=`expr '(' $ac_mid ')' - 1`
9720 if test $ac_mid -le $ac_hi; then
9721 ac_lo= ac_hi=
9722 break
9723 fi
9724 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726
9727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009728 done
9729else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009731sed 's/^/| /' conftest.$ac_ext >&5
9732
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009733 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009735
9736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +00009740# Binary search between lo and hi bounds.
9741while test "x$ac_lo" != "x$ac_hi"; do
9742 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9743 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009744/* confdefs.h. */
9745_ACEOF
9746cat confdefs.h >>conftest.$ac_ext
9747cat >>conftest.$ac_ext <<_ACEOF
9748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009749$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009750 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009751int
9752main ()
9753{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009754static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009755test_array [0] = 0
9756
9757 ;
9758 return 0;
9759}
9760_ACEOF
9761rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009762if { (ac_try="$ac_compile"
9763case "(($ac_try" in
9764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9765 *) ac_try_echo=$ac_try;;
9766esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009768 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009770 grep -v '^ *+' conftest.er1 >conftest.err
9771 rm -f conftest.er1
9772 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009774 (exit $ac_status); } && {
9775 test -z "$ac_c_werror_flag" ||
9776 test ! -s conftest.err
9777 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009778 ac_hi=$ac_mid
9779else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009781sed 's/^/| /' conftest.$ac_ext >&5
9782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009783 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009785
9786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009787done
9788case $ac_lo in
9789?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009790'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009791 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009792See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009793echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009794See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009795 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009796 else
9797 ac_cv_sizeof_double=0
9798 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009799esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009800else
Martin v. Löwis11437992002-04-12 09:54:03 +00009801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009802/* confdefs.h. */
9803_ACEOF
9804cat confdefs.h >>conftest.$ac_ext
9805cat >>conftest.$ac_ext <<_ACEOF
9806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009807$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009808 typedef double ac__type_sizeof_;
9809static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9810static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009811#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009812#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009813int
9814main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009815{
Martin v. Löwis11437992002-04-12 09:54:03 +00009816
9817 FILE *f = fopen ("conftest.val", "w");
9818 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009819 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009820 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009822 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009823 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009824 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009825 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 }
9827 else
9828 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009829 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009830 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009832 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009833 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009834 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009835
9836 ;
9837 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009838}
Martin v. Löwis11437992002-04-12 09:54:03 +00009839_ACEOF
9840rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009841if { (ac_try="$ac_link"
9842case "(($ac_try" in
9843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9844 *) ac_try_echo=$ac_try;;
9845esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009847 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009851 { (case "(($ac_try" in
9852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9853 *) ac_try_echo=$ac_try;;
9854esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009856 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009857 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009859 (exit $ac_status); }; }; then
9860 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009861else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009862 echo "$as_me: program exited with status $ac_status" >&5
9863echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009864sed 's/^/| /' conftest.$ac_ext >&5
9865
Martin v. Löwis11437992002-04-12 09:54:03 +00009866( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009867if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009868 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009869See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009870echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009871See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009872 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009873 else
9874 ac_cv_sizeof_double=0
9875 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009877rm -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 +00009878fi
9879rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009880fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009881{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9882echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009883
9884
9885
Martin v. Löwis11437992002-04-12 09:54:03 +00009886cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009887#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009888_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009889
9890
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009891{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9892echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9893if test "${ac_cv_type_fpos_t+set}" = set; then
9894 echo $ECHO_N "(cached) $ECHO_C" >&6
9895else
9896 cat >conftest.$ac_ext <<_ACEOF
9897/* confdefs.h. */
9898_ACEOF
9899cat confdefs.h >>conftest.$ac_ext
9900cat >>conftest.$ac_ext <<_ACEOF
9901/* end confdefs.h. */
9902$ac_includes_default
9903typedef fpos_t ac__type_new_;
9904int
9905main ()
9906{
9907if ((ac__type_new_ *) 0)
9908 return 0;
9909if (sizeof (ac__type_new_))
9910 return 0;
9911 ;
9912 return 0;
9913}
9914_ACEOF
9915rm -f conftest.$ac_objext
9916if { (ac_try="$ac_compile"
9917case "(($ac_try" in
9918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9919 *) ac_try_echo=$ac_try;;
9920esac
9921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9922 (eval "$ac_compile") 2>conftest.er1
9923 ac_status=$?
9924 grep -v '^ *+' conftest.er1 >conftest.err
9925 rm -f conftest.er1
9926 cat conftest.err >&5
9927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9928 (exit $ac_status); } && {
9929 test -z "$ac_c_werror_flag" ||
9930 test ! -s conftest.err
9931 } && test -s conftest.$ac_objext; then
9932 ac_cv_type_fpos_t=yes
9933else
9934 echo "$as_me: failed program was:" >&5
9935sed 's/^/| /' conftest.$ac_ext >&5
9936
9937 ac_cv_type_fpos_t=no
9938fi
9939
9940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9941fi
9942{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9943echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9944
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009945# The cast to long int works around a bug in the HP C Compiler
9946# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9947# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9948# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009949{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9950echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009951if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009952 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009953else
Martin v. Löwis11437992002-04-12 09:54:03 +00009954 if test "$cross_compiling" = yes; then
9955 # Depending upon the size, compute the lo and hi bounds.
9956cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009957/* confdefs.h. */
9958_ACEOF
9959cat confdefs.h >>conftest.$ac_ext
9960cat >>conftest.$ac_ext <<_ACEOF
9961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009962$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009963 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009964int
9965main ()
9966{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009967static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009968test_array [0] = 0
9969
9970 ;
9971 return 0;
9972}
9973_ACEOF
9974rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009975if { (ac_try="$ac_compile"
9976case "(($ac_try" in
9977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9978 *) ac_try_echo=$ac_try;;
9979esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009981 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009983 grep -v '^ *+' conftest.er1 >conftest.err
9984 rm -f conftest.er1
9985 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009987 (exit $ac_status); } && {
9988 test -z "$ac_c_werror_flag" ||
9989 test ! -s conftest.err
9990 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009991 ac_lo=0 ac_mid=0
9992 while :; do
9993 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009994/* confdefs.h. */
9995_ACEOF
9996cat confdefs.h >>conftest.$ac_ext
9997cat >>conftest.$ac_ext <<_ACEOF
9998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009999$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010000 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010001int
10002main ()
10003{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010004static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010005test_array [0] = 0
10006
10007 ;
10008 return 0;
10009}
10010_ACEOF
10011rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010012if { (ac_try="$ac_compile"
10013case "(($ac_try" in
10014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10015 *) ac_try_echo=$ac_try;;
10016esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010018 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010020 grep -v '^ *+' conftest.er1 >conftest.err
10021 rm -f conftest.er1
10022 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010024 (exit $ac_status); } && {
10025 test -z "$ac_c_werror_flag" ||
10026 test ! -s conftest.err
10027 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010028 ac_hi=$ac_mid; break
10029else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010030 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010031sed 's/^/| /' conftest.$ac_ext >&5
10032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010033 ac_lo=`expr $ac_mid + 1`
10034 if test $ac_lo -le $ac_mid; then
10035 ac_lo= ac_hi=
10036 break
10037 fi
10038 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010040
10041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010042 done
10043else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010045sed 's/^/| /' conftest.$ac_ext >&5
10046
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010048/* confdefs.h. */
10049_ACEOF
10050cat confdefs.h >>conftest.$ac_ext
10051cat >>conftest.$ac_ext <<_ACEOF
10052/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010053$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010054 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010055int
10056main ()
10057{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010058static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010059test_array [0] = 0
10060
10061 ;
10062 return 0;
10063}
10064_ACEOF
10065rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010066if { (ac_try="$ac_compile"
10067case "(($ac_try" in
10068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10069 *) ac_try_echo=$ac_try;;
10070esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010072 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010073 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010074 grep -v '^ *+' conftest.er1 >conftest.err
10075 rm -f conftest.er1
10076 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010078 (exit $ac_status); } && {
10079 test -z "$ac_c_werror_flag" ||
10080 test ! -s conftest.err
10081 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010082 ac_hi=-1 ac_mid=-1
10083 while :; do
10084 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010085/* confdefs.h. */
10086_ACEOF
10087cat confdefs.h >>conftest.$ac_ext
10088cat >>conftest.$ac_ext <<_ACEOF
10089/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010090$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010091 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010092int
10093main ()
10094{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010095static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010096test_array [0] = 0
10097
10098 ;
10099 return 0;
10100}
10101_ACEOF
10102rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010103if { (ac_try="$ac_compile"
10104case "(($ac_try" in
10105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10106 *) ac_try_echo=$ac_try;;
10107esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010109 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010111 grep -v '^ *+' conftest.er1 >conftest.err
10112 rm -f conftest.er1
10113 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010115 (exit $ac_status); } && {
10116 test -z "$ac_c_werror_flag" ||
10117 test ! -s conftest.err
10118 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010119 ac_lo=$ac_mid; break
10120else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010122sed 's/^/| /' conftest.$ac_ext >&5
10123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010124 ac_hi=`expr '(' $ac_mid ')' - 1`
10125 if test $ac_mid -le $ac_hi; then
10126 ac_lo= ac_hi=
10127 break
10128 fi
10129 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010131
10132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010133 done
10134else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010136sed 's/^/| /' conftest.$ac_ext >&5
10137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010138 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010140
10141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +000010145# Binary search between lo and hi bounds.
10146while test "x$ac_lo" != "x$ac_hi"; do
10147 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10148 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010149/* confdefs.h. */
10150_ACEOF
10151cat confdefs.h >>conftest.$ac_ext
10152cat >>conftest.$ac_ext <<_ACEOF
10153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010154$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010155 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010156int
10157main ()
10158{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010159static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010160test_array [0] = 0
10161
10162 ;
10163 return 0;
10164}
10165_ACEOF
10166rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167if { (ac_try="$ac_compile"
10168case "(($ac_try" in
10169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10170 *) ac_try_echo=$ac_try;;
10171esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010173 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010175 grep -v '^ *+' conftest.er1 >conftest.err
10176 rm -f conftest.er1
10177 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010179 (exit $ac_status); } && {
10180 test -z "$ac_c_werror_flag" ||
10181 test ! -s conftest.err
10182 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010183 ac_hi=$ac_mid
10184else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010186sed 's/^/| /' conftest.$ac_ext >&5
10187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010188 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010190
10191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010192done
10193case $ac_lo in
10194?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010195'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010196 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010197See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010198echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010199See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010200 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010201 else
10202 ac_cv_sizeof_fpos_t=0
10203 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010204esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010205else
Martin v. Löwis11437992002-04-12 09:54:03 +000010206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010207/* confdefs.h. */
10208_ACEOF
10209cat confdefs.h >>conftest.$ac_ext
10210cat >>conftest.$ac_ext <<_ACEOF
10211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010212$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010213 typedef fpos_t ac__type_sizeof_;
10214static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10215static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010216#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010217#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010218int
10219main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010220{
Martin v. Löwis11437992002-04-12 09:54:03 +000010221
10222 FILE *f = fopen ("conftest.val", "w");
10223 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010224 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010225 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010226 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010228 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010229 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010230 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010231 }
10232 else
10233 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010234 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010235 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010236 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010237 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010238 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010239 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010240
10241 ;
10242 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010243}
Martin v. Löwis11437992002-04-12 09:54:03 +000010244_ACEOF
10245rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010246if { (ac_try="$ac_link"
10247case "(($ac_try" in
10248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10249 *) ac_try_echo=$ac_try;;
10250esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010252 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010253 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010255 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010256 { (case "(($ac_try" in
10257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10258 *) ac_try_echo=$ac_try;;
10259esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010261 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010262 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 (exit $ac_status); }; }; then
10265 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010266else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010267 echo "$as_me: program exited with status $ac_status" >&5
10268echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010269sed 's/^/| /' conftest.$ac_ext >&5
10270
Martin v. Löwis11437992002-04-12 09:54:03 +000010271( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010272if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010273 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010274See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010275echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010276See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010277 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010278 else
10279 ac_cv_sizeof_fpos_t=0
10280 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010282rm -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 +000010283fi
10284rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010285fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010286{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10287echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010288
10289
10290
Martin v. Löwis11437992002-04-12 09:54:03 +000010291cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010292#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010293_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010294
Michael W. Hudson54241132001-12-07 15:38:26 +000010295
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010296{ echo "$as_me:$LINENO: checking for size_t" >&5
10297echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10298if test "${ac_cv_type_size_t+set}" = set; then
10299 echo $ECHO_N "(cached) $ECHO_C" >&6
10300else
10301 cat >conftest.$ac_ext <<_ACEOF
10302/* confdefs.h. */
10303_ACEOF
10304cat confdefs.h >>conftest.$ac_ext
10305cat >>conftest.$ac_ext <<_ACEOF
10306/* end confdefs.h. */
10307$ac_includes_default
10308typedef size_t ac__type_new_;
10309int
10310main ()
10311{
10312if ((ac__type_new_ *) 0)
10313 return 0;
10314if (sizeof (ac__type_new_))
10315 return 0;
10316 ;
10317 return 0;
10318}
10319_ACEOF
10320rm -f conftest.$ac_objext
10321if { (ac_try="$ac_compile"
10322case "(($ac_try" in
10323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10324 *) ac_try_echo=$ac_try;;
10325esac
10326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10327 (eval "$ac_compile") 2>conftest.er1
10328 ac_status=$?
10329 grep -v '^ *+' conftest.er1 >conftest.err
10330 rm -f conftest.er1
10331 cat conftest.err >&5
10332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10333 (exit $ac_status); } && {
10334 test -z "$ac_c_werror_flag" ||
10335 test ! -s conftest.err
10336 } && test -s conftest.$ac_objext; then
10337 ac_cv_type_size_t=yes
10338else
10339 echo "$as_me: failed program was:" >&5
10340sed 's/^/| /' conftest.$ac_ext >&5
10341
10342 ac_cv_type_size_t=no
10343fi
10344
10345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10346fi
10347{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10348echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010350# The cast to long int works around a bug in the HP C Compiler
10351# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10352# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10353# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010354{ echo "$as_me:$LINENO: checking size of size_t" >&5
10355echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010356if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010357 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010358else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010359 if test "$cross_compiling" = yes; then
10360 # Depending upon the size, compute the lo and hi bounds.
10361cat >conftest.$ac_ext <<_ACEOF
10362/* confdefs.h. */
10363_ACEOF
10364cat confdefs.h >>conftest.$ac_ext
10365cat >>conftest.$ac_ext <<_ACEOF
10366/* end confdefs.h. */
10367$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010368 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010369int
10370main ()
10371{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010372static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010373test_array [0] = 0
10374
10375 ;
10376 return 0;
10377}
10378_ACEOF
10379rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010380if { (ac_try="$ac_compile"
10381case "(($ac_try" in
10382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10383 *) ac_try_echo=$ac_try;;
10384esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010386 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010387 ac_status=$?
10388 grep -v '^ *+' conftest.er1 >conftest.err
10389 rm -f conftest.er1
10390 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010392 (exit $ac_status); } && {
10393 test -z "$ac_c_werror_flag" ||
10394 test ! -s conftest.err
10395 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010396 ac_lo=0 ac_mid=0
10397 while :; do
10398 cat >conftest.$ac_ext <<_ACEOF
10399/* confdefs.h. */
10400_ACEOF
10401cat confdefs.h >>conftest.$ac_ext
10402cat >>conftest.$ac_ext <<_ACEOF
10403/* end confdefs.h. */
10404$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010405 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010406int
10407main ()
10408{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010409static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010410test_array [0] = 0
10411
10412 ;
10413 return 0;
10414}
10415_ACEOF
10416rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010417if { (ac_try="$ac_compile"
10418case "(($ac_try" in
10419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10420 *) ac_try_echo=$ac_try;;
10421esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010423 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010424 ac_status=$?
10425 grep -v '^ *+' conftest.er1 >conftest.err
10426 rm -f conftest.er1
10427 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010429 (exit $ac_status); } && {
10430 test -z "$ac_c_werror_flag" ||
10431 test ! -s conftest.err
10432 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010433 ac_hi=$ac_mid; break
10434else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010435 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010436sed 's/^/| /' conftest.$ac_ext >&5
10437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010438 ac_lo=`expr $ac_mid + 1`
10439 if test $ac_lo -le $ac_mid; then
10440 ac_lo= ac_hi=
10441 break
10442 fi
10443 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010445
10446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010447 done
10448else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010449 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010450sed 's/^/| /' conftest.$ac_ext >&5
10451
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010452 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010453/* confdefs.h. */
10454_ACEOF
10455cat confdefs.h >>conftest.$ac_ext
10456cat >>conftest.$ac_ext <<_ACEOF
10457/* end confdefs.h. */
10458$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010459 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010460int
10461main ()
10462{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010463static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010464test_array [0] = 0
10465
10466 ;
10467 return 0;
10468}
10469_ACEOF
10470rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010471if { (ac_try="$ac_compile"
10472case "(($ac_try" in
10473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10474 *) ac_try_echo=$ac_try;;
10475esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010477 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010478 ac_status=$?
10479 grep -v '^ *+' conftest.er1 >conftest.err
10480 rm -f conftest.er1
10481 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010483 (exit $ac_status); } && {
10484 test -z "$ac_c_werror_flag" ||
10485 test ! -s conftest.err
10486 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010487 ac_hi=-1 ac_mid=-1
10488 while :; do
10489 cat >conftest.$ac_ext <<_ACEOF
10490/* confdefs.h. */
10491_ACEOF
10492cat confdefs.h >>conftest.$ac_ext
10493cat >>conftest.$ac_ext <<_ACEOF
10494/* end confdefs.h. */
10495$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010496 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010497int
10498main ()
10499{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010500static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010501test_array [0] = 0
10502
10503 ;
10504 return 0;
10505}
10506_ACEOF
10507rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010508if { (ac_try="$ac_compile"
10509case "(($ac_try" in
10510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10511 *) ac_try_echo=$ac_try;;
10512esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010514 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010515 ac_status=$?
10516 grep -v '^ *+' conftest.er1 >conftest.err
10517 rm -f conftest.er1
10518 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010520 (exit $ac_status); } && {
10521 test -z "$ac_c_werror_flag" ||
10522 test ! -s conftest.err
10523 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010524 ac_lo=$ac_mid; break
10525else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010526 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010527sed 's/^/| /' conftest.$ac_ext >&5
10528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010529 ac_hi=`expr '(' $ac_mid ')' - 1`
10530 if test $ac_mid -le $ac_hi; then
10531 ac_lo= ac_hi=
10532 break
10533 fi
10534 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010536
10537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010538 done
10539else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010540 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010541sed 's/^/| /' conftest.$ac_ext >&5
10542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010543 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010545
10546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +000010550# Binary search between lo and hi bounds.
10551while test "x$ac_lo" != "x$ac_hi"; do
10552 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10553 cat >conftest.$ac_ext <<_ACEOF
10554/* confdefs.h. */
10555_ACEOF
10556cat confdefs.h >>conftest.$ac_ext
10557cat >>conftest.$ac_ext <<_ACEOF
10558/* end confdefs.h. */
10559$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010560 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010561int
10562main ()
10563{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010564static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010565test_array [0] = 0
10566
10567 ;
10568 return 0;
10569}
10570_ACEOF
10571rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010572if { (ac_try="$ac_compile"
10573case "(($ac_try" in
10574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10575 *) ac_try_echo=$ac_try;;
10576esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010578 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010579 ac_status=$?
10580 grep -v '^ *+' conftest.er1 >conftest.err
10581 rm -f conftest.er1
10582 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010584 (exit $ac_status); } && {
10585 test -z "$ac_c_werror_flag" ||
10586 test ! -s conftest.err
10587 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010588 ac_hi=$ac_mid
10589else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010590 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010591sed 's/^/| /' conftest.$ac_ext >&5
10592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010593 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010595
10596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010597done
10598case $ac_lo in
10599?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010600'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010601 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010602See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010603echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010604See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010605 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010606 else
10607 ac_cv_sizeof_size_t=0
10608 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010609esac
10610else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010611 cat >conftest.$ac_ext <<_ACEOF
10612/* confdefs.h. */
10613_ACEOF
10614cat confdefs.h >>conftest.$ac_ext
10615cat >>conftest.$ac_ext <<_ACEOF
10616/* end confdefs.h. */
10617$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010618 typedef size_t ac__type_sizeof_;
10619static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10620static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010621#include <stdio.h>
10622#include <stdlib.h>
10623int
10624main ()
10625{
10626
10627 FILE *f = fopen ("conftest.val", "w");
10628 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010629 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010630 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010631 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010632 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010633 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010634 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010635 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010636 }
10637 else
10638 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010639 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010640 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010641 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010642 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010643 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010644 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010645
10646 ;
10647 return 0;
10648}
10649_ACEOF
10650rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010651if { (ac_try="$ac_link"
10652case "(($ac_try" in
10653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10654 *) ac_try_echo=$ac_try;;
10655esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010657 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010658 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010660 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010661 { (case "(($ac_try" in
10662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10663 *) ac_try_echo=$ac_try;;
10664esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010666 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010667 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010669 (exit $ac_status); }; }; then
10670 ac_cv_sizeof_size_t=`cat conftest.val`
10671else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010672 echo "$as_me: program exited with status $ac_status" >&5
10673echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010674sed 's/^/| /' conftest.$ac_ext >&5
10675
10676( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010677if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010678 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010679See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010680echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010681See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010682 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010683 else
10684 ac_cv_sizeof_size_t=0
10685 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010687rm -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 +000010688fi
10689rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010690fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010691{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10692echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010693
10694
10695
Martin v. Löwis18e16552006-02-15 17:27:45 +000010696cat >>confdefs.h <<_ACEOF
10697#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10698_ACEOF
10699
10700
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010701{ echo "$as_me:$LINENO: checking for pid_t" >&5
10702echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10703if test "${ac_cv_type_pid_t+set}" = set; then
10704 echo $ECHO_N "(cached) $ECHO_C" >&6
10705else
10706 cat >conftest.$ac_ext <<_ACEOF
10707/* confdefs.h. */
10708_ACEOF
10709cat confdefs.h >>conftest.$ac_ext
10710cat >>conftest.$ac_ext <<_ACEOF
10711/* end confdefs.h. */
10712$ac_includes_default
10713typedef pid_t ac__type_new_;
10714int
10715main ()
10716{
10717if ((ac__type_new_ *) 0)
10718 return 0;
10719if (sizeof (ac__type_new_))
10720 return 0;
10721 ;
10722 return 0;
10723}
10724_ACEOF
10725rm -f conftest.$ac_objext
10726if { (ac_try="$ac_compile"
10727case "(($ac_try" in
10728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10729 *) ac_try_echo=$ac_try;;
10730esac
10731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10732 (eval "$ac_compile") 2>conftest.er1
10733 ac_status=$?
10734 grep -v '^ *+' conftest.er1 >conftest.err
10735 rm -f conftest.er1
10736 cat conftest.err >&5
10737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10738 (exit $ac_status); } && {
10739 test -z "$ac_c_werror_flag" ||
10740 test ! -s conftest.err
10741 } && test -s conftest.$ac_objext; then
10742 ac_cv_type_pid_t=yes
10743else
10744 echo "$as_me: failed program was:" >&5
10745sed 's/^/| /' conftest.$ac_ext >&5
10746
10747 ac_cv_type_pid_t=no
10748fi
10749
10750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10751fi
10752{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10753echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10754
Christian Heimes400adb02008-02-01 08:12:03 +000010755# The cast to long int works around a bug in the HP C Compiler
10756# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10757# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10758# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010759{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10760echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010761if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010762 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010763else
10764 if test "$cross_compiling" = yes; then
10765 # Depending upon the size, compute the lo and hi bounds.
10766cat >conftest.$ac_ext <<_ACEOF
10767/* confdefs.h. */
10768_ACEOF
10769cat confdefs.h >>conftest.$ac_ext
10770cat >>conftest.$ac_ext <<_ACEOF
10771/* end confdefs.h. */
10772$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010773 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010774int
10775main ()
10776{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010777static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010778test_array [0] = 0
10779
10780 ;
10781 return 0;
10782}
10783_ACEOF
10784rm -f conftest.$ac_objext
10785if { (ac_try="$ac_compile"
10786case "(($ac_try" in
10787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10788 *) ac_try_echo=$ac_try;;
10789esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010791 (eval "$ac_compile") 2>conftest.er1
10792 ac_status=$?
10793 grep -v '^ *+' conftest.er1 >conftest.err
10794 rm -f conftest.er1
10795 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010797 (exit $ac_status); } && {
10798 test -z "$ac_c_werror_flag" ||
10799 test ! -s conftest.err
10800 } && test -s conftest.$ac_objext; then
10801 ac_lo=0 ac_mid=0
10802 while :; do
10803 cat >conftest.$ac_ext <<_ACEOF
10804/* confdefs.h. */
10805_ACEOF
10806cat confdefs.h >>conftest.$ac_ext
10807cat >>conftest.$ac_ext <<_ACEOF
10808/* end confdefs.h. */
10809$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010810 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010811int
10812main ()
10813{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010814static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010815test_array [0] = 0
10816
10817 ;
10818 return 0;
10819}
10820_ACEOF
10821rm -f conftest.$ac_objext
10822if { (ac_try="$ac_compile"
10823case "(($ac_try" in
10824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10825 *) ac_try_echo=$ac_try;;
10826esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010828 (eval "$ac_compile") 2>conftest.er1
10829 ac_status=$?
10830 grep -v '^ *+' conftest.er1 >conftest.err
10831 rm -f conftest.er1
10832 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010834 (exit $ac_status); } && {
10835 test -z "$ac_c_werror_flag" ||
10836 test ! -s conftest.err
10837 } && test -s conftest.$ac_objext; then
10838 ac_hi=$ac_mid; break
10839else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010840 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010841sed 's/^/| /' conftest.$ac_ext >&5
10842
10843 ac_lo=`expr $ac_mid + 1`
10844 if test $ac_lo -le $ac_mid; then
10845 ac_lo= ac_hi=
10846 break
10847 fi
10848 ac_mid=`expr 2 '*' $ac_mid + 1`
10849fi
10850
10851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10852 done
10853else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010854 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010855sed 's/^/| /' conftest.$ac_ext >&5
10856
10857 cat >conftest.$ac_ext <<_ACEOF
10858/* confdefs.h. */
10859_ACEOF
10860cat confdefs.h >>conftest.$ac_ext
10861cat >>conftest.$ac_ext <<_ACEOF
10862/* end confdefs.h. */
10863$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010864 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010865int
10866main ()
10867{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010868static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010869test_array [0] = 0
10870
10871 ;
10872 return 0;
10873}
10874_ACEOF
10875rm -f conftest.$ac_objext
10876if { (ac_try="$ac_compile"
10877case "(($ac_try" in
10878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10879 *) ac_try_echo=$ac_try;;
10880esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010882 (eval "$ac_compile") 2>conftest.er1
10883 ac_status=$?
10884 grep -v '^ *+' conftest.er1 >conftest.err
10885 rm -f conftest.er1
10886 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010888 (exit $ac_status); } && {
10889 test -z "$ac_c_werror_flag" ||
10890 test ! -s conftest.err
10891 } && test -s conftest.$ac_objext; then
10892 ac_hi=-1 ac_mid=-1
10893 while :; do
10894 cat >conftest.$ac_ext <<_ACEOF
10895/* confdefs.h. */
10896_ACEOF
10897cat confdefs.h >>conftest.$ac_ext
10898cat >>conftest.$ac_ext <<_ACEOF
10899/* end confdefs.h. */
10900$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010901 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010902int
10903main ()
10904{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010905static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010906test_array [0] = 0
10907
10908 ;
10909 return 0;
10910}
10911_ACEOF
10912rm -f conftest.$ac_objext
10913if { (ac_try="$ac_compile"
10914case "(($ac_try" in
10915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10916 *) ac_try_echo=$ac_try;;
10917esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010919 (eval "$ac_compile") 2>conftest.er1
10920 ac_status=$?
10921 grep -v '^ *+' conftest.er1 >conftest.err
10922 rm -f conftest.er1
10923 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010925 (exit $ac_status); } && {
10926 test -z "$ac_c_werror_flag" ||
10927 test ! -s conftest.err
10928 } && test -s conftest.$ac_objext; then
10929 ac_lo=$ac_mid; break
10930else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010931 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010932sed 's/^/| /' conftest.$ac_ext >&5
10933
10934 ac_hi=`expr '(' $ac_mid ')' - 1`
10935 if test $ac_mid -le $ac_hi; then
10936 ac_lo= ac_hi=
10937 break
10938 fi
10939 ac_mid=`expr 2 '*' $ac_mid`
10940fi
10941
10942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10943 done
10944else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010945 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010946sed 's/^/| /' conftest.$ac_ext >&5
10947
10948 ac_lo= ac_hi=
10949fi
10950
10951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10952fi
10953
10954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10955# Binary search between lo and hi bounds.
10956while test "x$ac_lo" != "x$ac_hi"; do
10957 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10958 cat >conftest.$ac_ext <<_ACEOF
10959/* confdefs.h. */
10960_ACEOF
10961cat confdefs.h >>conftest.$ac_ext
10962cat >>conftest.$ac_ext <<_ACEOF
10963/* end confdefs.h. */
10964$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010965 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010966int
10967main ()
10968{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010969static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010970test_array [0] = 0
10971
10972 ;
10973 return 0;
10974}
10975_ACEOF
10976rm -f conftest.$ac_objext
10977if { (ac_try="$ac_compile"
10978case "(($ac_try" in
10979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10980 *) ac_try_echo=$ac_try;;
10981esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010983 (eval "$ac_compile") 2>conftest.er1
10984 ac_status=$?
10985 grep -v '^ *+' conftest.er1 >conftest.err
10986 rm -f conftest.er1
10987 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010989 (exit $ac_status); } && {
10990 test -z "$ac_c_werror_flag" ||
10991 test ! -s conftest.err
10992 } && test -s conftest.$ac_objext; then
10993 ac_hi=$ac_mid
10994else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010995 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010996sed 's/^/| /' conftest.$ac_ext >&5
10997
10998 ac_lo=`expr '(' $ac_mid ')' + 1`
10999fi
11000
11001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11002done
11003case $ac_lo in
11004?*) ac_cv_sizeof_pid_t=$ac_lo;;
11005'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011006 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011007See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011008echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011009See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011010 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011011 else
11012 ac_cv_sizeof_pid_t=0
11013 fi ;;
11014esac
11015else
11016 cat >conftest.$ac_ext <<_ACEOF
11017/* confdefs.h. */
11018_ACEOF
11019cat confdefs.h >>conftest.$ac_ext
11020cat >>conftest.$ac_ext <<_ACEOF
11021/* end confdefs.h. */
11022$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011023 typedef pid_t ac__type_sizeof_;
11024static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11025static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011026#include <stdio.h>
11027#include <stdlib.h>
11028int
11029main ()
11030{
11031
11032 FILE *f = fopen ("conftest.val", "w");
11033 if (! f)
11034 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011035 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011036 {
11037 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011038 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011039 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011040 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011041 }
11042 else
11043 {
11044 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011045 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011046 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011047 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011048 }
11049 return ferror (f) || fclose (f) != 0;
11050
11051 ;
11052 return 0;
11053}
11054_ACEOF
11055rm -f conftest$ac_exeext
11056if { (ac_try="$ac_link"
11057case "(($ac_try" in
11058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11059 *) ac_try_echo=$ac_try;;
11060esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011062 (eval "$ac_link") 2>&5
11063 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011065 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11066 { (case "(($ac_try" in
11067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11068 *) ac_try_echo=$ac_try;;
11069esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011071 (eval "$ac_try") 2>&5
11072 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011074 (exit $ac_status); }; }; then
11075 ac_cv_sizeof_pid_t=`cat conftest.val`
11076else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011077 echo "$as_me: program exited with status $ac_status" >&5
11078echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011079sed 's/^/| /' conftest.$ac_ext >&5
11080
11081( exit $ac_status )
11082if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011083 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011084See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011085echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011086See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011087 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011088 else
11089 ac_cv_sizeof_pid_t=0
11090 fi
11091fi
11092rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11093fi
11094rm -f conftest.val
11095fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011096{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11097echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011098
11099
11100
11101cat >>confdefs.h <<_ACEOF
11102#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11103_ACEOF
11104
11105
Michael W. Hudson54241132001-12-07 15:38:26 +000011106
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011107{ echo "$as_me:$LINENO: checking for long long support" >&5
11108echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011109have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011110cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011111/* confdefs.h. */
11112_ACEOF
11113cat confdefs.h >>conftest.$ac_ext
11114cat >>conftest.$ac_ext <<_ACEOF
11115/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011116
Martin v. Löwis11437992002-04-12 09:54:03 +000011117int
11118main ()
11119{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011120long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011121 ;
11122 return 0;
11123}
11124_ACEOF
11125rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011126if { (ac_try="$ac_compile"
11127case "(($ac_try" in
11128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11129 *) ac_try_echo=$ac_try;;
11130esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011132 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011133 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011134 grep -v '^ *+' conftest.er1 >conftest.err
11135 rm -f conftest.er1
11136 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011138 (exit $ac_status); } && {
11139 test -z "$ac_c_werror_flag" ||
11140 test ! -s conftest.err
11141 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011142
11143
11144cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011145#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011146_ACEOF
11147
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011148 have_long_long=yes
11149
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011150else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011152sed 's/^/| /' conftest.$ac_ext >&5
11153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011154
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011156
11157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011158{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11159echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011160if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011161{ echo "$as_me:$LINENO: checking for long long" >&5
11162echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11163if test "${ac_cv_type_long_long+set}" = set; then
11164 echo $ECHO_N "(cached) $ECHO_C" >&6
11165else
11166 cat >conftest.$ac_ext <<_ACEOF
11167/* confdefs.h. */
11168_ACEOF
11169cat confdefs.h >>conftest.$ac_ext
11170cat >>conftest.$ac_ext <<_ACEOF
11171/* end confdefs.h. */
11172$ac_includes_default
11173typedef long long ac__type_new_;
11174int
11175main ()
11176{
11177if ((ac__type_new_ *) 0)
11178 return 0;
11179if (sizeof (ac__type_new_))
11180 return 0;
11181 ;
11182 return 0;
11183}
11184_ACEOF
11185rm -f conftest.$ac_objext
11186if { (ac_try="$ac_compile"
11187case "(($ac_try" in
11188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11189 *) ac_try_echo=$ac_try;;
11190esac
11191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11192 (eval "$ac_compile") 2>conftest.er1
11193 ac_status=$?
11194 grep -v '^ *+' conftest.er1 >conftest.err
11195 rm -f conftest.er1
11196 cat conftest.err >&5
11197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11198 (exit $ac_status); } && {
11199 test -z "$ac_c_werror_flag" ||
11200 test ! -s conftest.err
11201 } && test -s conftest.$ac_objext; then
11202 ac_cv_type_long_long=yes
11203else
11204 echo "$as_me: failed program was:" >&5
11205sed 's/^/| /' conftest.$ac_ext >&5
11206
11207 ac_cv_type_long_long=no
11208fi
11209
11210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11211fi
11212{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11213echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011215# The cast to long int works around a bug in the HP C Compiler
11216# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11217# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11218# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011219{ echo "$as_me:$LINENO: checking size of long long" >&5
11220echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011221if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011222 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011223else
Martin v. Löwis11437992002-04-12 09:54:03 +000011224 if test "$cross_compiling" = yes; then
11225 # Depending upon the size, compute the lo and hi bounds.
11226cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011227/* confdefs.h. */
11228_ACEOF
11229cat confdefs.h >>conftest.$ac_ext
11230cat >>conftest.$ac_ext <<_ACEOF
11231/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011232$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011233 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011234int
11235main ()
11236{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011237static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011238test_array [0] = 0
11239
11240 ;
11241 return 0;
11242}
11243_ACEOF
11244rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011245if { (ac_try="$ac_compile"
11246case "(($ac_try" in
11247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11248 *) ac_try_echo=$ac_try;;
11249esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011251 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011252 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011253 grep -v '^ *+' conftest.er1 >conftest.err
11254 rm -f conftest.er1
11255 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011257 (exit $ac_status); } && {
11258 test -z "$ac_c_werror_flag" ||
11259 test ! -s conftest.err
11260 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011261 ac_lo=0 ac_mid=0
11262 while :; do
11263 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011264/* confdefs.h. */
11265_ACEOF
11266cat confdefs.h >>conftest.$ac_ext
11267cat >>conftest.$ac_ext <<_ACEOF
11268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011269$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011270 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011271int
11272main ()
11273{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011274static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011275test_array [0] = 0
11276
11277 ;
11278 return 0;
11279}
11280_ACEOF
11281rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011282if { (ac_try="$ac_compile"
11283case "(($ac_try" in
11284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11285 *) ac_try_echo=$ac_try;;
11286esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011288 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011289 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011290 grep -v '^ *+' conftest.er1 >conftest.err
11291 rm -f conftest.er1
11292 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011294 (exit $ac_status); } && {
11295 test -z "$ac_c_werror_flag" ||
11296 test ! -s conftest.err
11297 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011298 ac_hi=$ac_mid; break
11299else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011300 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011301sed 's/^/| /' conftest.$ac_ext >&5
11302
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011303 ac_lo=`expr $ac_mid + 1`
11304 if test $ac_lo -le $ac_mid; then
11305 ac_lo= ac_hi=
11306 break
11307 fi
11308 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011310
11311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011312 done
11313else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011315sed 's/^/| /' conftest.$ac_ext >&5
11316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011317 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011318/* confdefs.h. */
11319_ACEOF
11320cat confdefs.h >>conftest.$ac_ext
11321cat >>conftest.$ac_ext <<_ACEOF
11322/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011323$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011324 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011325int
11326main ()
11327{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011328static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011329test_array [0] = 0
11330
11331 ;
11332 return 0;
11333}
11334_ACEOF
11335rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011336if { (ac_try="$ac_compile"
11337case "(($ac_try" in
11338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11339 *) ac_try_echo=$ac_try;;
11340esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011342 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011343 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011344 grep -v '^ *+' conftest.er1 >conftest.err
11345 rm -f conftest.er1
11346 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011348 (exit $ac_status); } && {
11349 test -z "$ac_c_werror_flag" ||
11350 test ! -s conftest.err
11351 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011352 ac_hi=-1 ac_mid=-1
11353 while :; do
11354 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011355/* confdefs.h. */
11356_ACEOF
11357cat confdefs.h >>conftest.$ac_ext
11358cat >>conftest.$ac_ext <<_ACEOF
11359/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011360$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011361 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011362int
11363main ()
11364{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011365static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011366test_array [0] = 0
11367
11368 ;
11369 return 0;
11370}
11371_ACEOF
11372rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011373if { (ac_try="$ac_compile"
11374case "(($ac_try" in
11375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11376 *) ac_try_echo=$ac_try;;
11377esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011379 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011380 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011381 grep -v '^ *+' conftest.er1 >conftest.err
11382 rm -f conftest.er1
11383 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011385 (exit $ac_status); } && {
11386 test -z "$ac_c_werror_flag" ||
11387 test ! -s conftest.err
11388 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011389 ac_lo=$ac_mid; break
11390else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011392sed 's/^/| /' conftest.$ac_ext >&5
11393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011394 ac_hi=`expr '(' $ac_mid ')' - 1`
11395 if test $ac_mid -le $ac_hi; then
11396 ac_lo= ac_hi=
11397 break
11398 fi
11399 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011401
11402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011403 done
11404else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011405 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011406sed 's/^/| /' conftest.$ac_ext >&5
11407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011408 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011410
11411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +000011415# Binary search between lo and hi bounds.
11416while test "x$ac_lo" != "x$ac_hi"; do
11417 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11418 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011419/* confdefs.h. */
11420_ACEOF
11421cat confdefs.h >>conftest.$ac_ext
11422cat >>conftest.$ac_ext <<_ACEOF
11423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011424$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011425 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011426int
11427main ()
11428{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011429static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011430test_array [0] = 0
11431
11432 ;
11433 return 0;
11434}
11435_ACEOF
11436rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011437if { (ac_try="$ac_compile"
11438case "(($ac_try" in
11439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11440 *) ac_try_echo=$ac_try;;
11441esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011443 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011445 grep -v '^ *+' conftest.er1 >conftest.err
11446 rm -f conftest.er1
11447 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011449 (exit $ac_status); } && {
11450 test -z "$ac_c_werror_flag" ||
11451 test ! -s conftest.err
11452 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011453 ac_hi=$ac_mid
11454else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011456sed 's/^/| /' conftest.$ac_ext >&5
11457
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011458 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011460
11461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011462done
11463case $ac_lo in
11464?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011465'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011466 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011467See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011468echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011469See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011470 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011471 else
11472 ac_cv_sizeof_long_long=0
11473 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011474esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011475else
Martin v. Löwis11437992002-04-12 09:54:03 +000011476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011477/* confdefs.h. */
11478_ACEOF
11479cat confdefs.h >>conftest.$ac_ext
11480cat >>conftest.$ac_ext <<_ACEOF
11481/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011482$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011483 typedef long long ac__type_sizeof_;
11484static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11485static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011486#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011487#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011488int
11489main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011490{
Martin v. Löwis11437992002-04-12 09:54:03 +000011491
11492 FILE *f = fopen ("conftest.val", "w");
11493 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011494 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011495 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011496 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011497 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011498 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011499 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011500 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011501 }
11502 else
11503 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011504 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011505 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011506 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011507 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011508 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011509 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011510
11511 ;
11512 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011513}
Martin v. Löwis11437992002-04-12 09:54:03 +000011514_ACEOF
11515rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011516if { (ac_try="$ac_link"
11517case "(($ac_try" in
11518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11519 *) ac_try_echo=$ac_try;;
11520esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011522 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011523 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011525 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011526 { (case "(($ac_try" in
11527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11528 *) ac_try_echo=$ac_try;;
11529esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011531 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011532 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011534 (exit $ac_status); }; }; then
11535 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011536else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011537 echo "$as_me: program exited with status $ac_status" >&5
11538echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011539sed 's/^/| /' conftest.$ac_ext >&5
11540
Martin v. Löwis11437992002-04-12 09:54:03 +000011541( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011542if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011543 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011544See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011545echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011546See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011547 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011548 else
11549 ac_cv_sizeof_long_long=0
11550 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011551fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011552rm -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 +000011553fi
11554rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011555fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011556{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11557echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011558
11559
11560
Martin v. Löwis11437992002-04-12 09:54:03 +000011561cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011562#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011563_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011564
Michael W. Hudson54241132001-12-07 15:38:26 +000011565
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011566fi
11567
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011568{ echo "$as_me:$LINENO: checking for long double support" >&5
11569echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011570have_long_double=no
11571cat >conftest.$ac_ext <<_ACEOF
11572/* confdefs.h. */
11573_ACEOF
11574cat confdefs.h >>conftest.$ac_ext
11575cat >>conftest.$ac_ext <<_ACEOF
11576/* end confdefs.h. */
11577
11578int
11579main ()
11580{
11581long double x; x = (long double)0;
11582 ;
11583 return 0;
11584}
11585_ACEOF
11586rm -f conftest.$ac_objext
11587if { (ac_try="$ac_compile"
11588case "(($ac_try" in
11589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11590 *) ac_try_echo=$ac_try;;
11591esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011593 (eval "$ac_compile") 2>conftest.er1
11594 ac_status=$?
11595 grep -v '^ *+' conftest.er1 >conftest.err
11596 rm -f conftest.er1
11597 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011599 (exit $ac_status); } && {
11600 test -z "$ac_c_werror_flag" ||
11601 test ! -s conftest.err
11602 } && test -s conftest.$ac_objext; then
11603
11604
11605cat >>confdefs.h <<\_ACEOF
11606#define HAVE_LONG_DOUBLE 1
11607_ACEOF
11608
11609 have_long_double=yes
11610
11611else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011612 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011613sed 's/^/| /' conftest.$ac_ext >&5
11614
11615
11616fi
11617
11618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011619{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11620echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011621if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011622{ echo "$as_me:$LINENO: checking for long double" >&5
11623echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11624if test "${ac_cv_type_long_double+set}" = set; then
11625 echo $ECHO_N "(cached) $ECHO_C" >&6
11626else
11627 cat >conftest.$ac_ext <<_ACEOF
11628/* confdefs.h. */
11629_ACEOF
11630cat confdefs.h >>conftest.$ac_ext
11631cat >>conftest.$ac_ext <<_ACEOF
11632/* end confdefs.h. */
11633$ac_includes_default
11634typedef long double ac__type_new_;
11635int
11636main ()
11637{
11638if ((ac__type_new_ *) 0)
11639 return 0;
11640if (sizeof (ac__type_new_))
11641 return 0;
11642 ;
11643 return 0;
11644}
11645_ACEOF
11646rm -f conftest.$ac_objext
11647if { (ac_try="$ac_compile"
11648case "(($ac_try" in
11649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11650 *) ac_try_echo=$ac_try;;
11651esac
11652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11653 (eval "$ac_compile") 2>conftest.er1
11654 ac_status=$?
11655 grep -v '^ *+' conftest.er1 >conftest.err
11656 rm -f conftest.er1
11657 cat conftest.err >&5
11658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11659 (exit $ac_status); } && {
11660 test -z "$ac_c_werror_flag" ||
11661 test ! -s conftest.err
11662 } && test -s conftest.$ac_objext; then
11663 ac_cv_type_long_double=yes
11664else
11665 echo "$as_me: failed program was:" >&5
11666sed 's/^/| /' conftest.$ac_ext >&5
11667
11668 ac_cv_type_long_double=no
11669fi
11670
11671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11672fi
11673{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11674echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11675
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011676# The cast to long int works around a bug in the HP C Compiler
11677# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11678# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11679# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011680{ echo "$as_me:$LINENO: checking size of long double" >&5
11681echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011682if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011683 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011684else
11685 if test "$cross_compiling" = yes; then
11686 # Depending upon the size, compute the lo and hi bounds.
11687cat >conftest.$ac_ext <<_ACEOF
11688/* confdefs.h. */
11689_ACEOF
11690cat confdefs.h >>conftest.$ac_ext
11691cat >>conftest.$ac_ext <<_ACEOF
11692/* end confdefs.h. */
11693$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011694 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011695int
11696main ()
11697{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011698static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011699test_array [0] = 0
11700
11701 ;
11702 return 0;
11703}
11704_ACEOF
11705rm -f conftest.$ac_objext
11706if { (ac_try="$ac_compile"
11707case "(($ac_try" in
11708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11709 *) ac_try_echo=$ac_try;;
11710esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011712 (eval "$ac_compile") 2>conftest.er1
11713 ac_status=$?
11714 grep -v '^ *+' conftest.er1 >conftest.err
11715 rm -f conftest.er1
11716 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011718 (exit $ac_status); } && {
11719 test -z "$ac_c_werror_flag" ||
11720 test ! -s conftest.err
11721 } && test -s conftest.$ac_objext; then
11722 ac_lo=0 ac_mid=0
11723 while :; do
11724 cat >conftest.$ac_ext <<_ACEOF
11725/* confdefs.h. */
11726_ACEOF
11727cat confdefs.h >>conftest.$ac_ext
11728cat >>conftest.$ac_ext <<_ACEOF
11729/* end confdefs.h. */
11730$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011731 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011732int
11733main ()
11734{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011735static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011736test_array [0] = 0
11737
11738 ;
11739 return 0;
11740}
11741_ACEOF
11742rm -f conftest.$ac_objext
11743if { (ac_try="$ac_compile"
11744case "(($ac_try" in
11745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11746 *) ac_try_echo=$ac_try;;
11747esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011749 (eval "$ac_compile") 2>conftest.er1
11750 ac_status=$?
11751 grep -v '^ *+' conftest.er1 >conftest.err
11752 rm -f conftest.er1
11753 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011755 (exit $ac_status); } && {
11756 test -z "$ac_c_werror_flag" ||
11757 test ! -s conftest.err
11758 } && test -s conftest.$ac_objext; then
11759 ac_hi=$ac_mid; break
11760else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011761 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011762sed 's/^/| /' conftest.$ac_ext >&5
11763
11764 ac_lo=`expr $ac_mid + 1`
11765 if test $ac_lo -le $ac_mid; then
11766 ac_lo= ac_hi=
11767 break
11768 fi
11769 ac_mid=`expr 2 '*' $ac_mid + 1`
11770fi
11771
11772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11773 done
11774else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011775 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011776sed 's/^/| /' conftest.$ac_ext >&5
11777
11778 cat >conftest.$ac_ext <<_ACEOF
11779/* confdefs.h. */
11780_ACEOF
11781cat confdefs.h >>conftest.$ac_ext
11782cat >>conftest.$ac_ext <<_ACEOF
11783/* end confdefs.h. */
11784$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011785 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011786int
11787main ()
11788{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011789static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011790test_array [0] = 0
11791
11792 ;
11793 return 0;
11794}
11795_ACEOF
11796rm -f conftest.$ac_objext
11797if { (ac_try="$ac_compile"
11798case "(($ac_try" in
11799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11800 *) ac_try_echo=$ac_try;;
11801esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011803 (eval "$ac_compile") 2>conftest.er1
11804 ac_status=$?
11805 grep -v '^ *+' conftest.er1 >conftest.err
11806 rm -f conftest.er1
11807 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011809 (exit $ac_status); } && {
11810 test -z "$ac_c_werror_flag" ||
11811 test ! -s conftest.err
11812 } && test -s conftest.$ac_objext; then
11813 ac_hi=-1 ac_mid=-1
11814 while :; do
11815 cat >conftest.$ac_ext <<_ACEOF
11816/* confdefs.h. */
11817_ACEOF
11818cat confdefs.h >>conftest.$ac_ext
11819cat >>conftest.$ac_ext <<_ACEOF
11820/* end confdefs.h. */
11821$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011822 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011823int
11824main ()
11825{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011826static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011827test_array [0] = 0
11828
11829 ;
11830 return 0;
11831}
11832_ACEOF
11833rm -f conftest.$ac_objext
11834if { (ac_try="$ac_compile"
11835case "(($ac_try" in
11836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11837 *) ac_try_echo=$ac_try;;
11838esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011840 (eval "$ac_compile") 2>conftest.er1
11841 ac_status=$?
11842 grep -v '^ *+' conftest.er1 >conftest.err
11843 rm -f conftest.er1
11844 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011846 (exit $ac_status); } && {
11847 test -z "$ac_c_werror_flag" ||
11848 test ! -s conftest.err
11849 } && test -s conftest.$ac_objext; then
11850 ac_lo=$ac_mid; break
11851else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011852 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011853sed 's/^/| /' conftest.$ac_ext >&5
11854
11855 ac_hi=`expr '(' $ac_mid ')' - 1`
11856 if test $ac_mid -le $ac_hi; then
11857 ac_lo= ac_hi=
11858 break
11859 fi
11860 ac_mid=`expr 2 '*' $ac_mid`
11861fi
11862
11863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11864 done
11865else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011866 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011867sed 's/^/| /' conftest.$ac_ext >&5
11868
11869 ac_lo= ac_hi=
11870fi
11871
11872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11873fi
11874
11875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11876# Binary search between lo and hi bounds.
11877while test "x$ac_lo" != "x$ac_hi"; do
11878 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11879 cat >conftest.$ac_ext <<_ACEOF
11880/* confdefs.h. */
11881_ACEOF
11882cat confdefs.h >>conftest.$ac_ext
11883cat >>conftest.$ac_ext <<_ACEOF
11884/* end confdefs.h. */
11885$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011886 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011887int
11888main ()
11889{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011890static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011891test_array [0] = 0
11892
11893 ;
11894 return 0;
11895}
11896_ACEOF
11897rm -f conftest.$ac_objext
11898if { (ac_try="$ac_compile"
11899case "(($ac_try" in
11900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11901 *) ac_try_echo=$ac_try;;
11902esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011904 (eval "$ac_compile") 2>conftest.er1
11905 ac_status=$?
11906 grep -v '^ *+' conftest.er1 >conftest.err
11907 rm -f conftest.er1
11908 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011910 (exit $ac_status); } && {
11911 test -z "$ac_c_werror_flag" ||
11912 test ! -s conftest.err
11913 } && test -s conftest.$ac_objext; then
11914 ac_hi=$ac_mid
11915else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011916 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011917sed 's/^/| /' conftest.$ac_ext >&5
11918
11919 ac_lo=`expr '(' $ac_mid ')' + 1`
11920fi
11921
11922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11923done
11924case $ac_lo in
11925?*) ac_cv_sizeof_long_double=$ac_lo;;
11926'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011927 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011928See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011929echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011930See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011931 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011932 else
11933 ac_cv_sizeof_long_double=0
11934 fi ;;
11935esac
11936else
11937 cat >conftest.$ac_ext <<_ACEOF
11938/* confdefs.h. */
11939_ACEOF
11940cat confdefs.h >>conftest.$ac_ext
11941cat >>conftest.$ac_ext <<_ACEOF
11942/* end confdefs.h. */
11943$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011944 typedef long double ac__type_sizeof_;
11945static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11946static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011947#include <stdio.h>
11948#include <stdlib.h>
11949int
11950main ()
11951{
11952
11953 FILE *f = fopen ("conftest.val", "w");
11954 if (! f)
11955 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011956 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011957 {
11958 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011959 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011960 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011961 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011962 }
11963 else
11964 {
11965 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011966 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011967 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011968 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011969 }
11970 return ferror (f) || fclose (f) != 0;
11971
11972 ;
11973 return 0;
11974}
11975_ACEOF
11976rm -f conftest$ac_exeext
11977if { (ac_try="$ac_link"
11978case "(($ac_try" in
11979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11980 *) ac_try_echo=$ac_try;;
11981esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011983 (eval "$ac_link") 2>&5
11984 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011986 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11987 { (case "(($ac_try" in
11988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11989 *) ac_try_echo=$ac_try;;
11990esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011992 (eval "$ac_try") 2>&5
11993 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011995 (exit $ac_status); }; }; then
11996 ac_cv_sizeof_long_double=`cat conftest.val`
11997else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011998 echo "$as_me: program exited with status $ac_status" >&5
11999echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012000sed 's/^/| /' conftest.$ac_ext >&5
12001
12002( exit $ac_status )
12003if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012004 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012005See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012006echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012007See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012008 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012009 else
12010 ac_cv_sizeof_long_double=0
12011 fi
12012fi
12013rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12014fi
12015rm -f conftest.val
12016fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012017{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12018echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012019
12020
12021
12022cat >>confdefs.h <<_ACEOF
12023#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12024_ACEOF
12025
12026
12027fi
12028
12029
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012030{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12031echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012032have_c99_bool=no
12033cat >conftest.$ac_ext <<_ACEOF
12034/* confdefs.h. */
12035_ACEOF
12036cat confdefs.h >>conftest.$ac_ext
12037cat >>conftest.$ac_ext <<_ACEOF
12038/* end confdefs.h. */
12039
12040int
12041main ()
12042{
12043_Bool x; x = (_Bool)0;
12044 ;
12045 return 0;
12046}
12047_ACEOF
12048rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012049if { (ac_try="$ac_compile"
12050case "(($ac_try" in
12051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12052 *) ac_try_echo=$ac_try;;
12053esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012055 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012056 ac_status=$?
12057 grep -v '^ *+' conftest.er1 >conftest.err
12058 rm -f conftest.er1
12059 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012061 (exit $ac_status); } && {
12062 test -z "$ac_c_werror_flag" ||
12063 test ! -s conftest.err
12064 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012065
12066
12067cat >>confdefs.h <<\_ACEOF
12068#define HAVE_C99_BOOL 1
12069_ACEOF
12070
12071 have_c99_bool=yes
12072
12073else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012074 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012075sed 's/^/| /' conftest.$ac_ext >&5
12076
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012077
Thomas Woutersb2137042007-02-01 18:02:27 +000012078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012079
12080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012081{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12082echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012083if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012084{ echo "$as_me:$LINENO: checking for _Bool" >&5
12085echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12086if test "${ac_cv_type__Bool+set}" = set; then
12087 echo $ECHO_N "(cached) $ECHO_C" >&6
12088else
12089 cat >conftest.$ac_ext <<_ACEOF
12090/* confdefs.h. */
12091_ACEOF
12092cat confdefs.h >>conftest.$ac_ext
12093cat >>conftest.$ac_ext <<_ACEOF
12094/* end confdefs.h. */
12095$ac_includes_default
12096typedef _Bool ac__type_new_;
12097int
12098main ()
12099{
12100if ((ac__type_new_ *) 0)
12101 return 0;
12102if (sizeof (ac__type_new_))
12103 return 0;
12104 ;
12105 return 0;
12106}
12107_ACEOF
12108rm -f conftest.$ac_objext
12109if { (ac_try="$ac_compile"
12110case "(($ac_try" in
12111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12112 *) ac_try_echo=$ac_try;;
12113esac
12114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12115 (eval "$ac_compile") 2>conftest.er1
12116 ac_status=$?
12117 grep -v '^ *+' conftest.er1 >conftest.err
12118 rm -f conftest.er1
12119 cat conftest.err >&5
12120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12121 (exit $ac_status); } && {
12122 test -z "$ac_c_werror_flag" ||
12123 test ! -s conftest.err
12124 } && test -s conftest.$ac_objext; then
12125 ac_cv_type__Bool=yes
12126else
12127 echo "$as_me: failed program was:" >&5
12128sed 's/^/| /' conftest.$ac_ext >&5
12129
12130 ac_cv_type__Bool=no
12131fi
12132
12133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12134fi
12135{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12136echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012138# The cast to long int works around a bug in the HP C Compiler
12139# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12140# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12141# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012142{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12143echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012144if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012145 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012146else
12147 if test "$cross_compiling" = yes; then
12148 # Depending upon the size, compute the lo and hi bounds.
12149cat >conftest.$ac_ext <<_ACEOF
12150/* confdefs.h. */
12151_ACEOF
12152cat confdefs.h >>conftest.$ac_ext
12153cat >>conftest.$ac_ext <<_ACEOF
12154/* end confdefs.h. */
12155$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012156 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012157int
12158main ()
12159{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012160static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012161test_array [0] = 0
12162
12163 ;
12164 return 0;
12165}
12166_ACEOF
12167rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012168if { (ac_try="$ac_compile"
12169case "(($ac_try" in
12170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12171 *) ac_try_echo=$ac_try;;
12172esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012174 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012175 ac_status=$?
12176 grep -v '^ *+' conftest.er1 >conftest.err
12177 rm -f conftest.er1
12178 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012180 (exit $ac_status); } && {
12181 test -z "$ac_c_werror_flag" ||
12182 test ! -s conftest.err
12183 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012184 ac_lo=0 ac_mid=0
12185 while :; do
12186 cat >conftest.$ac_ext <<_ACEOF
12187/* confdefs.h. */
12188_ACEOF
12189cat confdefs.h >>conftest.$ac_ext
12190cat >>conftest.$ac_ext <<_ACEOF
12191/* end confdefs.h. */
12192$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012193 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012194int
12195main ()
12196{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012197static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012198test_array [0] = 0
12199
12200 ;
12201 return 0;
12202}
12203_ACEOF
12204rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012205if { (ac_try="$ac_compile"
12206case "(($ac_try" in
12207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12208 *) ac_try_echo=$ac_try;;
12209esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012211 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012212 ac_status=$?
12213 grep -v '^ *+' conftest.er1 >conftest.err
12214 rm -f conftest.er1
12215 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012217 (exit $ac_status); } && {
12218 test -z "$ac_c_werror_flag" ||
12219 test ! -s conftest.err
12220 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012221 ac_hi=$ac_mid; break
12222else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012223 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012224sed 's/^/| /' conftest.$ac_ext >&5
12225
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012226 ac_lo=`expr $ac_mid + 1`
12227 if test $ac_lo -le $ac_mid; then
12228 ac_lo= ac_hi=
12229 break
12230 fi
12231 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012233
12234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012235 done
12236else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012237 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012238sed 's/^/| /' conftest.$ac_ext >&5
12239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012240 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012241/* confdefs.h. */
12242_ACEOF
12243cat confdefs.h >>conftest.$ac_ext
12244cat >>conftest.$ac_ext <<_ACEOF
12245/* end confdefs.h. */
12246$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012247 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012248int
12249main ()
12250{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012251static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012252test_array [0] = 0
12253
12254 ;
12255 return 0;
12256}
12257_ACEOF
12258rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012259if { (ac_try="$ac_compile"
12260case "(($ac_try" in
12261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12262 *) ac_try_echo=$ac_try;;
12263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012265 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012266 ac_status=$?
12267 grep -v '^ *+' conftest.er1 >conftest.err
12268 rm -f conftest.er1
12269 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012271 (exit $ac_status); } && {
12272 test -z "$ac_c_werror_flag" ||
12273 test ! -s conftest.err
12274 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012275 ac_hi=-1 ac_mid=-1
12276 while :; do
12277 cat >conftest.$ac_ext <<_ACEOF
12278/* confdefs.h. */
12279_ACEOF
12280cat confdefs.h >>conftest.$ac_ext
12281cat >>conftest.$ac_ext <<_ACEOF
12282/* end confdefs.h. */
12283$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012284 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012285int
12286main ()
12287{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012288static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012289test_array [0] = 0
12290
12291 ;
12292 return 0;
12293}
12294_ACEOF
12295rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012296if { (ac_try="$ac_compile"
12297case "(($ac_try" in
12298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12299 *) ac_try_echo=$ac_try;;
12300esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012302 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012303 ac_status=$?
12304 grep -v '^ *+' conftest.er1 >conftest.err
12305 rm -f conftest.er1
12306 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012308 (exit $ac_status); } && {
12309 test -z "$ac_c_werror_flag" ||
12310 test ! -s conftest.err
12311 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012312 ac_lo=$ac_mid; break
12313else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012314 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012315sed 's/^/| /' conftest.$ac_ext >&5
12316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012317 ac_hi=`expr '(' $ac_mid ')' - 1`
12318 if test $ac_mid -le $ac_hi; then
12319 ac_lo= ac_hi=
12320 break
12321 fi
12322 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012324
12325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012326 done
12327else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012328 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012329sed 's/^/| /' conftest.$ac_ext >&5
12330
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012331 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012333
12334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +000012338# Binary search between lo and hi bounds.
12339while test "x$ac_lo" != "x$ac_hi"; do
12340 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12341 cat >conftest.$ac_ext <<_ACEOF
12342/* confdefs.h. */
12343_ACEOF
12344cat confdefs.h >>conftest.$ac_ext
12345cat >>conftest.$ac_ext <<_ACEOF
12346/* end confdefs.h. */
12347$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012348 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012349int
12350main ()
12351{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012352static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012353test_array [0] = 0
12354
12355 ;
12356 return 0;
12357}
12358_ACEOF
12359rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012360if { (ac_try="$ac_compile"
12361case "(($ac_try" in
12362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12363 *) ac_try_echo=$ac_try;;
12364esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012366 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012367 ac_status=$?
12368 grep -v '^ *+' conftest.er1 >conftest.err
12369 rm -f conftest.er1
12370 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012372 (exit $ac_status); } && {
12373 test -z "$ac_c_werror_flag" ||
12374 test ! -s conftest.err
12375 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012376 ac_hi=$ac_mid
12377else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012378 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012379sed 's/^/| /' conftest.$ac_ext >&5
12380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012381 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012383
12384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012385done
12386case $ac_lo in
12387?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012388'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012389 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012390See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012391echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012392See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012393 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012394 else
12395 ac_cv_sizeof__Bool=0
12396 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012397esac
12398else
12399 cat >conftest.$ac_ext <<_ACEOF
12400/* confdefs.h. */
12401_ACEOF
12402cat confdefs.h >>conftest.$ac_ext
12403cat >>conftest.$ac_ext <<_ACEOF
12404/* end confdefs.h. */
12405$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012406 typedef _Bool ac__type_sizeof_;
12407static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12408static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012409#include <stdio.h>
12410#include <stdlib.h>
12411int
12412main ()
12413{
12414
12415 FILE *f = fopen ("conftest.val", "w");
12416 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012417 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012418 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012419 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012420 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012421 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012422 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012423 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012424 }
12425 else
12426 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012427 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012428 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012429 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012430 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012431 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012432 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012433
12434 ;
12435 return 0;
12436}
12437_ACEOF
12438rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012439if { (ac_try="$ac_link"
12440case "(($ac_try" in
12441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12442 *) ac_try_echo=$ac_try;;
12443esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012445 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012446 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012448 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012449 { (case "(($ac_try" in
12450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12451 *) ac_try_echo=$ac_try;;
12452esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012454 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012455 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012457 (exit $ac_status); }; }; then
12458 ac_cv_sizeof__Bool=`cat conftest.val`
12459else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012460 echo "$as_me: program exited with status $ac_status" >&5
12461echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012462sed 's/^/| /' conftest.$ac_ext >&5
12463
12464( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012466 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012467See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012468echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012469See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012470 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012471 else
12472 ac_cv_sizeof__Bool=0
12473 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012475rm -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 +000012476fi
12477rm -f conftest.val
12478fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012479{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12480echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012481
12482
12483
Thomas Woutersb2137042007-02-01 18:02:27 +000012484cat >>confdefs.h <<_ACEOF
12485#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12486_ACEOF
12487
12488
12489fi
12490
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012491{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12492echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012493if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012494 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012495else
12496 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012497/* confdefs.h. */
12498_ACEOF
12499cat confdefs.h >>conftest.$ac_ext
12500cat >>conftest.$ac_ext <<_ACEOF
12501/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012502#ifdef HAVE_STDINT_H
12503 #include <stdint.h>
12504 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012505
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012506typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012507int
12508main ()
12509{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012510if ((ac__type_new_ *) 0)
12511 return 0;
12512if (sizeof (ac__type_new_))
12513 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012514 ;
12515 return 0;
12516}
12517_ACEOF
12518rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012519if { (ac_try="$ac_compile"
12520case "(($ac_try" in
12521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12522 *) ac_try_echo=$ac_try;;
12523esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012525 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012526 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012527 grep -v '^ *+' conftest.er1 >conftest.err
12528 rm -f conftest.er1
12529 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012531 (exit $ac_status); } && {
12532 test -z "$ac_c_werror_flag" ||
12533 test ! -s conftest.err
12534 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012535 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012536else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012538sed 's/^/| /' conftest.$ac_ext >&5
12539
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012540 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012542
12543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012544fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012545{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12546echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12547if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012548
12549cat >>confdefs.h <<_ACEOF
12550#define HAVE_UINTPTR_T 1
12551_ACEOF
12552
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012553{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12554echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12555if test "${ac_cv_type_uintptr_t+set}" = set; then
12556 echo $ECHO_N "(cached) $ECHO_C" >&6
12557else
12558 cat >conftest.$ac_ext <<_ACEOF
12559/* confdefs.h. */
12560_ACEOF
12561cat confdefs.h >>conftest.$ac_ext
12562cat >>conftest.$ac_ext <<_ACEOF
12563/* end confdefs.h. */
12564$ac_includes_default
12565typedef uintptr_t ac__type_new_;
12566int
12567main ()
12568{
12569if ((ac__type_new_ *) 0)
12570 return 0;
12571if (sizeof (ac__type_new_))
12572 return 0;
12573 ;
12574 return 0;
12575}
12576_ACEOF
12577rm -f conftest.$ac_objext
12578if { (ac_try="$ac_compile"
12579case "(($ac_try" in
12580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12581 *) ac_try_echo=$ac_try;;
12582esac
12583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12584 (eval "$ac_compile") 2>conftest.er1
12585 ac_status=$?
12586 grep -v '^ *+' conftest.er1 >conftest.err
12587 rm -f conftest.er1
12588 cat conftest.err >&5
12589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12590 (exit $ac_status); } && {
12591 test -z "$ac_c_werror_flag" ||
12592 test ! -s conftest.err
12593 } && test -s conftest.$ac_objext; then
12594 ac_cv_type_uintptr_t=yes
12595else
12596 echo "$as_me: failed program was:" >&5
12597sed 's/^/| /' conftest.$ac_ext >&5
12598
12599 ac_cv_type_uintptr_t=no
12600fi
12601
12602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12603fi
12604{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12605echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12606
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012607# The cast to long int works around a bug in the HP C Compiler
12608# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12609# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12610# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012611{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12612echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012613if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012614 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012615else
Martin v. Löwis11437992002-04-12 09:54:03 +000012616 if test "$cross_compiling" = yes; then
12617 # Depending upon the size, compute the lo and hi bounds.
12618cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012619/* confdefs.h. */
12620_ACEOF
12621cat confdefs.h >>conftest.$ac_ext
12622cat >>conftest.$ac_ext <<_ACEOF
12623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012624$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012625 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012626int
12627main ()
12628{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012629static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012630test_array [0] = 0
12631
12632 ;
12633 return 0;
12634}
12635_ACEOF
12636rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012637if { (ac_try="$ac_compile"
12638case "(($ac_try" in
12639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12640 *) ac_try_echo=$ac_try;;
12641esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012643 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012645 grep -v '^ *+' conftest.er1 >conftest.err
12646 rm -f conftest.er1
12647 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012649 (exit $ac_status); } && {
12650 test -z "$ac_c_werror_flag" ||
12651 test ! -s conftest.err
12652 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012653 ac_lo=0 ac_mid=0
12654 while :; do
12655 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012656/* confdefs.h. */
12657_ACEOF
12658cat confdefs.h >>conftest.$ac_ext
12659cat >>conftest.$ac_ext <<_ACEOF
12660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012661$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012662 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012663int
12664main ()
12665{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012666static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012667test_array [0] = 0
12668
12669 ;
12670 return 0;
12671}
12672_ACEOF
12673rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012674if { (ac_try="$ac_compile"
12675case "(($ac_try" in
12676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12677 *) ac_try_echo=$ac_try;;
12678esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012680 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012682 grep -v '^ *+' conftest.er1 >conftest.err
12683 rm -f conftest.er1
12684 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012686 (exit $ac_status); } && {
12687 test -z "$ac_c_werror_flag" ||
12688 test ! -s conftest.err
12689 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012690 ac_hi=$ac_mid; break
12691else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012693sed 's/^/| /' conftest.$ac_ext >&5
12694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012695 ac_lo=`expr $ac_mid + 1`
12696 if test $ac_lo -le $ac_mid; then
12697 ac_lo= ac_hi=
12698 break
12699 fi
12700 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012702
12703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012704 done
12705else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012707sed 's/^/| /' conftest.$ac_ext >&5
12708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012710/* confdefs.h. */
12711_ACEOF
12712cat confdefs.h >>conftest.$ac_ext
12713cat >>conftest.$ac_ext <<_ACEOF
12714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012715$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012716 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012717int
12718main ()
12719{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012720static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012721test_array [0] = 0
12722
12723 ;
12724 return 0;
12725}
12726_ACEOF
12727rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012728if { (ac_try="$ac_compile"
12729case "(($ac_try" in
12730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12731 *) ac_try_echo=$ac_try;;
12732esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012734 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012736 grep -v '^ *+' conftest.er1 >conftest.err
12737 rm -f conftest.er1
12738 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012740 (exit $ac_status); } && {
12741 test -z "$ac_c_werror_flag" ||
12742 test ! -s conftest.err
12743 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012744 ac_hi=-1 ac_mid=-1
12745 while :; do
12746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012747/* confdefs.h. */
12748_ACEOF
12749cat confdefs.h >>conftest.$ac_ext
12750cat >>conftest.$ac_ext <<_ACEOF
12751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012752$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012753 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012754int
12755main ()
12756{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012757static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012758test_array [0] = 0
12759
12760 ;
12761 return 0;
12762}
12763_ACEOF
12764rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012765if { (ac_try="$ac_compile"
12766case "(($ac_try" in
12767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12768 *) ac_try_echo=$ac_try;;
12769esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012771 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012773 grep -v '^ *+' conftest.er1 >conftest.err
12774 rm -f conftest.er1
12775 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777 (exit $ac_status); } && {
12778 test -z "$ac_c_werror_flag" ||
12779 test ! -s conftest.err
12780 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012781 ac_lo=$ac_mid; break
12782else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012784sed 's/^/| /' conftest.$ac_ext >&5
12785
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012786 ac_hi=`expr '(' $ac_mid ')' - 1`
12787 if test $ac_mid -le $ac_hi; then
12788 ac_lo= ac_hi=
12789 break
12790 fi
12791 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012793
12794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012795 done
12796else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012798sed 's/^/| /' conftest.$ac_ext >&5
12799
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012800 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012802
12803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +000012807# Binary search between lo and hi bounds.
12808while test "x$ac_lo" != "x$ac_hi"; do
12809 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012811/* confdefs.h. */
12812_ACEOF
12813cat confdefs.h >>conftest.$ac_ext
12814cat >>conftest.$ac_ext <<_ACEOF
12815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012816$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012817 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012818int
12819main ()
12820{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012821static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012822test_array [0] = 0
12823
12824 ;
12825 return 0;
12826}
12827_ACEOF
12828rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012829if { (ac_try="$ac_compile"
12830case "(($ac_try" in
12831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12832 *) ac_try_echo=$ac_try;;
12833esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012835 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012836 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012837 grep -v '^ *+' conftest.er1 >conftest.err
12838 rm -f conftest.er1
12839 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012841 (exit $ac_status); } && {
12842 test -z "$ac_c_werror_flag" ||
12843 test ! -s conftest.err
12844 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012845 ac_hi=$ac_mid
12846else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012848sed 's/^/| /' conftest.$ac_ext >&5
12849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012850 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012852
12853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012854done
12855case $ac_lo in
12856?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012857'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012858 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012859See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012860echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012861See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012862 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012863 else
12864 ac_cv_sizeof_uintptr_t=0
12865 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012866esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012867else
Martin v. Löwis11437992002-04-12 09:54:03 +000012868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012869/* confdefs.h. */
12870_ACEOF
12871cat confdefs.h >>conftest.$ac_ext
12872cat >>conftest.$ac_ext <<_ACEOF
12873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012874$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012875 typedef uintptr_t ac__type_sizeof_;
12876static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12877static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012878#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012879#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012880int
12881main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012882{
Martin v. Löwis11437992002-04-12 09:54:03 +000012883
12884 FILE *f = fopen ("conftest.val", "w");
12885 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012886 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012887 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012888 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012889 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012890 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012891 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012892 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012893 }
12894 else
12895 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012896 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012897 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012898 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012899 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012900 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012901 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012902
12903 ;
12904 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012905}
Martin v. Löwis11437992002-04-12 09:54:03 +000012906_ACEOF
12907rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012908if { (ac_try="$ac_link"
12909case "(($ac_try" in
12910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12911 *) ac_try_echo=$ac_try;;
12912esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012914 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012915 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012917 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012918 { (case "(($ac_try" in
12919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12920 *) ac_try_echo=$ac_try;;
12921esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012923 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012926 (exit $ac_status); }; }; then
12927 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012928else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012929 echo "$as_me: program exited with status $ac_status" >&5
12930echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012931sed 's/^/| /' conftest.$ac_ext >&5
12932
Martin v. Löwis11437992002-04-12 09:54:03 +000012933( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012935 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012936See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012937echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012938See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012939 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012940 else
12941 ac_cv_sizeof_uintptr_t=0
12942 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012944rm -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 +000012945fi
12946rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012947fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012948{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12949echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012950
12951
12952
Martin v. Löwis11437992002-04-12 09:54:03 +000012953cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012954#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012955_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012956
Michael W. Hudson54241132001-12-07 15:38:26 +000012957
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012958fi
12959
Thomas Wouters89f507f2006-12-13 04:49:30 +000012960
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012961{ echo "$as_me:$LINENO: checking for off_t" >&5
12962echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
12963if test "${ac_cv_type_off_t+set}" = set; then
12964 echo $ECHO_N "(cached) $ECHO_C" >&6
12965else
12966 cat >conftest.$ac_ext <<_ACEOF
12967/* confdefs.h. */
12968_ACEOF
12969cat confdefs.h >>conftest.$ac_ext
12970cat >>conftest.$ac_ext <<_ACEOF
12971/* end confdefs.h. */
12972
12973#ifdef HAVE_SYS_TYPES_H
12974#include <sys/types.h>
12975#endif
12976
12977
12978typedef off_t ac__type_new_;
12979int
12980main ()
12981{
12982if ((ac__type_new_ *) 0)
12983 return 0;
12984if (sizeof (ac__type_new_))
12985 return 0;
12986 ;
12987 return 0;
12988}
12989_ACEOF
12990rm -f conftest.$ac_objext
12991if { (ac_try="$ac_compile"
12992case "(($ac_try" in
12993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12994 *) ac_try_echo=$ac_try;;
12995esac
12996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12997 (eval "$ac_compile") 2>conftest.er1
12998 ac_status=$?
12999 grep -v '^ *+' conftest.er1 >conftest.err
13000 rm -f conftest.er1
13001 cat conftest.err >&5
13002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13003 (exit $ac_status); } && {
13004 test -z "$ac_c_werror_flag" ||
13005 test ! -s conftest.err
13006 } && test -s conftest.$ac_objext; then
13007 ac_cv_type_off_t=yes
13008else
13009 echo "$as_me: failed program was:" >&5
13010sed 's/^/| /' conftest.$ac_ext >&5
13011
13012 ac_cv_type_off_t=no
13013fi
13014
13015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13016fi
13017{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13018echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13019
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013020# The cast to long int works around a bug in the HP C Compiler
13021# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13022# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13023# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013024{ echo "$as_me:$LINENO: checking size of off_t" >&5
13025echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013026if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013027 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013028else
13029 if test "$cross_compiling" = yes; then
13030 # Depending upon the size, compute the lo and hi bounds.
13031cat >conftest.$ac_ext <<_ACEOF
13032/* confdefs.h. */
13033_ACEOF
13034cat confdefs.h >>conftest.$ac_ext
13035cat >>conftest.$ac_ext <<_ACEOF
13036/* end confdefs.h. */
13037
13038#ifdef HAVE_SYS_TYPES_H
13039#include <sys/types.h>
13040#endif
13041
13042
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013043 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013044int
13045main ()
13046{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013047static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013048test_array [0] = 0
13049
13050 ;
13051 return 0;
13052}
13053_ACEOF
13054rm -f conftest.$ac_objext
13055if { (ac_try="$ac_compile"
13056case "(($ac_try" in
13057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13058 *) ac_try_echo=$ac_try;;
13059esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013061 (eval "$ac_compile") 2>conftest.er1
13062 ac_status=$?
13063 grep -v '^ *+' conftest.er1 >conftest.err
13064 rm -f conftest.er1
13065 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013067 (exit $ac_status); } && {
13068 test -z "$ac_c_werror_flag" ||
13069 test ! -s conftest.err
13070 } && test -s conftest.$ac_objext; then
13071 ac_lo=0 ac_mid=0
13072 while :; do
13073 cat >conftest.$ac_ext <<_ACEOF
13074/* confdefs.h. */
13075_ACEOF
13076cat confdefs.h >>conftest.$ac_ext
13077cat >>conftest.$ac_ext <<_ACEOF
13078/* end confdefs.h. */
13079
13080#ifdef HAVE_SYS_TYPES_H
13081#include <sys/types.h>
13082#endif
13083
13084
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013085 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013086int
13087main ()
13088{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013089static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013090test_array [0] = 0
13091
13092 ;
13093 return 0;
13094}
13095_ACEOF
13096rm -f conftest.$ac_objext
13097if { (ac_try="$ac_compile"
13098case "(($ac_try" in
13099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13100 *) ac_try_echo=$ac_try;;
13101esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013103 (eval "$ac_compile") 2>conftest.er1
13104 ac_status=$?
13105 grep -v '^ *+' conftest.er1 >conftest.err
13106 rm -f conftest.er1
13107 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013109 (exit $ac_status); } && {
13110 test -z "$ac_c_werror_flag" ||
13111 test ! -s conftest.err
13112 } && test -s conftest.$ac_objext; then
13113 ac_hi=$ac_mid; break
13114else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013115 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013116sed 's/^/| /' conftest.$ac_ext >&5
13117
13118 ac_lo=`expr $ac_mid + 1`
13119 if test $ac_lo -le $ac_mid; then
13120 ac_lo= ac_hi=
13121 break
13122 fi
13123 ac_mid=`expr 2 '*' $ac_mid + 1`
13124fi
13125
13126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13127 done
13128else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013129 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013130sed 's/^/| /' conftest.$ac_ext >&5
13131
13132 cat >conftest.$ac_ext <<_ACEOF
13133/* confdefs.h. */
13134_ACEOF
13135cat confdefs.h >>conftest.$ac_ext
13136cat >>conftest.$ac_ext <<_ACEOF
13137/* end confdefs.h. */
13138
13139#ifdef HAVE_SYS_TYPES_H
13140#include <sys/types.h>
13141#endif
13142
13143
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013144 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013145int
13146main ()
13147{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013148static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013149test_array [0] = 0
13150
13151 ;
13152 return 0;
13153}
13154_ACEOF
13155rm -f conftest.$ac_objext
13156if { (ac_try="$ac_compile"
13157case "(($ac_try" in
13158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13159 *) ac_try_echo=$ac_try;;
13160esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013162 (eval "$ac_compile") 2>conftest.er1
13163 ac_status=$?
13164 grep -v '^ *+' conftest.er1 >conftest.err
13165 rm -f conftest.er1
13166 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013168 (exit $ac_status); } && {
13169 test -z "$ac_c_werror_flag" ||
13170 test ! -s conftest.err
13171 } && test -s conftest.$ac_objext; then
13172 ac_hi=-1 ac_mid=-1
13173 while :; do
13174 cat >conftest.$ac_ext <<_ACEOF
13175/* confdefs.h. */
13176_ACEOF
13177cat confdefs.h >>conftest.$ac_ext
13178cat >>conftest.$ac_ext <<_ACEOF
13179/* end confdefs.h. */
13180
13181#ifdef HAVE_SYS_TYPES_H
13182#include <sys/types.h>
13183#endif
13184
13185
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013186 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013187int
13188main ()
13189{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013190static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013191test_array [0] = 0
13192
13193 ;
13194 return 0;
13195}
13196_ACEOF
13197rm -f conftest.$ac_objext
13198if { (ac_try="$ac_compile"
13199case "(($ac_try" in
13200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13201 *) ac_try_echo=$ac_try;;
13202esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013204 (eval "$ac_compile") 2>conftest.er1
13205 ac_status=$?
13206 grep -v '^ *+' conftest.er1 >conftest.err
13207 rm -f conftest.er1
13208 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013210 (exit $ac_status); } && {
13211 test -z "$ac_c_werror_flag" ||
13212 test ! -s conftest.err
13213 } && test -s conftest.$ac_objext; then
13214 ac_lo=$ac_mid; break
13215else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013216 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013217sed 's/^/| /' conftest.$ac_ext >&5
13218
13219 ac_hi=`expr '(' $ac_mid ')' - 1`
13220 if test $ac_mid -le $ac_hi; then
13221 ac_lo= ac_hi=
13222 break
13223 fi
13224 ac_mid=`expr 2 '*' $ac_mid`
13225fi
13226
13227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13228 done
13229else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013230 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013231sed 's/^/| /' conftest.$ac_ext >&5
13232
13233 ac_lo= ac_hi=
13234fi
13235
13236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13237fi
13238
13239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13240# Binary search between lo and hi bounds.
13241while test "x$ac_lo" != "x$ac_hi"; do
13242 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13243 cat >conftest.$ac_ext <<_ACEOF
13244/* confdefs.h. */
13245_ACEOF
13246cat confdefs.h >>conftest.$ac_ext
13247cat >>conftest.$ac_ext <<_ACEOF
13248/* end confdefs.h. */
13249
13250#ifdef HAVE_SYS_TYPES_H
13251#include <sys/types.h>
13252#endif
13253
13254
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013255 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013256int
13257main ()
13258{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013259static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013260test_array [0] = 0
13261
13262 ;
13263 return 0;
13264}
13265_ACEOF
13266rm -f conftest.$ac_objext
13267if { (ac_try="$ac_compile"
13268case "(($ac_try" in
13269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13270 *) ac_try_echo=$ac_try;;
13271esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013273 (eval "$ac_compile") 2>conftest.er1
13274 ac_status=$?
13275 grep -v '^ *+' conftest.er1 >conftest.err
13276 rm -f conftest.er1
13277 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013279 (exit $ac_status); } && {
13280 test -z "$ac_c_werror_flag" ||
13281 test ! -s conftest.err
13282 } && test -s conftest.$ac_objext; then
13283 ac_hi=$ac_mid
13284else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013285 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013286sed 's/^/| /' conftest.$ac_ext >&5
13287
13288 ac_lo=`expr '(' $ac_mid ')' + 1`
13289fi
13290
13291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13292done
13293case $ac_lo in
13294?*) ac_cv_sizeof_off_t=$ac_lo;;
13295'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013296 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013297See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013298echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013299See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013300 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013301 else
13302 ac_cv_sizeof_off_t=0
13303 fi ;;
13304esac
13305else
13306 cat >conftest.$ac_ext <<_ACEOF
13307/* confdefs.h. */
13308_ACEOF
13309cat confdefs.h >>conftest.$ac_ext
13310cat >>conftest.$ac_ext <<_ACEOF
13311/* end confdefs.h. */
13312
13313#ifdef HAVE_SYS_TYPES_H
13314#include <sys/types.h>
13315#endif
13316
13317
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013318 typedef off_t ac__type_sizeof_;
13319static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13320static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013321#include <stdio.h>
13322#include <stdlib.h>
13323int
13324main ()
13325{
13326
13327 FILE *f = fopen ("conftest.val", "w");
13328 if (! f)
13329 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013330 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013331 {
13332 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013333 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013334 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013335 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013336 }
13337 else
13338 {
13339 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013340 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013341 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013342 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013343 }
13344 return ferror (f) || fclose (f) != 0;
13345
13346 ;
13347 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013348}
Martin v. Löwis11437992002-04-12 09:54:03 +000013349_ACEOF
13350rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013351if { (ac_try="$ac_link"
13352case "(($ac_try" in
13353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13354 *) ac_try_echo=$ac_try;;
13355esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013357 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013358 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013360 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013361 { (case "(($ac_try" in
13362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13363 *) ac_try_echo=$ac_try;;
13364esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013366 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013367 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013369 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013370 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013371else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013372 echo "$as_me: program exited with status $ac_status" >&5
13373echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013374sed 's/^/| /' conftest.$ac_ext >&5
13375
Martin v. Löwis11437992002-04-12 09:54:03 +000013376( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013377if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013378 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013379See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013380echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013381See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013382 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013383 else
13384 ac_cv_sizeof_off_t=0
13385 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013387rm -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 +000013388fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013389rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013390fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013391{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13392echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013393
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013394
13395
Martin v. Löwis11437992002-04-12 09:54:03 +000013396cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013397#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013398_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013399
Michael W. Hudson54241132001-12-07 15:38:26 +000013400
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013401
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013402{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13403echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013404if test "$have_long_long" = yes -a \
13405 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13406 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013407
Martin v. Löwis11437992002-04-12 09:54:03 +000013408cat >>confdefs.h <<\_ACEOF
13409#define HAVE_LARGEFILE_SUPPORT 1
13410_ACEOF
13411
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013412 { echo "$as_me:$LINENO: result: yes" >&5
13413echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013414else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013415 { echo "$as_me:$LINENO: result: no" >&5
13416echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013417fi
13418
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013419{ echo "$as_me:$LINENO: checking for time_t" >&5
13420echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13421if test "${ac_cv_type_time_t+set}" = set; then
13422 echo $ECHO_N "(cached) $ECHO_C" >&6
13423else
13424 cat >conftest.$ac_ext <<_ACEOF
13425/* confdefs.h. */
13426_ACEOF
13427cat confdefs.h >>conftest.$ac_ext
13428cat >>conftest.$ac_ext <<_ACEOF
13429/* end confdefs.h. */
13430
13431#ifdef HAVE_SYS_TYPES_H
13432#include <sys/types.h>
13433#endif
13434#ifdef HAVE_TIME_H
13435#include <time.h>
13436#endif
13437
13438
13439typedef time_t ac__type_new_;
13440int
13441main ()
13442{
13443if ((ac__type_new_ *) 0)
13444 return 0;
13445if (sizeof (ac__type_new_))
13446 return 0;
13447 ;
13448 return 0;
13449}
13450_ACEOF
13451rm -f conftest.$ac_objext
13452if { (ac_try="$ac_compile"
13453case "(($ac_try" in
13454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13455 *) ac_try_echo=$ac_try;;
13456esac
13457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13458 (eval "$ac_compile") 2>conftest.er1
13459 ac_status=$?
13460 grep -v '^ *+' conftest.er1 >conftest.err
13461 rm -f conftest.er1
13462 cat conftest.err >&5
13463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13464 (exit $ac_status); } && {
13465 test -z "$ac_c_werror_flag" ||
13466 test ! -s conftest.err
13467 } && test -s conftest.$ac_objext; then
13468 ac_cv_type_time_t=yes
13469else
13470 echo "$as_me: failed program was:" >&5
13471sed 's/^/| /' conftest.$ac_ext >&5
13472
13473 ac_cv_type_time_t=no
13474fi
13475
13476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13477fi
13478{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13479echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13480
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013481# The cast to long int works around a bug in the HP C Compiler
13482# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13483# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13484# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013485{ echo "$as_me:$LINENO: checking size of time_t" >&5
13486echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013487if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013488 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013489else
13490 if test "$cross_compiling" = yes; then
13491 # Depending upon the size, compute the lo and hi bounds.
13492cat >conftest.$ac_ext <<_ACEOF
13493/* confdefs.h. */
13494_ACEOF
13495cat confdefs.h >>conftest.$ac_ext
13496cat >>conftest.$ac_ext <<_ACEOF
13497/* end confdefs.h. */
13498
13499#ifdef HAVE_SYS_TYPES_H
13500#include <sys/types.h>
13501#endif
13502#ifdef HAVE_TIME_H
13503#include <time.h>
13504#endif
13505
13506
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013507 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013508int
13509main ()
13510{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013511static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013512test_array [0] = 0
13513
13514 ;
13515 return 0;
13516}
13517_ACEOF
13518rm -f conftest.$ac_objext
13519if { (ac_try="$ac_compile"
13520case "(($ac_try" in
13521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13522 *) ac_try_echo=$ac_try;;
13523esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013525 (eval "$ac_compile") 2>conftest.er1
13526 ac_status=$?
13527 grep -v '^ *+' conftest.er1 >conftest.err
13528 rm -f conftest.er1
13529 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013531 (exit $ac_status); } && {
13532 test -z "$ac_c_werror_flag" ||
13533 test ! -s conftest.err
13534 } && test -s conftest.$ac_objext; then
13535 ac_lo=0 ac_mid=0
13536 while :; do
13537 cat >conftest.$ac_ext <<_ACEOF
13538/* confdefs.h. */
13539_ACEOF
13540cat confdefs.h >>conftest.$ac_ext
13541cat >>conftest.$ac_ext <<_ACEOF
13542/* end confdefs.h. */
13543
13544#ifdef HAVE_SYS_TYPES_H
13545#include <sys/types.h>
13546#endif
13547#ifdef HAVE_TIME_H
13548#include <time.h>
13549#endif
13550
13551
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013552 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013553int
13554main ()
13555{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013556static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013557test_array [0] = 0
13558
13559 ;
13560 return 0;
13561}
13562_ACEOF
13563rm -f conftest.$ac_objext
13564if { (ac_try="$ac_compile"
13565case "(($ac_try" in
13566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13567 *) ac_try_echo=$ac_try;;
13568esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013570 (eval "$ac_compile") 2>conftest.er1
13571 ac_status=$?
13572 grep -v '^ *+' conftest.er1 >conftest.err
13573 rm -f conftest.er1
13574 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013576 (exit $ac_status); } && {
13577 test -z "$ac_c_werror_flag" ||
13578 test ! -s conftest.err
13579 } && test -s conftest.$ac_objext; then
13580 ac_hi=$ac_mid; break
13581else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013582 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013583sed 's/^/| /' conftest.$ac_ext >&5
13584
13585 ac_lo=`expr $ac_mid + 1`
13586 if test $ac_lo -le $ac_mid; then
13587 ac_lo= ac_hi=
13588 break
13589 fi
13590 ac_mid=`expr 2 '*' $ac_mid + 1`
13591fi
13592
13593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13594 done
13595else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013596 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013597sed 's/^/| /' conftest.$ac_ext >&5
13598
13599 cat >conftest.$ac_ext <<_ACEOF
13600/* confdefs.h. */
13601_ACEOF
13602cat confdefs.h >>conftest.$ac_ext
13603cat >>conftest.$ac_ext <<_ACEOF
13604/* end confdefs.h. */
13605
13606#ifdef HAVE_SYS_TYPES_H
13607#include <sys/types.h>
13608#endif
13609#ifdef HAVE_TIME_H
13610#include <time.h>
13611#endif
13612
13613
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013614 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013615int
13616main ()
13617{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013618static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013619test_array [0] = 0
13620
13621 ;
13622 return 0;
13623}
13624_ACEOF
13625rm -f conftest.$ac_objext
13626if { (ac_try="$ac_compile"
13627case "(($ac_try" in
13628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13629 *) ac_try_echo=$ac_try;;
13630esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013632 (eval "$ac_compile") 2>conftest.er1
13633 ac_status=$?
13634 grep -v '^ *+' conftest.er1 >conftest.err
13635 rm -f conftest.er1
13636 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013638 (exit $ac_status); } && {
13639 test -z "$ac_c_werror_flag" ||
13640 test ! -s conftest.err
13641 } && test -s conftest.$ac_objext; then
13642 ac_hi=-1 ac_mid=-1
13643 while :; do
13644 cat >conftest.$ac_ext <<_ACEOF
13645/* confdefs.h. */
13646_ACEOF
13647cat confdefs.h >>conftest.$ac_ext
13648cat >>conftest.$ac_ext <<_ACEOF
13649/* end confdefs.h. */
13650
13651#ifdef HAVE_SYS_TYPES_H
13652#include <sys/types.h>
13653#endif
13654#ifdef HAVE_TIME_H
13655#include <time.h>
13656#endif
13657
13658
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013659 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013660int
13661main ()
13662{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013663static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013664test_array [0] = 0
13665
13666 ;
13667 return 0;
13668}
13669_ACEOF
13670rm -f conftest.$ac_objext
13671if { (ac_try="$ac_compile"
13672case "(($ac_try" in
13673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13674 *) ac_try_echo=$ac_try;;
13675esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013677 (eval "$ac_compile") 2>conftest.er1
13678 ac_status=$?
13679 grep -v '^ *+' conftest.er1 >conftest.err
13680 rm -f conftest.er1
13681 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013683 (exit $ac_status); } && {
13684 test -z "$ac_c_werror_flag" ||
13685 test ! -s conftest.err
13686 } && test -s conftest.$ac_objext; then
13687 ac_lo=$ac_mid; break
13688else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013689 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013690sed 's/^/| /' conftest.$ac_ext >&5
13691
13692 ac_hi=`expr '(' $ac_mid ')' - 1`
13693 if test $ac_mid -le $ac_hi; then
13694 ac_lo= ac_hi=
13695 break
13696 fi
13697 ac_mid=`expr 2 '*' $ac_mid`
13698fi
13699
13700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13701 done
13702else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013703 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013704sed 's/^/| /' conftest.$ac_ext >&5
13705
13706 ac_lo= ac_hi=
13707fi
13708
13709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13710fi
13711
13712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13713# Binary search between lo and hi bounds.
13714while test "x$ac_lo" != "x$ac_hi"; do
13715 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13716 cat >conftest.$ac_ext <<_ACEOF
13717/* confdefs.h. */
13718_ACEOF
13719cat confdefs.h >>conftest.$ac_ext
13720cat >>conftest.$ac_ext <<_ACEOF
13721/* end confdefs.h. */
13722
13723#ifdef HAVE_SYS_TYPES_H
13724#include <sys/types.h>
13725#endif
13726#ifdef HAVE_TIME_H
13727#include <time.h>
13728#endif
13729
13730
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013731 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013732int
13733main ()
13734{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013735static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013736test_array [0] = 0
13737
13738 ;
13739 return 0;
13740}
13741_ACEOF
13742rm -f conftest.$ac_objext
13743if { (ac_try="$ac_compile"
13744case "(($ac_try" in
13745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13746 *) ac_try_echo=$ac_try;;
13747esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013749 (eval "$ac_compile") 2>conftest.er1
13750 ac_status=$?
13751 grep -v '^ *+' conftest.er1 >conftest.err
13752 rm -f conftest.er1
13753 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013755 (exit $ac_status); } && {
13756 test -z "$ac_c_werror_flag" ||
13757 test ! -s conftest.err
13758 } && test -s conftest.$ac_objext; then
13759 ac_hi=$ac_mid
13760else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013761 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013762sed 's/^/| /' conftest.$ac_ext >&5
13763
13764 ac_lo=`expr '(' $ac_mid ')' + 1`
13765fi
13766
13767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13768done
13769case $ac_lo in
13770?*) ac_cv_sizeof_time_t=$ac_lo;;
13771'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013772 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013773See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013774echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013775See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013776 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013777 else
13778 ac_cv_sizeof_time_t=0
13779 fi ;;
13780esac
13781else
13782 cat >conftest.$ac_ext <<_ACEOF
13783/* confdefs.h. */
13784_ACEOF
13785cat confdefs.h >>conftest.$ac_ext
13786cat >>conftest.$ac_ext <<_ACEOF
13787/* end confdefs.h. */
13788
13789#ifdef HAVE_SYS_TYPES_H
13790#include <sys/types.h>
13791#endif
13792#ifdef HAVE_TIME_H
13793#include <time.h>
13794#endif
13795
13796
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013797 typedef time_t ac__type_sizeof_;
13798static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13799static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013800#include <stdio.h>
13801#include <stdlib.h>
13802int
13803main ()
13804{
13805
13806 FILE *f = fopen ("conftest.val", "w");
13807 if (! f)
13808 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013809 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013810 {
13811 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013812 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013813 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013814 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013815 }
13816 else
13817 {
13818 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013819 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013820 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013821 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013822 }
13823 return ferror (f) || fclose (f) != 0;
13824
13825 ;
13826 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013827}
Martin v. Löwis11437992002-04-12 09:54:03 +000013828_ACEOF
13829rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013830if { (ac_try="$ac_link"
13831case "(($ac_try" in
13832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13833 *) ac_try_echo=$ac_try;;
13834esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013836 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013837 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013839 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013840 { (case "(($ac_try" in
13841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13842 *) ac_try_echo=$ac_try;;
13843esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013845 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013846 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013848 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013849 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013850else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013851 echo "$as_me: program exited with status $ac_status" >&5
13852echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013853sed 's/^/| /' conftest.$ac_ext >&5
13854
Martin v. Löwis11437992002-04-12 09:54:03 +000013855( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013856if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013857 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013858See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013859echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013860See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013861 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013862 else
13863 ac_cv_sizeof_time_t=0
13864 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013866rm -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 +000013867fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013868rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013869fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013870{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13871echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013872
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013873
13874
Martin v. Löwis11437992002-04-12 09:54:03 +000013875cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013876#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013877_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013878
Michael W. Hudson54241132001-12-07 15:38:26 +000013879
13880
Trent Mick635f6fb2000-08-23 21:33:05 +000013881# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013882ac_save_cc="$CC"
13883if test "$ac_cv_kpthread" = "yes"
13884then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013885elif test "$ac_cv_kthread" = "yes"
13886then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013887elif test "$ac_cv_pthread" = "yes"
13888then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013889fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013890
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013891{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13892echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013893have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013894cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013895/* confdefs.h. */
13896_ACEOF
13897cat confdefs.h >>conftest.$ac_ext
13898cat >>conftest.$ac_ext <<_ACEOF
13899/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013900#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013901int
13902main ()
13903{
Guido van Rossum12580492000-09-24 16:47:19 +000013904pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013905 ;
13906 return 0;
13907}
13908_ACEOF
13909rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013910if { (ac_try="$ac_compile"
13911case "(($ac_try" in
13912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13913 *) ac_try_echo=$ac_try;;
13914esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013916 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013917 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013918 grep -v '^ *+' conftest.er1 >conftest.err
13919 rm -f conftest.er1
13920 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013922 (exit $ac_status); } && {
13923 test -z "$ac_c_werror_flag" ||
13924 test ! -s conftest.err
13925 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013926 have_pthread_t=yes
13927else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013928 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013929sed 's/^/| /' conftest.$ac_ext >&5
13930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013931
Trent Mick635f6fb2000-08-23 21:33:05 +000013932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013933
13934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013935{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13936echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013937if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013938 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13939echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13940if test "${ac_cv_type_pthread_t+set}" = set; then
13941 echo $ECHO_N "(cached) $ECHO_C" >&6
13942else
13943 cat >conftest.$ac_ext <<_ACEOF
13944/* confdefs.h. */
13945_ACEOF
13946cat confdefs.h >>conftest.$ac_ext
13947cat >>conftest.$ac_ext <<_ACEOF
13948/* end confdefs.h. */
13949
13950#ifdef HAVE_PTHREAD_H
13951#include <pthread.h>
13952#endif
13953
13954
13955typedef pthread_t ac__type_new_;
13956int
13957main ()
13958{
13959if ((ac__type_new_ *) 0)
13960 return 0;
13961if (sizeof (ac__type_new_))
13962 return 0;
13963 ;
13964 return 0;
13965}
13966_ACEOF
13967rm -f conftest.$ac_objext
13968if { (ac_try="$ac_compile"
13969case "(($ac_try" in
13970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13971 *) ac_try_echo=$ac_try;;
13972esac
13973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13974 (eval "$ac_compile") 2>conftest.er1
13975 ac_status=$?
13976 grep -v '^ *+' conftest.er1 >conftest.err
13977 rm -f conftest.er1
13978 cat conftest.err >&5
13979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13980 (exit $ac_status); } && {
13981 test -z "$ac_c_werror_flag" ||
13982 test ! -s conftest.err
13983 } && test -s conftest.$ac_objext; then
13984 ac_cv_type_pthread_t=yes
13985else
13986 echo "$as_me: failed program was:" >&5
13987sed 's/^/| /' conftest.$ac_ext >&5
13988
13989 ac_cv_type_pthread_t=no
13990fi
13991
13992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13993fi
13994{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
13995echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
13996
13997# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013998# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13999# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14000# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014001{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14002echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014003if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014004 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014005else
14006 if test "$cross_compiling" = yes; then
14007 # Depending upon the size, compute the lo and hi bounds.
14008cat >conftest.$ac_ext <<_ACEOF
14009/* confdefs.h. */
14010_ACEOF
14011cat confdefs.h >>conftest.$ac_ext
14012cat >>conftest.$ac_ext <<_ACEOF
14013/* end confdefs.h. */
14014
14015#ifdef HAVE_PTHREAD_H
14016#include <pthread.h>
14017#endif
14018
14019
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014020 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014021int
14022main ()
14023{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014024static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014025test_array [0] = 0
14026
14027 ;
14028 return 0;
14029}
14030_ACEOF
14031rm -f conftest.$ac_objext
14032if { (ac_try="$ac_compile"
14033case "(($ac_try" in
14034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14035 *) ac_try_echo=$ac_try;;
14036esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014038 (eval "$ac_compile") 2>conftest.er1
14039 ac_status=$?
14040 grep -v '^ *+' conftest.er1 >conftest.err
14041 rm -f conftest.er1
14042 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014044 (exit $ac_status); } && {
14045 test -z "$ac_c_werror_flag" ||
14046 test ! -s conftest.err
14047 } && test -s conftest.$ac_objext; then
14048 ac_lo=0 ac_mid=0
14049 while :; do
14050 cat >conftest.$ac_ext <<_ACEOF
14051/* confdefs.h. */
14052_ACEOF
14053cat confdefs.h >>conftest.$ac_ext
14054cat >>conftest.$ac_ext <<_ACEOF
14055/* end confdefs.h. */
14056
14057#ifdef HAVE_PTHREAD_H
14058#include <pthread.h>
14059#endif
14060
14061
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014062 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014063int
14064main ()
14065{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014066static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014067test_array [0] = 0
14068
14069 ;
14070 return 0;
14071}
14072_ACEOF
14073rm -f conftest.$ac_objext
14074if { (ac_try="$ac_compile"
14075case "(($ac_try" in
14076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14077 *) ac_try_echo=$ac_try;;
14078esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014080 (eval "$ac_compile") 2>conftest.er1
14081 ac_status=$?
14082 grep -v '^ *+' conftest.er1 >conftest.err
14083 rm -f conftest.er1
14084 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014086 (exit $ac_status); } && {
14087 test -z "$ac_c_werror_flag" ||
14088 test ! -s conftest.err
14089 } && test -s conftest.$ac_objext; then
14090 ac_hi=$ac_mid; break
14091else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014092 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014093sed 's/^/| /' conftest.$ac_ext >&5
14094
14095 ac_lo=`expr $ac_mid + 1`
14096 if test $ac_lo -le $ac_mid; then
14097 ac_lo= ac_hi=
14098 break
14099 fi
14100 ac_mid=`expr 2 '*' $ac_mid + 1`
14101fi
14102
14103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14104 done
14105else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014106 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014107sed 's/^/| /' conftest.$ac_ext >&5
14108
14109 cat >conftest.$ac_ext <<_ACEOF
14110/* confdefs.h. */
14111_ACEOF
14112cat confdefs.h >>conftest.$ac_ext
14113cat >>conftest.$ac_ext <<_ACEOF
14114/* end confdefs.h. */
14115
14116#ifdef HAVE_PTHREAD_H
14117#include <pthread.h>
14118#endif
14119
14120
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014121 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014122int
14123main ()
14124{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014125static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014126test_array [0] = 0
14127
14128 ;
14129 return 0;
14130}
14131_ACEOF
14132rm -f conftest.$ac_objext
14133if { (ac_try="$ac_compile"
14134case "(($ac_try" in
14135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14136 *) ac_try_echo=$ac_try;;
14137esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014139 (eval "$ac_compile") 2>conftest.er1
14140 ac_status=$?
14141 grep -v '^ *+' conftest.er1 >conftest.err
14142 rm -f conftest.er1
14143 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014145 (exit $ac_status); } && {
14146 test -z "$ac_c_werror_flag" ||
14147 test ! -s conftest.err
14148 } && test -s conftest.$ac_objext; then
14149 ac_hi=-1 ac_mid=-1
14150 while :; do
14151 cat >conftest.$ac_ext <<_ACEOF
14152/* confdefs.h. */
14153_ACEOF
14154cat confdefs.h >>conftest.$ac_ext
14155cat >>conftest.$ac_ext <<_ACEOF
14156/* end confdefs.h. */
14157
14158#ifdef HAVE_PTHREAD_H
14159#include <pthread.h>
14160#endif
14161
14162
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014163 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014164int
14165main ()
14166{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014167static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014168test_array [0] = 0
14169
14170 ;
14171 return 0;
14172}
14173_ACEOF
14174rm -f conftest.$ac_objext
14175if { (ac_try="$ac_compile"
14176case "(($ac_try" in
14177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14178 *) ac_try_echo=$ac_try;;
14179esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014181 (eval "$ac_compile") 2>conftest.er1
14182 ac_status=$?
14183 grep -v '^ *+' conftest.er1 >conftest.err
14184 rm -f conftest.er1
14185 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014187 (exit $ac_status); } && {
14188 test -z "$ac_c_werror_flag" ||
14189 test ! -s conftest.err
14190 } && test -s conftest.$ac_objext; then
14191 ac_lo=$ac_mid; break
14192else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014193 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014194sed 's/^/| /' conftest.$ac_ext >&5
14195
14196 ac_hi=`expr '(' $ac_mid ')' - 1`
14197 if test $ac_mid -le $ac_hi; then
14198 ac_lo= ac_hi=
14199 break
14200 fi
14201 ac_mid=`expr 2 '*' $ac_mid`
14202fi
14203
14204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14205 done
14206else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014207 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014208sed 's/^/| /' conftest.$ac_ext >&5
14209
14210 ac_lo= ac_hi=
14211fi
14212
14213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14214fi
14215
14216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14217# Binary search between lo and hi bounds.
14218while test "x$ac_lo" != "x$ac_hi"; do
14219 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14220 cat >conftest.$ac_ext <<_ACEOF
14221/* confdefs.h. */
14222_ACEOF
14223cat confdefs.h >>conftest.$ac_ext
14224cat >>conftest.$ac_ext <<_ACEOF
14225/* end confdefs.h. */
14226
14227#ifdef HAVE_PTHREAD_H
14228#include <pthread.h>
14229#endif
14230
14231
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014232 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014233int
14234main ()
14235{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014236static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014237test_array [0] = 0
14238
14239 ;
14240 return 0;
14241}
14242_ACEOF
14243rm -f conftest.$ac_objext
14244if { (ac_try="$ac_compile"
14245case "(($ac_try" in
14246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14247 *) ac_try_echo=$ac_try;;
14248esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014250 (eval "$ac_compile") 2>conftest.er1
14251 ac_status=$?
14252 grep -v '^ *+' conftest.er1 >conftest.err
14253 rm -f conftest.er1
14254 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014256 (exit $ac_status); } && {
14257 test -z "$ac_c_werror_flag" ||
14258 test ! -s conftest.err
14259 } && test -s conftest.$ac_objext; then
14260 ac_hi=$ac_mid
14261else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014262 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014263sed 's/^/| /' conftest.$ac_ext >&5
14264
14265 ac_lo=`expr '(' $ac_mid ')' + 1`
14266fi
14267
14268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14269done
14270case $ac_lo in
14271?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14272'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014273 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014274See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014275echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014276See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014277 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014278 else
14279 ac_cv_sizeof_pthread_t=0
14280 fi ;;
14281esac
14282else
14283 cat >conftest.$ac_ext <<_ACEOF
14284/* confdefs.h. */
14285_ACEOF
14286cat confdefs.h >>conftest.$ac_ext
14287cat >>conftest.$ac_ext <<_ACEOF
14288/* end confdefs.h. */
14289
14290#ifdef HAVE_PTHREAD_H
14291#include <pthread.h>
14292#endif
14293
14294
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014295 typedef pthread_t ac__type_sizeof_;
14296static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14297static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014298#include <stdio.h>
14299#include <stdlib.h>
14300int
14301main ()
14302{
14303
14304 FILE *f = fopen ("conftest.val", "w");
14305 if (! f)
14306 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014307 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014308 {
14309 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014310 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014311 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014312 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014313 }
14314 else
14315 {
14316 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014317 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014318 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014319 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014320 }
14321 return ferror (f) || fclose (f) != 0;
14322
14323 ;
14324 return 0;
14325}
Martin v. Löwis11437992002-04-12 09:54:03 +000014326_ACEOF
14327rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014328if { (ac_try="$ac_link"
14329case "(($ac_try" in
14330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14331 *) ac_try_echo=$ac_try;;
14332esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014335 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014337 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014338 { (case "(($ac_try" in
14339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14340 *) ac_try_echo=$ac_try;;
14341esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014343 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014344 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014346 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014347 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014348else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014349 echo "$as_me: program exited with status $ac_status" >&5
14350echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014351sed 's/^/| /' conftest.$ac_ext >&5
14352
Martin v. Löwis11437992002-04-12 09:54:03 +000014353( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014354if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014355 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014356See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014357echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014358See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014359 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014360 else
14361 ac_cv_sizeof_pthread_t=0
14362 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014364rm -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 +000014365fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014366rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014367fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014368{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14369echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014370
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014371
14372
Martin v. Löwis11437992002-04-12 09:54:03 +000014373cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014374#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014375_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014376
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014377
Trent Mick635f6fb2000-08-23 21:33:05 +000014378fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014379CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014380
Michael W. Hudson54241132001-12-07 15:38:26 +000014381
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014382case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014383 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014384 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14385 ;;
14386 Darwin/*)
14387 OTHER_LIBTOOL_OPT=""
14388 ;;
14389esac
14390
14391
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014392ARCH_RUN_32BIT=""
14393
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014394case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014395 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014396 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14397 if test "${enable_universalsdk}"; then
14398 :
14399 else
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014400 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014401 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014402 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014403 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014404 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014405 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14406 if test ${gcc_version} '<' 4.0
14407 then
14408 LIBTOOL_CRUFT="-lcc_dynamic"
14409 else
14410 LIBTOOL_CRUFT=""
14411 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014412 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014413 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014414else
14415 cat >conftest.$ac_ext <<_ACEOF
14416/* confdefs.h. */
14417_ACEOF
14418cat confdefs.h >>conftest.$ac_ext
14419cat >>conftest.$ac_ext <<_ACEOF
14420/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014421
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014422 #include <unistd.h>
14423 int main(int argc, char*argv[])
14424 {
14425 if (sizeof(long) == 4) {
14426 return 0;
14427 } else {
14428 return 1;
14429 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014430 }
14431
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014432_ACEOF
14433rm -f conftest$ac_exeext
14434if { (ac_try="$ac_link"
14435case "(($ac_try" in
14436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14437 *) ac_try_echo=$ac_try;;
14438esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014440 (eval "$ac_link") 2>&5
14441 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014443 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14444 { (case "(($ac_try" in
14445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14446 *) ac_try_echo=$ac_try;;
14447esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014449 (eval "$ac_try") 2>&5
14450 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014452 (exit $ac_status); }; }; then
14453 ac_osx_32bit=yes
14454else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014455 echo "$as_me: program exited with status $ac_status" >&5
14456echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014457sed 's/^/| /' conftest.$ac_ext >&5
14458
14459( exit $ac_status )
14460ac_osx_32bit=no
14461fi
14462rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14463fi
14464
14465
14466
14467 if test "${ac_osx_32bit}" = "yes"; then
14468 case `arch` in
14469 i386)
14470 MACOSX_DEFAULT_ARCH="i386"
14471 ;;
14472 ppc)
14473 MACOSX_DEFAULT_ARCH="ppc"
14474 ;;
14475 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014476 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14477echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014478 { (exit 1); exit 1; }; }
14479 ;;
14480 esac
14481 else
14482 case `arch` in
14483 i386)
14484 MACOSX_DEFAULT_ARCH="x86_64"
14485 ;;
14486 ppc)
14487 MACOSX_DEFAULT_ARCH="ppc64"
14488 ;;
14489 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014490 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14491echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014492 { (exit 1); exit 1; }; }
14493 ;;
14494 esac
14495
14496 #ARCH_RUN_32BIT="true"
14497 fi
14498
14499 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014500 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014501 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014502esac
14503
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014504{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14505echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014506if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014507then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014508 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014510 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014511
Martin v. Löwis11437992002-04-12 09:54:03 +000014512cat >>confdefs.h <<\_ACEOF
14513#define WITH_NEXT_FRAMEWORK 1
14514_ACEOF
14515
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014516 { echo "$as_me:$LINENO: result: yes" >&5
14517echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014518 if test $enable_shared = "yes"
14519 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014520 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14521echo "$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 +000014522 { (exit 1); exit 1; }; }
14523 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014524else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014525 { echo "$as_me:$LINENO: result: no" >&5
14526echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014527fi
14528
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014529{ echo "$as_me:$LINENO: checking for dyld" >&5
14530echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014531case $ac_sys_system/$ac_sys_release in
14532 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014533
Martin v. Löwis11437992002-04-12 09:54:03 +000014534cat >>confdefs.h <<\_ACEOF
14535#define WITH_DYLD 1
14536_ACEOF
14537
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014538 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14539echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014540 ;;
14541 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014542 { echo "$as_me:$LINENO: result: no" >&5
14543echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014544 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014545esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014546
Guido van Rossum0a516c91994-09-12 10:58:40 +000014547# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014548
Michael W. Hudson54241132001-12-07 15:38:26 +000014549
14550
14551
14552
Guido van Rossum0a516c91994-09-12 10:58:40 +000014553# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014554# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014555{ echo "$as_me:$LINENO: checking SO" >&5
14556echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014557if test -z "$SO"
14558then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014559 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014560 hp*|HP*)
14561 case `uname -m` in
14562 ia64) SO=.so;;
14563 *) SO=.sl;;
14564 esac
14565 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014566 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014567 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014568 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014569else
14570 # this might also be a termcap variable, see #610332
14571 echo
14572 echo '====================================================================='
14573 echo '+ +'
14574 echo '+ WARNING: You have set SO in your environment. +'
14575 echo '+ Do you really mean to change the extension for shared libraries? +'
14576 echo '+ Continuing in 10 seconds to let you to ponder. +'
14577 echo '+ +'
14578 echo '====================================================================='
14579 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014580fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014581{ echo "$as_me:$LINENO: result: $SO" >&5
14582echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014583
Georg Brandlb1441c72009-01-03 22:33:39 +000014584
Thomas Wouters477c8d52006-05-27 19:21:47 +000014585cat >>confdefs.h <<_ACEOF
14586#define SHLIB_EXT "$SO"
14587_ACEOF
14588
Guido van Rossum0a516c91994-09-12 10:58:40 +000014589# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014590# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014591# (Shared libraries in this instance are shared modules to be loaded into
14592# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014593{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14594echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014595if test -z "$LDSHARED"
14596then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014597 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014598 AIX*)
14599 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014600 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014601 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014602 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014603 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014604 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014605 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014606 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014607 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014608 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014609 hp*|HP*)
14610 if test "$GCC" = "yes"
14611 then LDSHARED='$(CC) -shared'
14612 else LDSHARED='ld -b';
14613 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014614 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014615 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014616 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14617 if test "$enable_framework" ; then
14618 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014619 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14620 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014621 else
14622 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014623 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014624 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014625 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014626 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14627 if test "$enable_framework" ; then
14628 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014629 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14630 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014631 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014632 # No framework, use the Python app as bundle-loader
14633 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014634 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014635 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014636 Darwin/*)
14637 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14638 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014639
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014640 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014641 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014642 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014643 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014644 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014645 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14646 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014647 else
14648 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14649 if test "$enable_framework" ; then
14650 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014651 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14652 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014653 else
14654 # No framework, use the Python app as bundle-loader
14655 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14656 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14657 fi
14658 fi
14659 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014660 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014661 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014662 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014663 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014664 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014665 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014666 else
14667 LDSHARED="ld -Bshareable ${LDFLAGS}"
14668 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014669 OpenBSD*)
14670 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14671 then
14672 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14673 else
14674 case `uname -r` in
14675 [01].* | 2.[0-7] | 2.[0-7].*)
14676 LDSHARED="ld -Bshareable ${LDFLAGS}"
14677 ;;
14678 *)
14679 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14680 ;;
14681 esac
14682 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014683 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014684 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014685 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014686 then LDSHARED='$(CC) -shared'
14687 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014688 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014689 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014690 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014691 *) LDSHARED="ld";;
14692 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014693fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014694{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14695echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014696BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014697# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014698# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014699{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14700echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014701if test -z "$CCSHARED"
14702then
Guido van Rossum07397971997-04-29 21:49:50 +000014703 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014704 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014705 then CCSHARED="-fPIC";
14706 elif test `uname -p` = sparc;
14707 then CCSHARED="-xcode=pic32";
14708 else CCSHARED="-Kpic";
14709 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014710 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014711 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014712 else CCSHARED="+z";
14713 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014714 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014715 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014716 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014717 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014718 if test "$GCC" = "yes"
14719 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014720 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014721 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014722 SCO_SV*)
14723 if test "$GCC" = "yes"
14724 then CCSHARED="-fPIC"
14725 else CCSHARED="-Kpic -belf"
14726 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014727 IRIX*/6*) case $CC in
14728 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014729 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014730 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014731 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014732fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014733{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14734echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014735# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014736# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014737{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14738echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014739if test -z "$LINKFORSHARED"
14740then
Guido van Rossum07397971997-04-29 21:49:50 +000014741 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014742 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014743 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014744 LINKFORSHARED="-Wl,-E -Wl,+s";;
14745# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014746 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014747 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014748 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014749 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014750 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014751 if test "$enable_framework"
14752 then
Jack Jansenda49e192005-01-07 13:08:22 +000014753 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014754 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014755 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014756 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014757 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014758 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014759 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014760 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14761 then
14762 LINKFORSHARED="-Wl,--export-dynamic"
14763 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014764 SunOS/5*) case $CC in
14765 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014766 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014767 then
14768 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014769 fi;;
14770 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014771 CYGWIN*)
14772 if test $enable_shared = "no"
14773 then
14774 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14775 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014776 QNX*)
14777 # -Wl,-E causes the symbols to be added to the dynamic
14778 # symbol table so that they can be found when a module
14779 # is loaded. -N 2048K causes the stack size to be set
14780 # to 2048 kilobytes so that the stack doesn't overflow
14781 # when running test_compile.py.
14782 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014783 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014784fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014785{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14786echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014787
Michael W. Hudson54241132001-12-07 15:38:26 +000014788
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014789
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014790{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14791echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014792if test ! "$LIBRARY" = "$LDLIBRARY"
14793then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014794 case $ac_sys_system in
14795 CYGWIN*)
14796 # Cygwin needs CCSHARED when building extension DLLs
14797 # but not when building the interpreter DLL.
14798 CFLAGSFORSHARED='';;
14799 *)
14800 CFLAGSFORSHARED='$(CCSHARED)'
14801 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014802fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014803{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14804echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014805
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014806# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14807# library (with --enable-shared).
14808# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014809# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14810# if it is not required, since it creates a dependency of the shared library
14811# to LIBS. This, in turn, means that applications linking the shared libpython
14812# don't need to link LIBS explicitly. The default should be only changed
14813# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014814
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014815{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14816echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014817case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014818 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014819 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014820esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014821{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14822echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014823
14824
Guido van Rossum627b2d71993-12-24 10:39:16 +000014825# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014826
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014827{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14828echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014829if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014830 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014831else
Martin v. Löwis11437992002-04-12 09:54:03 +000014832 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014833LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014834cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014835/* confdefs.h. */
14836_ACEOF
14837cat confdefs.h >>conftest.$ac_ext
14838cat >>conftest.$ac_ext <<_ACEOF
14839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014841/* Override any GCC internal prototype to avoid an error.
14842 Use char because int might match the return type of a GCC
14843 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014844#ifdef __cplusplus
14845extern "C"
14846#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014847char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014848int
14849main ()
14850{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014851return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014852 ;
14853 return 0;
14854}
14855_ACEOF
14856rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014857if { (ac_try="$ac_link"
14858case "(($ac_try" in
14859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14860 *) ac_try_echo=$ac_try;;
14861esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014863 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014864 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014865 grep -v '^ *+' conftest.er1 >conftest.err
14866 rm -f conftest.er1
14867 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014869 (exit $ac_status); } && {
14870 test -z "$ac_c_werror_flag" ||
14871 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014872 } && test -s conftest$ac_exeext &&
14873 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014874 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014875else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014877sed 's/^/| /' conftest.$ac_ext >&5
14878
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014879 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014881
14882rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014883 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014884LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014885fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014886{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14887echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14888if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014889 cat >>confdefs.h <<_ACEOF
14890#define HAVE_LIBDL 1
14891_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014892
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014893 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014894
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014895fi
14896 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014897
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014898{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14899echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014900if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014901 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014902else
Martin v. Löwis11437992002-04-12 09:54:03 +000014903 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014904LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014905cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014906/* confdefs.h. */
14907_ACEOF
14908cat confdefs.h >>conftest.$ac_ext
14909cat >>conftest.$ac_ext <<_ACEOF
14910/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014911
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014912/* Override any GCC internal prototype to avoid an error.
14913 Use char because int might match the return type of a GCC
14914 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014915#ifdef __cplusplus
14916extern "C"
14917#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014918char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014919int
14920main ()
14921{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014922return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014923 ;
14924 return 0;
14925}
14926_ACEOF
14927rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014928if { (ac_try="$ac_link"
14929case "(($ac_try" in
14930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14931 *) ac_try_echo=$ac_try;;
14932esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014935 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014936 grep -v '^ *+' conftest.er1 >conftest.err
14937 rm -f conftest.er1
14938 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940 (exit $ac_status); } && {
14941 test -z "$ac_c_werror_flag" ||
14942 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014943 } && test -s conftest$ac_exeext &&
14944 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014945 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014946else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014948sed 's/^/| /' conftest.$ac_ext >&5
14949
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014950 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014952
14953rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014954 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014955LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014956fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014957{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14958echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
14959if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014960 cat >>confdefs.h <<_ACEOF
14961#define HAVE_LIBDLD 1
14962_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014963
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014964 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014965
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014966fi
14967 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014968
Georg Brandlb1441c72009-01-03 22:33:39 +000014969# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014970if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014971 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14972echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014973if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014974 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014975else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014976 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014977cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014978/* confdefs.h. */
14979_ACEOF
14980cat confdefs.h >>conftest.$ac_ext
14981cat >>conftest.$ac_ext <<_ACEOF
14982/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014984/* Override any GCC internal prototype to avoid an error.
14985 Use char because int might match the return type of a GCC
14986 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014987#ifdef __cplusplus
14988extern "C"
14989#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014990char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014991int
14992main ()
14993{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014994return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014995 ;
14996 return 0;
14997}
14998_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014999for ac_lib in '' pthread rt posix4; do
15000 if test -z "$ac_lib"; then
15001 ac_res="none required"
15002 else
15003 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015004 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015005 fi
15006 rm -f conftest.$ac_objext conftest$ac_exeext
15007if { (ac_try="$ac_link"
15008case "(($ac_try" in
15009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15010 *) ac_try_echo=$ac_try;;
15011esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015013 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015014 ac_status=$?
15015 grep -v '^ *+' conftest.er1 >conftest.err
15016 rm -f conftest.er1
15017 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015019 (exit $ac_status); } && {
15020 test -z "$ac_c_werror_flag" ||
15021 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015022 } && test -s conftest$ac_exeext &&
15023 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015024 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015025else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015026 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015027sed 's/^/| /' conftest.$ac_ext >&5
15028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015029
Thomas Wouters477c8d52006-05-27 19:21:47 +000015030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015031
15032rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15033 conftest$ac_exeext
15034 if test "${ac_cv_search_sem_init+set}" = set; then
15035 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015037done
15038if test "${ac_cv_search_sem_init+set}" = set; then
15039 :
15040else
15041 ac_cv_search_sem_init=no
15042fi
15043rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015044LIBS=$ac_func_search_save_LIBS
15045fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015046{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15047echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048ac_res=$ac_cv_search_sem_init
15049if test "$ac_res" != no; then
15050 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015051
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015052fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015053 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015054 # posix4 on Solaris 2.6
15055 # pthread (first!) on Linux
15056fi
15057
Martin v. Löwis19d17342003-06-14 21:03:05 +000015058# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015059{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15060echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015061if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015062 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015063else
15064 ac_check_lib_save_LIBS=$LIBS
15065LIBS="-lintl $LIBS"
15066cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015067/* confdefs.h. */
15068_ACEOF
15069cat confdefs.h >>conftest.$ac_ext
15070cat >>conftest.$ac_ext <<_ACEOF
15071/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015073/* Override any GCC internal prototype to avoid an error.
15074 Use char because int might match the return type of a GCC
15075 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015076#ifdef __cplusplus
15077extern "C"
15078#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015079char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015080int
15081main ()
15082{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015083return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015084 ;
15085 return 0;
15086}
15087_ACEOF
15088rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015089if { (ac_try="$ac_link"
15090case "(($ac_try" in
15091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15092 *) ac_try_echo=$ac_try;;
15093esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015097 grep -v '^ *+' conftest.er1 >conftest.err
15098 rm -f conftest.er1
15099 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015101 (exit $ac_status); } && {
15102 test -z "$ac_c_werror_flag" ||
15103 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015104 } && test -s conftest$ac_exeext &&
15105 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015106 ac_cv_lib_intl_textdomain=yes
15107else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015108 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015109sed 's/^/| /' conftest.$ac_ext >&5
15110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015111 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113
15114rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015115 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015116LIBS=$ac_check_lib_save_LIBS
15117fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015118{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15119echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15120if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015121
15122cat >>confdefs.h <<\_ACEOF
15123#define WITH_LIBINTL 1
15124_ACEOF
15125
Brett Cannonc6d936e2009-06-07 20:09:53 +000015126 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015127fi
15128
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015129
15130# checks for system dependent C++ extensions support
15131case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015132 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15133echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015134 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015135/* confdefs.h. */
15136_ACEOF
15137cat confdefs.h >>conftest.$ac_ext
15138cat >>conftest.$ac_ext <<_ACEOF
15139/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015140#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015141int
15142main ()
15143{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015144loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015145 ;
15146 return 0;
15147}
15148_ACEOF
15149rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015150if { (ac_try="$ac_link"
15151case "(($ac_try" in
15152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15153 *) ac_try_echo=$ac_try;;
15154esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015156 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015158 grep -v '^ *+' conftest.er1 >conftest.err
15159 rm -f conftest.er1
15160 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015162 (exit $ac_status); } && {
15163 test -z "$ac_c_werror_flag" ||
15164 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015165 } && test -s conftest$ac_exeext &&
15166 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015167
Martin v. Löwis11437992002-04-12 09:54:03 +000015168cat >>confdefs.h <<\_ACEOF
15169#define AIX_GENUINE_CPLUSPLUS 1
15170_ACEOF
15171
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015172 { echo "$as_me:$LINENO: result: yes" >&5
15173echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015174else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015176sed 's/^/| /' conftest.$ac_ext >&5
15177
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015178 { echo "$as_me:$LINENO: result: no" >&5
15179echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015181
15182rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015183 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015184 *) ;;
15185esac
15186
Guido van Rossum70c7f481998-03-26 18:44:10 +000015187# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015188{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15189echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015190if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015191 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015192else
Martin v. Löwis11437992002-04-12 09:54:03 +000015193 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015194LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015195cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015196/* confdefs.h. */
15197_ACEOF
15198cat confdefs.h >>conftest.$ac_ext
15199cat >>conftest.$ac_ext <<_ACEOF
15200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202/* Override any GCC internal prototype to avoid an error.
15203 Use char because int might match the return type of a GCC
15204 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015205#ifdef __cplusplus
15206extern "C"
15207#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015208char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015209int
15210main ()
15211{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015212return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015213 ;
15214 return 0;
15215}
15216_ACEOF
15217rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015218if { (ac_try="$ac_link"
15219case "(($ac_try" in
15220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15221 *) ac_try_echo=$ac_try;;
15222esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015224 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015226 grep -v '^ *+' conftest.er1 >conftest.err
15227 rm -f conftest.er1
15228 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015230 (exit $ac_status); } && {
15231 test -z "$ac_c_werror_flag" ||
15232 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015233 } && test -s conftest$ac_exeext &&
15234 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015235 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015236else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015238sed 's/^/| /' conftest.$ac_ext >&5
15239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015240 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015242
15243rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015244 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015245LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015246fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015247{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15248echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15249if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015250 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015251fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015252 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015253{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15254echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015255if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015256 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015257else
Martin v. Löwis11437992002-04-12 09:54:03 +000015258 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015259LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015260cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015261/* confdefs.h. */
15262_ACEOF
15263cat confdefs.h >>conftest.$ac_ext
15264cat >>conftest.$ac_ext <<_ACEOF
15265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015266
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015267/* Override any GCC internal prototype to avoid an error.
15268 Use char because int might match the return type of a GCC
15269 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015270#ifdef __cplusplus
15271extern "C"
15272#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015273char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015274int
15275main ()
15276{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015277return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015278 ;
15279 return 0;
15280}
15281_ACEOF
15282rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015283if { (ac_try="$ac_link"
15284case "(($ac_try" in
15285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15286 *) ac_try_echo=$ac_try;;
15287esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015289 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015291 grep -v '^ *+' conftest.er1 >conftest.err
15292 rm -f conftest.er1
15293 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015295 (exit $ac_status); } && {
15296 test -z "$ac_c_werror_flag" ||
15297 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015298 } && test -s conftest$ac_exeext &&
15299 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015300 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015301else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015302 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015303sed 's/^/| /' conftest.$ac_ext >&5
15304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015305 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015307
15308rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015309 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015310LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015311fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015312{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15313echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15314if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015315 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015316fi
15317 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015318
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015319{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15320echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015322# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015323if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015324 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015325{ echo "$as_me:$LINENO: result: $withval" >&5
15326echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015327LIBS="$withval $LIBS"
15328
15329else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015330 { echo "$as_me:$LINENO: result: no" >&5
15331echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015332fi
15333
Guido van Rossum7f43da71994-08-01 12:15:30 +000015334
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015335# Check for use of the system libffi library
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015336{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15337echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015339# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015340if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015341 withval=$with_system_ffi;
15342fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015343
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015344
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015345{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15346echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015347
Matthias Klose55708cc2009-04-30 08:06:49 +000015348# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015349{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15350echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015351
15352# Check whether --with-dbmliborder was given.
15353if test "${with_dbmliborder+set}" = set; then
15354 withval=$with_dbmliborder;
15355if test x$with_dbmliborder = xyes
15356then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015357{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15358echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015359 { (exit 1); exit 1; }; }
15360else
15361 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15362 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15363 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015364 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15365echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015366 { (exit 1); exit 1; }; }
15367 fi
15368 done
15369fi
15370fi
15371
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015372{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15373echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015374
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015375# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015376
15377
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015378{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15379echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015381# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015382if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015383 withval=$with_signal_module;
15384fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015385
15386
15387if test -z "$with_signal_module"
15388then with_signal_module="yes"
15389fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015390{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15391echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015392
15393if test "${with_signal_module}" = "yes"; then
15394 USE_SIGNAL_MODULE=""
15395 SIGNAL_OBJS=""
15396else
15397 USE_SIGNAL_MODULE="#"
15398 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15399fi
15400
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015401# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015402
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015403USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015404
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015405{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15406echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015407
Guido van Rossumec2f0731997-01-22 20:54:01 +000015408
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015409# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015410if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015411 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015412{ echo "$as_me:$LINENO: result: $withval" >&5
15413echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015414LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015415if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015416 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015417fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015418else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015419 { echo "$as_me:$LINENO: result: no" >&5
15420echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015421fi
15422
Martin v. Löwis11437992002-04-12 09:54:03 +000015423
15424# Templates for things AC_DEFINEd more than once.
15425# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015426
15427
Martin v. Löwis11437992002-04-12 09:54:03 +000015428
15429
15430
15431
15432
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015433{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15434echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015436# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015437if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015438 withval=$with_threads;
15439fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015440
15441
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015442# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015444# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015445if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015446 withval=$with_thread; with_threads=$with_thread
15447fi
15448
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015449
15450if test -z "$with_threads"
15451then with_threads="yes"
15452fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015453{ echo "$as_me:$LINENO: result: $with_threads" >&5
15454echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015455
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015456
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015457if test "$with_threads" = "no"
15458then
15459 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015460elif test "$ac_cv_pthread_is_default" = yes
15461then
Martin v. Löwis11437992002-04-12 09:54:03 +000015462 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015463#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015464_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015465
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015466 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015467 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015468#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015469_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015470
15471 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015472 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015473elif test "$ac_cv_kpthread" = "yes"
15474then
15475 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015476 if test "$ac_cv_cxx_thread" = "yes"; then
15477 CXX="$CXX -Kpthread"
15478 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015479 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015480#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015481_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015482
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015483 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015484 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015485elif test "$ac_cv_kthread" = "yes"
15486then
15487 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015488 if test "$ac_cv_cxx_thread" = "yes"; then
15489 CXX="$CXX -Kthread"
15490 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015491 cat >>confdefs.h <<\_ACEOF
15492#define WITH_THREAD 1
15493_ACEOF
15494
15495 posix_threads=yes
15496 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015497elif test "$ac_cv_pthread" = "yes"
15498then
15499 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015500 if test "$ac_cv_cxx_thread" = "yes"; then
15501 CXX="$CXX -pthread"
15502 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015503 cat >>confdefs.h <<\_ACEOF
15504#define WITH_THREAD 1
15505_ACEOF
15506
15507 posix_threads=yes
15508 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015509else
15510 if test ! -z "$with_threads" -a -d "$with_threads"
15511 then LDFLAGS="$LDFLAGS -L$with_threads"
15512 fi
15513 if test ! -z "$withval" -a -d "$withval"
15514 then LDFLAGS="$LDFLAGS -L$withval"
15515 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015516
15517 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015518 # define _POSIX_THREADS in unistd.h. Some apparently don't
15519 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015520 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15521echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015523/* confdefs.h. */
15524_ACEOF
15525cat confdefs.h >>conftest.$ac_ext
15526cat >>conftest.$ac_ext <<_ACEOF
15527/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015528
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015529#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015530#ifdef _POSIX_THREADS
15531yes
15532#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015533
15534_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015535if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015536 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015537 unistd_defines_pthreads=yes
15538else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015539 unistd_defines_pthreads=no
15540fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000015541rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015542
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015543 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15544echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015545
Martin v. Löwis11437992002-04-12 09:54:03 +000015546 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015547#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015548_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015549
Martin v. Löwis11437992002-04-12 09:54:03 +000015550 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015551 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15552echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015553if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015554 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015555fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015556{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15557echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015558else
Martin v. Löwis11437992002-04-12 09:54:03 +000015559 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015560{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15561echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015562cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015563/* confdefs.h. */
15564_ACEOF
15565cat confdefs.h >>conftest.$ac_ext
15566cat >>conftest.$ac_ext <<_ACEOF
15567/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015568$ac_includes_default
15569#include <cthreads.h>
15570_ACEOF
15571rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015572if { (ac_try="$ac_compile"
15573case "(($ac_try" in
15574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15575 *) ac_try_echo=$ac_try;;
15576esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015578 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015580 grep -v '^ *+' conftest.er1 >conftest.err
15581 rm -f conftest.er1
15582 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015584 (exit $ac_status); } && {
15585 test -z "$ac_c_werror_flag" ||
15586 test ! -s conftest.err
15587 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015588 ac_header_compiler=yes
15589else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015591sed 's/^/| /' conftest.$ac_ext >&5
15592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015593 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015595
15596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015597{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15598echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015599
15600# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015601{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15602echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015603cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015604/* confdefs.h. */
15605_ACEOF
15606cat confdefs.h >>conftest.$ac_ext
15607cat >>conftest.$ac_ext <<_ACEOF
15608/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015609#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015610_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015611if { (ac_try="$ac_cpp conftest.$ac_ext"
15612case "(($ac_try" in
15613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15614 *) ac_try_echo=$ac_try;;
15615esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015617 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015618 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015619 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015620 rm -f conftest.er1
15621 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015623 (exit $ac_status); } >/dev/null && {
15624 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15625 test ! -s conftest.err
15626 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015627 ac_header_preproc=yes
15628else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015630sed 's/^/| /' conftest.$ac_ext >&5
15631
Martin v. Löwis11437992002-04-12 09:54:03 +000015632 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015634
Martin v. Löwis11437992002-04-12 09:54:03 +000015635rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015636{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15637echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015638
15639# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015640case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15641 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015642 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15643echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15644 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15645echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015646 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015647 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015648 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015649 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15650echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15651 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15652echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15653 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15654echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15655 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15656echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15657 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15658echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15659 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15660echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015661 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015662## -------------------------------------- ##
15663## Report this to http://bugs.python.org/ ##
15664## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015665_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015666 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015667 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015668esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015669{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15670echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015671if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015672 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015673else
15674 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015675fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015676{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15677echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015678
15679fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015680if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015681 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015682#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015683_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015684
Martin v. Löwis11437992002-04-12 09:54:03 +000015685 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015686#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015687_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015688
Martin v. Löwis11437992002-04-12 09:54:03 +000015689
15690cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015691#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015692_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015693
15694 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015695 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015696else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015697
Martin v. Löwis11437992002-04-12 09:54:03 +000015698 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015699 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15700echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015701if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015702 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015703fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015704{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15705echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015706else
Martin v. Löwis11437992002-04-12 09:54:03 +000015707 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015708{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15709echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015710cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015711/* confdefs.h. */
15712_ACEOF
15713cat confdefs.h >>conftest.$ac_ext
15714cat >>conftest.$ac_ext <<_ACEOF
15715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015716$ac_includes_default
15717#include <mach/cthreads.h>
15718_ACEOF
15719rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015720if { (ac_try="$ac_compile"
15721case "(($ac_try" in
15722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15723 *) ac_try_echo=$ac_try;;
15724esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015726 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015728 grep -v '^ *+' conftest.er1 >conftest.err
15729 rm -f conftest.er1
15730 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015732 (exit $ac_status); } && {
15733 test -z "$ac_c_werror_flag" ||
15734 test ! -s conftest.err
15735 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015736 ac_header_compiler=yes
15737else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015739sed 's/^/| /' conftest.$ac_ext >&5
15740
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015741 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015743
15744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015745{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15746echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015747
15748# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015749{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15750echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015751cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015752/* confdefs.h. */
15753_ACEOF
15754cat confdefs.h >>conftest.$ac_ext
15755cat >>conftest.$ac_ext <<_ACEOF
15756/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015757#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015758_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015759if { (ac_try="$ac_cpp conftest.$ac_ext"
15760case "(($ac_try" in
15761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15762 *) ac_try_echo=$ac_try;;
15763esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015765 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015766 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015767 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015768 rm -f conftest.er1
15769 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015771 (exit $ac_status); } >/dev/null && {
15772 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15773 test ! -s conftest.err
15774 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015775 ac_header_preproc=yes
15776else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015778sed 's/^/| /' conftest.$ac_ext >&5
15779
Martin v. Löwis11437992002-04-12 09:54:03 +000015780 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015781fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015782
Martin v. Löwis11437992002-04-12 09:54:03 +000015783rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015784{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15785echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015786
15787# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015788case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15789 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015790 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15791echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15792 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15793echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015794 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015795 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015796 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015797 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15798echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15799 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15800echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15801 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15802echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15803 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15804echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15805 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15806echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15807 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15808echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015809 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015810## -------------------------------------- ##
15811## Report this to http://bugs.python.org/ ##
15812## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015813_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015814 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015815 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015816esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015817{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15818echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015819if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015820 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015821else
15822 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015823fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015824{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15825echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015826
15827fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015828if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015829 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015830#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015831_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015832
Martin v. Löwis11437992002-04-12 09:54:03 +000015833 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015834#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015835_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015836
Martin v. Löwis11437992002-04-12 09:54:03 +000015837
15838cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015839#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015840_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015841
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015842 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015843else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015844
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015845 # Just looking for pthread_create in libpthread is not enough:
15846 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15847 # So we really have to include pthread.h, and then link.
15848 _libs=$LIBS
15849 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015850 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15851echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015852 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015853/* confdefs.h. */
15854_ACEOF
15855cat confdefs.h >>conftest.$ac_ext
15856cat >>conftest.$ac_ext <<_ACEOF
15857/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015858#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015859
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015860void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015861int
15862main ()
15863{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015864
15865pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015866 ;
15867 return 0;
15868}
15869_ACEOF
15870rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015871if { (ac_try="$ac_link"
15872case "(($ac_try" in
15873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15874 *) ac_try_echo=$ac_try;;
15875esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015877 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015878 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015879 grep -v '^ *+' conftest.er1 >conftest.err
15880 rm -f conftest.er1
15881 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015883 (exit $ac_status); } && {
15884 test -z "$ac_c_werror_flag" ||
15885 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015886 } && test -s conftest$ac_exeext &&
15887 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015888
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015889 { echo "$as_me:$LINENO: result: yes" >&5
15890echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015891 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015892#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015893_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015894
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015895 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015896 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000015897else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015899sed 's/^/| /' conftest.$ac_ext >&5
15900
Martin v. Löwis11437992002-04-12 09:54:03 +000015901
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015902 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015903 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
15904echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015905if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015906 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015907else
Martin v. Löwis11437992002-04-12 09:54:03 +000015908 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015909/* confdefs.h. */
15910_ACEOF
15911cat confdefs.h >>conftest.$ac_ext
15912cat >>conftest.$ac_ext <<_ACEOF
15913/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015914/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
15915 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15916#define pthread_detach innocuous_pthread_detach
15917
Guido van Rossumad678af1998-10-02 14:42:15 +000015918/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015919 which can conflict with char pthread_detach (); below.
15920 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015921 <limits.h> exists even on freestanding compilers. */
15922
15923#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015924# include <limits.h>
15925#else
15926# include <assert.h>
15927#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015928
15929#undef pthread_detach
15930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015931/* Override any GCC internal prototype to avoid an error.
15932 Use char because int might match the return type of a GCC
15933 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015934#ifdef __cplusplus
15935extern "C"
15936#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015937char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000015938/* The GNU C library defines this for functions which it implements
15939 to always fail with ENOSYS. Some functions are actually named
15940 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015941#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000015942choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000015943#endif
15944
Skip Montanaro6dead952003-09-25 14:50:04 +000015945int
15946main ()
15947{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015948return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015949 ;
15950 return 0;
15951}
15952_ACEOF
15953rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015954if { (ac_try="$ac_link"
15955case "(($ac_try" in
15956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15957 *) ac_try_echo=$ac_try;;
15958esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015960 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015962 grep -v '^ *+' conftest.er1 >conftest.err
15963 rm -f conftest.er1
15964 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015966 (exit $ac_status); } && {
15967 test -z "$ac_c_werror_flag" ||
15968 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015969 } && test -s conftest$ac_exeext &&
15970 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015971 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015972else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015974sed 's/^/| /' conftest.$ac_ext >&5
15975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015976 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015978
15979rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015980 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000015981fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015982{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
15983echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
15984if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015985 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015986#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015987_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015988
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015989 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015990 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000015991else
Guido van Rossumad678af1998-10-02 14:42:15 +000015992
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015993 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15994echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015995if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015996 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015997else
Martin v. Löwis11437992002-04-12 09:54:03 +000015998 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015999LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016000cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016001/* confdefs.h. */
16002_ACEOF
16003cat confdefs.h >>conftest.$ac_ext
16004cat >>conftest.$ac_ext <<_ACEOF
16005/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016006
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016007/* Override any GCC internal prototype to avoid an error.
16008 Use char because int might match the return type of a GCC
16009 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016010#ifdef __cplusplus
16011extern "C"
16012#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016013char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016014int
16015main ()
16016{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016017return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016018 ;
16019 return 0;
16020}
16021_ACEOF
16022rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016023if { (ac_try="$ac_link"
16024case "(($ac_try" in
16025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16026 *) ac_try_echo=$ac_try;;
16027esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016029 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016030 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016031 grep -v '^ *+' conftest.er1 >conftest.err
16032 rm -f conftest.er1
16033 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016035 (exit $ac_status); } && {
16036 test -z "$ac_c_werror_flag" ||
16037 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016038 } && test -s conftest$ac_exeext &&
16039 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016040 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016041else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016043sed 's/^/| /' conftest.$ac_ext >&5
16044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016045 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016047
16048rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016049 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016050LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016051fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016052{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16053echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16054if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016055 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016056#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016057_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016058
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016059 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016060 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016061 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016062else
Greg Steinadf63d62000-07-05 10:38:09 +000016063
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016064 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16065echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016066if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016067 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016068else
Martin v. Löwis11437992002-04-12 09:54:03 +000016069 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016070LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016071cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016072/* confdefs.h. */
16073_ACEOF
16074cat confdefs.h >>conftest.$ac_ext
16075cat >>conftest.$ac_ext <<_ACEOF
16076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016078/* Override any GCC internal prototype to avoid an error.
16079 Use char because int might match the return type of a GCC
16080 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016081#ifdef __cplusplus
16082extern "C"
16083#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016084char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016085int
16086main ()
16087{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016088return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016089 ;
16090 return 0;
16091}
16092_ACEOF
16093rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016094if { (ac_try="$ac_link"
16095case "(($ac_try" in
16096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16097 *) ac_try_echo=$ac_try;;
16098esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016100 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016101 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016102 grep -v '^ *+' conftest.er1 >conftest.err
16103 rm -f conftest.er1
16104 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016106 (exit $ac_status); } && {
16107 test -z "$ac_c_werror_flag" ||
16108 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016109 } && test -s conftest$ac_exeext &&
16110 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016111 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016112else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016114sed 's/^/| /' conftest.$ac_ext >&5
16115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016116 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016118
16119rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016120 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016121LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016122fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016123{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16124echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16125if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016126 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016127#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016128_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016129
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016130 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016131 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016132 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016133else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016134
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016135 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16136echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016137if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016138 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016139else
Martin v. Löwis11437992002-04-12 09:54:03 +000016140 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016141LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016142cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016143/* confdefs.h. */
16144_ACEOF
16145cat confdefs.h >>conftest.$ac_ext
16146cat >>conftest.$ac_ext <<_ACEOF
16147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016149/* Override any GCC internal prototype to avoid an error.
16150 Use char because int might match the return type of a GCC
16151 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016152#ifdef __cplusplus
16153extern "C"
16154#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016155char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016156int
16157main ()
16158{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016159return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016160 ;
16161 return 0;
16162}
16163_ACEOF
16164rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016165if { (ac_try="$ac_link"
16166case "(($ac_try" in
16167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16168 *) ac_try_echo=$ac_try;;
16169esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016171 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016172 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016173 grep -v '^ *+' conftest.er1 >conftest.err
16174 rm -f conftest.er1
16175 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016177 (exit $ac_status); } && {
16178 test -z "$ac_c_werror_flag" ||
16179 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016180 } && test -s conftest$ac_exeext &&
16181 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016182 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016183else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016185sed 's/^/| /' conftest.$ac_ext >&5
16186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016187 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016189
16190rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016191 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016192LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016193fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016194{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16195echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16196if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016197 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016198#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016199_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016200
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016201 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016202 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016203 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016204else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016205
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016206 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16207echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016208if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016209 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016210else
Martin v. Löwis11437992002-04-12 09:54:03 +000016211 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016212LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016213cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016214/* confdefs.h. */
16215_ACEOF
16216cat confdefs.h >>conftest.$ac_ext
16217cat >>conftest.$ac_ext <<_ACEOF
16218/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016220/* Override any GCC internal prototype to avoid an error.
16221 Use char because int might match the return type of a GCC
16222 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016223#ifdef __cplusplus
16224extern "C"
16225#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016226char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016227int
16228main ()
16229{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016230return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016231 ;
16232 return 0;
16233}
16234_ACEOF
16235rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016236if { (ac_try="$ac_link"
16237case "(($ac_try" in
16238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16239 *) ac_try_echo=$ac_try;;
16240esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016242 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016244 grep -v '^ *+' conftest.er1 >conftest.err
16245 rm -f conftest.er1
16246 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016248 (exit $ac_status); } && {
16249 test -z "$ac_c_werror_flag" ||
16250 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016251 } && test -s conftest$ac_exeext &&
16252 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016253 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016254else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016255 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016256sed 's/^/| /' conftest.$ac_ext >&5
16257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016258 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016260
16261rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016262 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016263LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016264fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016265{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16266echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16267if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016268 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016269#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016270_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016271
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016272 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016273 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016274 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016275else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016276
Martin v. Löwis130fb172001-07-19 11:00:41 +000016277 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016278fi
16279
Guido van Rossum627b2d71993-12-24 10:39:16 +000016280
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016281fi
16282
Guido van Rossum0be3e491997-05-22 20:33:33 +000016283fi
16284
Guido van Rossum49545951997-12-02 19:28:29 +000016285fi
16286
Guido van Rossumb93a8621998-05-07 13:27:32 +000016287fi
16288
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016290
16291rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016292 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016293fi
16294
Martin v. Löwis11437992002-04-12 09:54:03 +000016295
16296fi
16297
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016298
Michael W. Hudson54241132001-12-07 15:38:26 +000016299
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016300 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16301echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016302if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016303 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016304else
Martin v. Löwis11437992002-04-12 09:54:03 +000016305 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016306LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016307cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016308/* confdefs.h. */
16309_ACEOF
16310cat confdefs.h >>conftest.$ac_ext
16311cat >>conftest.$ac_ext <<_ACEOF
16312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016314/* Override any GCC internal prototype to avoid an error.
16315 Use char because int might match the return type of a GCC
16316 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016317#ifdef __cplusplus
16318extern "C"
16319#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016320char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016321int
16322main ()
16323{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016324return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016325 ;
16326 return 0;
16327}
16328_ACEOF
16329rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016330if { (ac_try="$ac_link"
16331case "(($ac_try" in
16332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16333 *) ac_try_echo=$ac_try;;
16334esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016336 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016337 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016338 grep -v '^ *+' conftest.er1 >conftest.err
16339 rm -f conftest.er1
16340 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016342 (exit $ac_status); } && {
16343 test -z "$ac_c_werror_flag" ||
16344 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016345 } && test -s conftest$ac_exeext &&
16346 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016347 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016348else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016350sed 's/^/| /' conftest.$ac_ext >&5
16351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016352 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016354
16355rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016356 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016357LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016358fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016359{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16360echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16361if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016362 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016363#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016364_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016365
Martin v. Löwis130fb172001-07-19 11:00:41 +000016366 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016367 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016368 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016369fi
16370
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016371
Neal Norwitza978ab02002-11-02 16:58:05 +000016372 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016373 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16374echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016375if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016376 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016377else
Martin v. Löwis11437992002-04-12 09:54:03 +000016378 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016379LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016380cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016381/* confdefs.h. */
16382_ACEOF
16383cat confdefs.h >>conftest.$ac_ext
16384cat >>conftest.$ac_ext <<_ACEOF
16385/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016386
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016387/* Override any GCC internal prototype to avoid an error.
16388 Use char because int might match the return type of a GCC
16389 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016390#ifdef __cplusplus
16391extern "C"
16392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016393char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016394int
16395main ()
16396{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016397return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016398 ;
16399 return 0;
16400}
16401_ACEOF
16402rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016403if { (ac_try="$ac_link"
16404case "(($ac_try" in
16405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16406 *) ac_try_echo=$ac_try;;
16407esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016409 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016411 grep -v '^ *+' conftest.er1 >conftest.err
16412 rm -f conftest.er1
16413 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016415 (exit $ac_status); } && {
16416 test -z "$ac_c_werror_flag" ||
16417 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016418 } && test -s conftest$ac_exeext &&
16419 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016420 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016421else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016423sed 's/^/| /' conftest.$ac_ext >&5
16424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016425 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016427
16428rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016429 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016430LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016431fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016432{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16433echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16434if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016435 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016436#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016437_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016438
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016439 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016440 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016441 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016442fi
16443
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016444 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016445
Martin v. Löwis130fb172001-07-19 11:00:41 +000016446 if test "$USE_THREAD_MODULE" != "#"
16447 then
16448 # If the above checks didn't disable threads, (at least) OSF1
16449 # needs this '-threads' argument during linking.
16450 case $ac_sys_system in
16451 OSF1) LDLAST=-threads;;
16452 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016453 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016454fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016455
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016456if test "$posix_threads" = "yes"; then
16457 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016458
16459cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016460#define _POSIX_THREADS 1
16461_ACEOF
16462
16463 fi
16464
16465 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16466 case $ac_sys_system/$ac_sys_release in
16467 SunOS/5.6)
16468cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016469#define HAVE_PTHREAD_DESTRUCTOR 1
16470_ACEOF
16471
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016472 ;;
16473 SunOS/5.8)
16474cat >>confdefs.h <<\_ACEOF
16475#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16476_ACEOF
16477
16478 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016479 AIX/5)
16480cat >>confdefs.h <<\_ACEOF
16481#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16482_ACEOF
16483
16484 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016485 esac
16486
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016487 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16488echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016489 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016490 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016491else
16492 if test "$cross_compiling" = yes; then
16493 ac_cv_pthread_system_supported=no
16494else
16495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016496/* confdefs.h. */
16497_ACEOF
16498cat confdefs.h >>conftest.$ac_ext
16499cat >>conftest.$ac_ext <<_ACEOF
16500/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016501#include <pthread.h>
16502 void *foo(void *parm) {
16503 return NULL;
16504 }
16505 main() {
16506 pthread_attr_t attr;
16507 pthread_t id;
16508 if (pthread_attr_init(&attr)) exit(-1);
16509 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16510 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16511 exit(0);
16512 }
16513_ACEOF
16514rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016515if { (ac_try="$ac_link"
16516case "(($ac_try" in
16517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16518 *) ac_try_echo=$ac_try;;
16519esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016521 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016522 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016524 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016525 { (case "(($ac_try" in
16526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16527 *) ac_try_echo=$ac_try;;
16528esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016530 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016531 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016533 (exit $ac_status); }; }; then
16534 ac_cv_pthread_system_supported=yes
16535else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016536 echo "$as_me: program exited with status $ac_status" >&5
16537echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016538sed 's/^/| /' conftest.$ac_ext >&5
16539
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016540( exit $ac_status )
16541ac_cv_pthread_system_supported=no
16542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016543rm -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 +000016544fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016545
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016546
16547
Guido van Rossum627b2d71993-12-24 10:39:16 +000016548fi
16549
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016550 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16551echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016552 if test "$ac_cv_pthread_system_supported" = "yes"; then
16553
16554cat >>confdefs.h <<\_ACEOF
16555#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16556_ACEOF
16557
16558 fi
16559
16560for ac_func in pthread_sigmask
16561do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016562as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16563{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16564echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016565if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016566 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016567else
16568 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016569/* confdefs.h. */
16570_ACEOF
16571cat confdefs.h >>conftest.$ac_ext
16572cat >>conftest.$ac_ext <<_ACEOF
16573/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016574/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16575 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16576#define $ac_func innocuous_$ac_func
16577
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016578/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016579 which can conflict with char $ac_func (); below.
16580 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016581 <limits.h> exists even on freestanding compilers. */
16582
16583#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016584# include <limits.h>
16585#else
16586# include <assert.h>
16587#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016588
16589#undef $ac_func
16590
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016591/* Override any GCC internal prototype to avoid an error.
16592 Use char because int might match the return type of a GCC
16593 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016594#ifdef __cplusplus
16595extern "C"
16596#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016597char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016598/* The GNU C library defines this for functions which it implements
16599 to always fail with ENOSYS. Some functions are actually named
16600 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016601#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016602choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016603#endif
16604
Skip Montanaro6dead952003-09-25 14:50:04 +000016605int
16606main ()
16607{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016608return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016609 ;
16610 return 0;
16611}
16612_ACEOF
16613rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016614if { (ac_try="$ac_link"
16615case "(($ac_try" in
16616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16617 *) ac_try_echo=$ac_try;;
16618esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016620 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016622 grep -v '^ *+' conftest.er1 >conftest.err
16623 rm -f conftest.er1
16624 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016626 (exit $ac_status); } && {
16627 test -z "$ac_c_werror_flag" ||
16628 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016629 } && test -s conftest$ac_exeext &&
16630 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016631 eval "$as_ac_var=yes"
16632else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016634sed 's/^/| /' conftest.$ac_ext >&5
16635
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016636 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016638
16639rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016640 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016641fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016642ac_res=`eval echo '${'$as_ac_var'}'`
16643 { echo "$as_me:$LINENO: result: $ac_res" >&5
16644echo "${ECHO_T}$ac_res" >&6; }
16645if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016646 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016647#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016648_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016649 case $ac_sys_system in
16650 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016651
Jason Tishlerfac083d2003-07-22 15:20:49 +000016652cat >>confdefs.h <<\_ACEOF
16653#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16654_ACEOF
16655
16656 ;;
16657 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016658fi
16659done
16660
16661fi
16662
16663
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016664# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016665
16666
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016667{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16668echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016669# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016670if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016671 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016672 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016673 { echo "$as_me:$LINENO: result: no" >&5
16674echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016675 ipv6=no
16676 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016677 *) { echo "$as_me:$LINENO: result: yes" >&5
16678echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016679 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016680#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016681_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016682
16683 ipv6=yes
16684 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016685 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016686else
Martin v. Löwis11437992002-04-12 09:54:03 +000016687
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016688 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016689 { echo "$as_me:$LINENO: result: no" >&5
16690echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016691 ipv6=no
16692
16693else
Martin v. Löwis11437992002-04-12 09:54:03 +000016694 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016695/* confdefs.h. */
16696_ACEOF
16697cat confdefs.h >>conftest.$ac_ext
16698cat >>conftest.$ac_ext <<_ACEOF
16699/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016700 /* AF_INET6 available check */
16701#include <sys/types.h>
16702#include <sys/socket.h>
16703main()
16704{
16705 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16706 exit(1);
16707 else
16708 exit(0);
16709}
16710
Martin v. Löwis11437992002-04-12 09:54:03 +000016711_ACEOF
16712rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016713if { (ac_try="$ac_link"
16714case "(($ac_try" in
16715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16716 *) ac_try_echo=$ac_try;;
16717esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016719 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016720 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016722 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016723 { (case "(($ac_try" in
16724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16725 *) ac_try_echo=$ac_try;;
16726esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016728 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016729 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016731 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016732 { echo "$as_me:$LINENO: result: yes" >&5
16733echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016734 ipv6=yes
16735else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016736 echo "$as_me: program exited with status $ac_status" >&5
16737echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016738sed 's/^/| /' conftest.$ac_ext >&5
16739
Martin v. Löwis11437992002-04-12 09:54:03 +000016740( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016741{ echo "$as_me:$LINENO: result: no" >&5
16742echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016743 ipv6=no
16744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016745rm -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 +000016746fi
16747
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016748
16749
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016750if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016751 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16752echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016753 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016754/* confdefs.h. */
16755_ACEOF
16756cat confdefs.h >>conftest.$ac_ext
16757cat >>conftest.$ac_ext <<_ACEOF
16758/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016759#include <sys/types.h>
16760#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016761int
16762main ()
16763{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016764struct sockaddr_in6 x;
16765x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016766 ;
16767 return 0;
16768}
16769_ACEOF
16770rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016771if { (ac_try="$ac_compile"
16772case "(($ac_try" in
16773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16774 *) ac_try_echo=$ac_try;;
16775esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016779 grep -v '^ *+' conftest.er1 >conftest.err
16780 rm -f conftest.er1
16781 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016783 (exit $ac_status); } && {
16784 test -z "$ac_c_werror_flag" ||
16785 test ! -s conftest.err
16786 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016787 { echo "$as_me:$LINENO: result: yes" >&5
16788echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016789 ipv6=yes
16790else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016792sed 's/^/| /' conftest.$ac_ext >&5
16793
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016794 { echo "$as_me:$LINENO: result: no" >&5
16795echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016796 ipv6=no
16797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016798
16799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016800fi
16801
16802if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016803 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016804#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016805_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016806
16807fi
16808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016809fi
16810
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016811
16812ipv6type=unknown
16813ipv6lib=none
16814ipv6trylibc=no
16815
16816if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016817 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16818echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016819 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16820 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016821 case $i in
16822 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016824/* confdefs.h. */
16825_ACEOF
16826cat confdefs.h >>conftest.$ac_ext
16827cat >>conftest.$ac_ext <<_ACEOF
16828/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016829
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016830#include <netinet/in.h>
16831#ifdef IPV6_INRIA_VERSION
16832yes
16833#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016834_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016835if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016836 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016837 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016838fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000016839rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016840
16841 ;;
16842 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016844/* confdefs.h. */
16845_ACEOF
16846cat confdefs.h >>conftest.$ac_ext
16847cat >>conftest.$ac_ext <<_ACEOF
16848/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016849
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016850#include <netinet/in.h>
16851#ifdef __KAME__
16852yes
16853#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016854_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016855if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016856 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016857 ipv6type=$i;
16858 ipv6lib=inet6
16859 ipv6libdir=/usr/local/v6/lib
16860 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016861fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000016862rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016863
16864 ;;
16865 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016866 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016867/* confdefs.h. */
16868_ACEOF
16869cat confdefs.h >>conftest.$ac_ext
16870cat >>conftest.$ac_ext <<_ACEOF
16871/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016872
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016873#include <features.h>
16874#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16875yes
16876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016877_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016878if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016879 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016880 ipv6type=$i;
16881 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016882fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000016883rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016884
16885 ;;
16886 linux-inet6)
16887 if test -d /usr/inet6; then
16888 ipv6type=$i
16889 ipv6lib=inet6
16890 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016891 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016892 fi
16893 ;;
16894 solaris)
16895 if test -f /etc/netconfig; then
16896 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16897 ipv6type=$i
16898 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016899 fi
16900 fi
16901 ;;
16902 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016903 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016904/* confdefs.h. */
16905_ACEOF
16906cat confdefs.h >>conftest.$ac_ext
16907cat >>conftest.$ac_ext <<_ACEOF
16908/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016909
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016910#include <sys/param.h>
16911#ifdef _TOSHIBA_INET6
16912yes
16913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016914_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016915if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016916 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016917 ipv6type=$i;
16918 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016919 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016920fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000016921rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016922
16923 ;;
16924 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016926/* confdefs.h. */
16927_ACEOF
16928cat confdefs.h >>conftest.$ac_ext
16929cat >>conftest.$ac_ext <<_ACEOF
16930/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016931
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016932#include </usr/local/v6/include/sys/v6config.h>
16933#ifdef __V6D__
16934yes
16935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016936_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016937if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016938 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016939 ipv6type=$i;
16940 ipv6lib=v6;
16941 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016942 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016943fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000016944rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016945
16946 ;;
16947 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016948 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016949/* confdefs.h. */
16950_ACEOF
16951cat confdefs.h >>conftest.$ac_ext
16952cat >>conftest.$ac_ext <<_ACEOF
16953/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016954
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016955#include <sys/param.h>
16956#ifdef _ZETA_MINAMI_INET6
16957yes
16958#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016959_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016961 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016962 ipv6type=$i;
16963 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016964 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016965fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000016966rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016967
16968 ;;
16969 esac
16970 if test "$ipv6type" != "unknown"; then
16971 break
16972 fi
16973 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016974 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16975echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016976fi
16977
16978if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16979 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16980 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16981 echo "using lib$ipv6lib"
16982 else
16983 if test $ipv6trylibc = "yes"; then
16984 echo "using libc"
16985 else
16986 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16987 echo "You need to fetch lib$ipv6lib.a from appropriate"
16988 echo 'ipv6 kit and compile beforehand.'
16989 exit 1
16990 fi
16991 fi
16992fi
16993
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016994{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16995echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016996cat >conftest.$ac_ext <<_ACEOF
16997/* confdefs.h. */
16998_ACEOF
16999cat confdefs.h >>conftest.$ac_ext
17000cat >>conftest.$ac_ext <<_ACEOF
17001/* end confdefs.h. */
17002#include <Carbon/Carbon.h>
17003int
17004main ()
17005{
17006FSIORefNum fRef = 0
17007 ;
17008 return 0;
17009}
17010_ACEOF
17011rm -f conftest.$ac_objext
17012if { (ac_try="$ac_compile"
17013case "(($ac_try" in
17014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17015 *) ac_try_echo=$ac_try;;
17016esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017018 (eval "$ac_compile") 2>conftest.er1
17019 ac_status=$?
17020 grep -v '^ *+' conftest.er1 >conftest.err
17021 rm -f conftest.er1
17022 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017024 (exit $ac_status); } && {
17025 test -z "$ac_c_werror_flag" ||
17026 test ! -s conftest.err
17027 } && test -s conftest.$ac_objext; then
17028
17029cat >>confdefs.h <<\_ACEOF
17030#define HAVE_OSX105_SDK 1
17031_ACEOF
17032
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017033 { echo "$as_me:$LINENO: result: yes" >&5
17034echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017035else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017036 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017037sed 's/^/| /' conftest.$ac_ext >&5
17038
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017039 { echo "$as_me:$LINENO: result: no" >&5
17040echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017041
17042fi
17043
17044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17045
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017046# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017047{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17048echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017050# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017051if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017052 withval=$with_doc_strings;
17053fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017054
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017055
17056if test -z "$with_doc_strings"
17057then with_doc_strings="yes"
17058fi
17059if test "$with_doc_strings" != "no"
17060then
17061
17062cat >>confdefs.h <<\_ACEOF
17063#define WITH_DOC_STRINGS 1
17064_ACEOF
17065
17066fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017067{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17068echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017069
Neil Schemenauera35c6882001-02-27 04:45:05 +000017070# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017071{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17072echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017074# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017075if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017076 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017077if test "$withval" != no
17078then
17079
17080cat >>confdefs.h <<\_ACEOF
17081#define WITH_TSC 1
17082_ACEOF
17083
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017084 { echo "$as_me:$LINENO: result: yes" >&5
17085echo "${ECHO_T}yes" >&6; }
17086else { echo "$as_me:$LINENO: result: no" >&5
17087echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017088fi
17089else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017090 { echo "$as_me:$LINENO: result: no" >&5
17091echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017092fi
17093
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017094
17095# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017096{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17097echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017099# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017100if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017101 withval=$with_pymalloc;
17102fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017103
Neil Schemenauera35c6882001-02-27 04:45:05 +000017104
Neil Schemenauer16c22972002-03-22 15:34:49 +000017105if test -z "$with_pymalloc"
17106then with_pymalloc="yes"
17107fi
17108if test "$with_pymalloc" != "no"
17109then
Martin v. Löwis11437992002-04-12 09:54:03 +000017110
17111cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017112#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017113_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017114
17115fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017116{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17117echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017118
Barry Warsawef82cd72000-06-30 16:21:01 +000017119# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017120{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17121echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017123# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017124if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017125 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017126if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017127then
17128
17129cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017130#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017131_ACEOF
17132
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017133 { echo "$as_me:$LINENO: result: yes" >&5
17134echo "${ECHO_T}yes" >&6; }
17135else { echo "$as_me:$LINENO: result: no" >&5
17136echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017137fi
17138else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017139 { echo "$as_me:$LINENO: result: no" >&5
17140echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017141fi
17142
Barry Warsawef82cd72000-06-30 16:21:01 +000017143
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017144# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017145
Guido van Rossum98935bf2001-09-05 19:13:16 +000017146DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017147
Guido van Rossume97ee181999-12-20 21:27:22 +000017148# the dlopen() function means we might want to use dynload_shlib.o. some
17149# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017150
Thomas Wouters3a584202000-08-05 23:28:51 +000017151for ac_func in dlopen
17152do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017153as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17154{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17155echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017156if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017157 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017158else
Martin v. Löwis11437992002-04-12 09:54:03 +000017159 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017160/* confdefs.h. */
17161_ACEOF
17162cat confdefs.h >>conftest.$ac_ext
17163cat >>conftest.$ac_ext <<_ACEOF
17164/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017165/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17166 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17167#define $ac_func innocuous_$ac_func
17168
Guido van Rossume97ee181999-12-20 21:27:22 +000017169/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017170 which can conflict with char $ac_func (); below.
17171 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017172 <limits.h> exists even on freestanding compilers. */
17173
17174#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017175# include <limits.h>
17176#else
17177# include <assert.h>
17178#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017179
17180#undef $ac_func
17181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017182/* Override any GCC internal prototype to avoid an error.
17183 Use char because int might match the return type of a GCC
17184 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017185#ifdef __cplusplus
17186extern "C"
17187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017188char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017189/* The GNU C library defines this for functions which it implements
17190 to always fail with ENOSYS. Some functions are actually named
17191 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017192#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017193choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017194#endif
17195
Skip Montanaro6dead952003-09-25 14:50:04 +000017196int
17197main ()
17198{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017199return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017200 ;
17201 return 0;
17202}
17203_ACEOF
17204rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017205if { (ac_try="$ac_link"
17206case "(($ac_try" in
17207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17208 *) ac_try_echo=$ac_try;;
17209esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017211 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017213 grep -v '^ *+' conftest.er1 >conftest.err
17214 rm -f conftest.er1
17215 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017217 (exit $ac_status); } && {
17218 test -z "$ac_c_werror_flag" ||
17219 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017220 } && test -s conftest$ac_exeext &&
17221 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017222 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017223else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017225sed 's/^/| /' conftest.$ac_ext >&5
17226
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017227 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017229
17230rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017231 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017232fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017233ac_res=`eval echo '${'$as_ac_var'}'`
17234 { echo "$as_me:$LINENO: result: $ac_res" >&5
17235echo "${ECHO_T}$ac_res" >&6; }
17236if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017237 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017238#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017239_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017240
Guido van Rossume97ee181999-12-20 21:27:22 +000017241fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017242done
Guido van Rossume97ee181999-12-20 21:27:22 +000017243
Michael W. Hudson54241132001-12-07 15:38:26 +000017244
Guido van Rossume97ee181999-12-20 21:27:22 +000017245# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17246# loading of modules.
17247
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017248{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17249echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017250if test -z "$DYNLOADFILE"
17251then
17252 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017253 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17254 if test "$ac_cv_func_dlopen" = yes
17255 then DYNLOADFILE="dynload_shlib.o"
17256 else DYNLOADFILE="dynload_aix.o"
17257 fi
17258 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017259 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017260 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17261 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017262 *)
17263 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17264 # out any dynamic loading
17265 if test "$ac_cv_func_dlopen" = yes
17266 then DYNLOADFILE="dynload_shlib.o"
17267 else DYNLOADFILE="dynload_stub.o"
17268 fi
17269 ;;
17270 esac
17271fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017272{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17273echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017274if test "$DYNLOADFILE" != "dynload_stub.o"
17275then
Martin v. Löwis11437992002-04-12 09:54:03 +000017276
17277cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017278#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017279_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017280
17281fi
17282
Neil Schemenauer4e425612001-06-19 15:44:15 +000017283# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17284
Michael W. Hudson54241132001-12-07 15:38:26 +000017285
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017286{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17287echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017288if test -z "$MACHDEP_OBJS"
17289then
Jack Jansene578a632001-08-15 01:27:14 +000017290 MACHDEP_OBJS=$extra_machdep_objs
17291else
17292 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017293fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017294{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17295echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017296
Guido van Rossum627b2d71993-12-24 10:39:16 +000017297# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
Martin v. Löwisd6320502004-08-12 13:45:08 +000017369
Martin v. Löwisc3001752005-01-23 09:27:24 +000017370
17371
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017372
17373
Thomas Wouterscf297e42007-02-23 15:07:44 +000017374
17375
Gregory P. Smith25523d22007-09-03 16:44:55 +000017376
Christian Heimes4e30a842007-11-30 22:12:06 +000017377
Martin v. Löwis92fab752008-03-08 10:40:41 +000017378
Martin v. Löwis823725e2008-03-24 13:39:54 +000017379
17380
Benjamin Peterson965ce872009-04-05 21:24:58 +000017381
17382
17383
17384
Martin v. Löwis011e8422009-05-05 04:43:17 +000017385
Martin v. Löwis113a0852009-05-29 17:25:39 +000017386
Martin v. Löwis823725e2008-03-24 13:39:54 +000017387for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17388 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017389 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000017390 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000017391 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017392 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017393 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017394 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17395 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000017396 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000017397 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017398 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017399 truncate uname unsetenv utimes waitpid wait3 wait4 \
17400 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017401do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017402as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17403{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17404echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017405if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017406 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017407else
Martin v. Löwis11437992002-04-12 09:54:03 +000017408 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017409/* confdefs.h. */
17410_ACEOF
17411cat confdefs.h >>conftest.$ac_ext
17412cat >>conftest.$ac_ext <<_ACEOF
17413/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017414/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17415 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17416#define $ac_func innocuous_$ac_func
17417
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017418/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017419 which can conflict with char $ac_func (); below.
17420 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017421 <limits.h> exists even on freestanding compilers. */
17422
17423#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017424# include <limits.h>
17425#else
17426# include <assert.h>
17427#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017428
17429#undef $ac_func
17430
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017431/* Override any GCC internal prototype to avoid an error.
17432 Use char because int might match the return type of a GCC
17433 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017434#ifdef __cplusplus
17435extern "C"
17436#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017437char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017438/* The GNU C library defines this for functions which it implements
17439 to always fail with ENOSYS. Some functions are actually named
17440 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017441#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017442choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017443#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017444
Skip Montanaro6dead952003-09-25 14:50:04 +000017445int
17446main ()
17447{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017448return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017449 ;
17450 return 0;
17451}
17452_ACEOF
17453rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017454if { (ac_try="$ac_link"
17455case "(($ac_try" in
17456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17457 *) ac_try_echo=$ac_try;;
17458esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017460 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017461 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017462 grep -v '^ *+' conftest.er1 >conftest.err
17463 rm -f conftest.er1
17464 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017466 (exit $ac_status); } && {
17467 test -z "$ac_c_werror_flag" ||
17468 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017469 } && test -s conftest$ac_exeext &&
17470 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017471 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017472else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017474sed 's/^/| /' conftest.$ac_ext >&5
17475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017476 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017478
17479rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017480 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017481fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017482ac_res=`eval echo '${'$as_ac_var'}'`
17483 { echo "$as_me:$LINENO: result: $ac_res" >&5
17484echo "${ECHO_T}$ac_res" >&6; }
17485if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017486 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017487#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017488_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017489
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017490fi
17491done
17492
Michael W. Hudson54241132001-12-07 15:38:26 +000017493
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017494# For some functions, having a definition is not sufficient, since
17495# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017496{ echo "$as_me:$LINENO: checking for chroot" >&5
17497echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017498cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017499/* confdefs.h. */
17500_ACEOF
17501cat confdefs.h >>conftest.$ac_ext
17502cat >>conftest.$ac_ext <<_ACEOF
17503/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017504#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017505int
17506main ()
17507{
17508void *x=chroot
17509 ;
17510 return 0;
17511}
17512_ACEOF
17513rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017514if { (ac_try="$ac_compile"
17515case "(($ac_try" in
17516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17517 *) ac_try_echo=$ac_try;;
17518esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017520 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017522 grep -v '^ *+' conftest.er1 >conftest.err
17523 rm -f conftest.er1
17524 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017526 (exit $ac_status); } && {
17527 test -z "$ac_c_werror_flag" ||
17528 test ! -s conftest.err
17529 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017530
17531cat >>confdefs.h <<\_ACEOF
17532#define HAVE_CHROOT 1
17533_ACEOF
17534
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017535 { echo "$as_me:$LINENO: result: yes" >&5
17536echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017537else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017539sed 's/^/| /' conftest.$ac_ext >&5
17540
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017541 { echo "$as_me:$LINENO: result: no" >&5
17542echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017543
17544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017545
17546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017547{ echo "$as_me:$LINENO: checking for link" >&5
17548echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017549cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017550/* confdefs.h. */
17551_ACEOF
17552cat confdefs.h >>conftest.$ac_ext
17553cat >>conftest.$ac_ext <<_ACEOF
17554/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017555#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017556int
17557main ()
17558{
17559void *x=link
17560 ;
17561 return 0;
17562}
17563_ACEOF
17564rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017565if { (ac_try="$ac_compile"
17566case "(($ac_try" in
17567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17568 *) ac_try_echo=$ac_try;;
17569esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017571 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017573 grep -v '^ *+' conftest.er1 >conftest.err
17574 rm -f conftest.er1
17575 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017577 (exit $ac_status); } && {
17578 test -z "$ac_c_werror_flag" ||
17579 test ! -s conftest.err
17580 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017581
17582cat >>confdefs.h <<\_ACEOF
17583#define HAVE_LINK 1
17584_ACEOF
17585
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017586 { echo "$as_me:$LINENO: result: yes" >&5
17587echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017588else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017590sed 's/^/| /' conftest.$ac_ext >&5
17591
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017592 { echo "$as_me:$LINENO: result: no" >&5
17593echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017594
17595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017596
17597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017598{ echo "$as_me:$LINENO: checking for symlink" >&5
17599echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017600cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017601/* confdefs.h. */
17602_ACEOF
17603cat confdefs.h >>conftest.$ac_ext
17604cat >>conftest.$ac_ext <<_ACEOF
17605/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017606#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017607int
17608main ()
17609{
17610void *x=symlink
17611 ;
17612 return 0;
17613}
17614_ACEOF
17615rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017616if { (ac_try="$ac_compile"
17617case "(($ac_try" in
17618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17619 *) ac_try_echo=$ac_try;;
17620esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017622 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017624 grep -v '^ *+' conftest.er1 >conftest.err
17625 rm -f conftest.er1
17626 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017628 (exit $ac_status); } && {
17629 test -z "$ac_c_werror_flag" ||
17630 test ! -s conftest.err
17631 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017632
17633cat >>confdefs.h <<\_ACEOF
17634#define HAVE_SYMLINK 1
17635_ACEOF
17636
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017637 { echo "$as_me:$LINENO: result: yes" >&5
17638echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017639else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017641sed 's/^/| /' conftest.$ac_ext >&5
17642
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017643 { echo "$as_me:$LINENO: result: no" >&5
17644echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017645
17646fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017647
17648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017649{ echo "$as_me:$LINENO: checking for fchdir" >&5
17650echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +000017657#include <unistd.h>
17658int
17659main ()
17660{
17661void *x=fchdir
17662 ;
17663 return 0;
17664}
17665_ACEOF
17666rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017667if { (ac_try="$ac_compile"
17668case "(($ac_try" in
17669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17670 *) ac_try_echo=$ac_try;;
17671esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017673 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017675 grep -v '^ *+' conftest.er1 >conftest.err
17676 rm -f conftest.er1
17677 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017679 (exit $ac_status); } && {
17680 test -z "$ac_c_werror_flag" ||
17681 test ! -s conftest.err
17682 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017683
17684cat >>confdefs.h <<\_ACEOF
17685#define HAVE_FCHDIR 1
17686_ACEOF
17687
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017688 { echo "$as_me:$LINENO: result: yes" >&5
17689echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017690else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017692sed 's/^/| /' conftest.$ac_ext >&5
17693
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017694 { echo "$as_me:$LINENO: result: no" >&5
17695echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017696
17697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017698
17699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017700{ echo "$as_me:$LINENO: checking for fsync" >&5
17701echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017702cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017703/* confdefs.h. */
17704_ACEOF
17705cat confdefs.h >>conftest.$ac_ext
17706cat >>conftest.$ac_ext <<_ACEOF
17707/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017708#include <unistd.h>
17709int
17710main ()
17711{
17712void *x=fsync
17713 ;
17714 return 0;
17715}
17716_ACEOF
17717rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017718if { (ac_try="$ac_compile"
17719case "(($ac_try" in
17720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17721 *) ac_try_echo=$ac_try;;
17722esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017724 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017726 grep -v '^ *+' conftest.er1 >conftest.err
17727 rm -f conftest.er1
17728 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017730 (exit $ac_status); } && {
17731 test -z "$ac_c_werror_flag" ||
17732 test ! -s conftest.err
17733 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017734
17735cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017736#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017737_ACEOF
17738
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017739 { echo "$as_me:$LINENO: result: yes" >&5
17740echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017741else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017743sed 's/^/| /' conftest.$ac_ext >&5
17744
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017745 { echo "$as_me:$LINENO: result: no" >&5
17746echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017747
17748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017749
17750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017751{ echo "$as_me:$LINENO: checking for fdatasync" >&5
17752echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017753cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017754/* confdefs.h. */
17755_ACEOF
17756cat confdefs.h >>conftest.$ac_ext
17757cat >>conftest.$ac_ext <<_ACEOF
17758/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017759#include <unistd.h>
17760int
17761main ()
17762{
17763void *x=fdatasync
17764 ;
17765 return 0;
17766}
17767_ACEOF
17768rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017769if { (ac_try="$ac_compile"
17770case "(($ac_try" in
17771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17772 *) ac_try_echo=$ac_try;;
17773esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017775 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017777 grep -v '^ *+' conftest.er1 >conftest.err
17778 rm -f conftest.er1
17779 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017781 (exit $ac_status); } && {
17782 test -z "$ac_c_werror_flag" ||
17783 test ! -s conftest.err
17784 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017785
17786cat >>confdefs.h <<\_ACEOF
17787#define HAVE_FDATASYNC 1
17788_ACEOF
17789
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017790 { echo "$as_me:$LINENO: result: yes" >&5
17791echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017792else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017794sed 's/^/| /' conftest.$ac_ext >&5
17795
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017796 { echo "$as_me:$LINENO: result: no" >&5
17797echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017798
17799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017800
17801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017802{ echo "$as_me:$LINENO: checking for epoll" >&5
17803echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017804cat >conftest.$ac_ext <<_ACEOF
17805/* confdefs.h. */
17806_ACEOF
17807cat confdefs.h >>conftest.$ac_ext
17808cat >>conftest.$ac_ext <<_ACEOF
17809/* end confdefs.h. */
17810#include <sys/epoll.h>
17811int
17812main ()
17813{
17814void *x=epoll_create
17815 ;
17816 return 0;
17817}
17818_ACEOF
17819rm -f conftest.$ac_objext
17820if { (ac_try="$ac_compile"
17821case "(($ac_try" in
17822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17823 *) ac_try_echo=$ac_try;;
17824esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017826 (eval "$ac_compile") 2>conftest.er1
17827 ac_status=$?
17828 grep -v '^ *+' conftest.er1 >conftest.err
17829 rm -f conftest.er1
17830 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017832 (exit $ac_status); } && {
17833 test -z "$ac_c_werror_flag" ||
17834 test ! -s conftest.err
17835 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017836
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017837cat >>confdefs.h <<\_ACEOF
17838#define HAVE_EPOLL 1
17839_ACEOF
17840
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017841 { echo "$as_me:$LINENO: result: yes" >&5
17842echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017843else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017844 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017845sed 's/^/| /' conftest.$ac_ext >&5
17846
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017847 { echo "$as_me:$LINENO: result: no" >&5
17848echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017849
17850fi
17851
17852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017853{ echo "$as_me:$LINENO: checking for kqueue" >&5
17854echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017855cat >conftest.$ac_ext <<_ACEOF
17856/* confdefs.h. */
17857_ACEOF
17858cat confdefs.h >>conftest.$ac_ext
17859cat >>conftest.$ac_ext <<_ACEOF
17860/* end confdefs.h. */
17861
17862#include <sys/types.h>
17863#include <sys/event.h>
17864
17865int
17866main ()
17867{
17868int x=kqueue()
17869 ;
17870 return 0;
17871}
17872_ACEOF
17873rm -f conftest.$ac_objext
17874if { (ac_try="$ac_compile"
17875case "(($ac_try" in
17876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17877 *) ac_try_echo=$ac_try;;
17878esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017880 (eval "$ac_compile") 2>conftest.er1
17881 ac_status=$?
17882 grep -v '^ *+' conftest.er1 >conftest.err
17883 rm -f conftest.er1
17884 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017886 (exit $ac_status); } && {
17887 test -z "$ac_c_werror_flag" ||
17888 test ! -s conftest.err
17889 } && test -s conftest.$ac_objext; then
17890
17891cat >>confdefs.h <<\_ACEOF
17892#define HAVE_KQUEUE 1
17893_ACEOF
17894
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017895 { echo "$as_me:$LINENO: result: yes" >&5
17896echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017897else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017898 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017899sed 's/^/| /' conftest.$ac_ext >&5
17900
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017901 { echo "$as_me:$LINENO: result: no" >&5
17902echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017903
17904fi
17905
17906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017907# On some systems (eg. FreeBSD 5), we would find a definition of the
17908# functions ctermid_r, setgroups in the library, but no prototype
17909# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
17910# address to avoid compiler warnings and potential miscompilations
17911# because of the missing prototypes.
17912
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017913{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
17914echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017915cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017916/* confdefs.h. */
17917_ACEOF
17918cat confdefs.h >>conftest.$ac_ext
17919cat >>conftest.$ac_ext <<_ACEOF
17920/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017921
17922#include "confdefs.h"
17923#include <stdio.h>
17924
Martin v. Löwisd5843682002-11-21 20:41:28 +000017925int
17926main ()
17927{
17928void* p = ctermid_r
17929 ;
17930 return 0;
17931}
17932_ACEOF
17933rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017934if { (ac_try="$ac_compile"
17935case "(($ac_try" in
17936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17937 *) ac_try_echo=$ac_try;;
17938esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017940 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017941 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017942 grep -v '^ *+' conftest.er1 >conftest.err
17943 rm -f conftest.er1
17944 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017946 (exit $ac_status); } && {
17947 test -z "$ac_c_werror_flag" ||
17948 test ! -s conftest.err
17949 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017950
17951cat >>confdefs.h <<\_ACEOF
17952#define HAVE_CTERMID_R 1
17953_ACEOF
17954
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017955 { echo "$as_me:$LINENO: result: yes" >&5
17956echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017957else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017958 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017959sed 's/^/| /' conftest.$ac_ext >&5
17960
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017961 { echo "$as_me:$LINENO: result: no" >&5
17962echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017963
17964fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17967
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017968{ echo "$as_me:$LINENO: checking for flock" >&5
17969echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017970cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017971/* confdefs.h. */
17972_ACEOF
17973cat confdefs.h >>conftest.$ac_ext
17974cat >>conftest.$ac_ext <<_ACEOF
17975/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017976
17977#include "confdefs.h"
17978#include <sys/file.h>
17979
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017980int
17981main ()
17982{
17983void* p = flock
17984 ;
17985 return 0;
17986}
17987_ACEOF
17988rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017989if { (ac_try="$ac_compile"
17990case "(($ac_try" in
17991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17992 *) ac_try_echo=$ac_try;;
17993esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017995 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017996 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017997 grep -v '^ *+' conftest.er1 >conftest.err
17998 rm -f conftest.er1
17999 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018001 (exit $ac_status); } && {
18002 test -z "$ac_c_werror_flag" ||
18003 test ! -s conftest.err
18004 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018005
18006cat >>confdefs.h <<\_ACEOF
18007#define HAVE_FLOCK 1
18008_ACEOF
18009
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018010 { echo "$as_me:$LINENO: result: yes" >&5
18011echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018012else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018013 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018014sed 's/^/| /' conftest.$ac_ext >&5
18015
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018016 { echo "$as_me:$LINENO: result: no" >&5
18017echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018018
18019fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018020
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18022
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018023{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18024echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018025cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018026/* confdefs.h. */
18027_ACEOF
18028cat confdefs.h >>conftest.$ac_ext
18029cat >>conftest.$ac_ext <<_ACEOF
18030/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018031
18032#include "confdefs.h"
18033#include <unistd.h>
18034
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018035int
18036main ()
18037{
18038void* p = getpagesize
18039 ;
18040 return 0;
18041}
18042_ACEOF
18043rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018044if { (ac_try="$ac_compile"
18045case "(($ac_try" in
18046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18047 *) ac_try_echo=$ac_try;;
18048esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018050 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018052 grep -v '^ *+' conftest.er1 >conftest.err
18053 rm -f conftest.er1
18054 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018056 (exit $ac_status); } && {
18057 test -z "$ac_c_werror_flag" ||
18058 test ! -s conftest.err
18059 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018060
18061cat >>confdefs.h <<\_ACEOF
18062#define HAVE_GETPAGESIZE 1
18063_ACEOF
18064
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018065 { echo "$as_me:$LINENO: result: yes" >&5
18066echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018067else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018069sed 's/^/| /' conftest.$ac_ext >&5
18070
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018071 { echo "$as_me:$LINENO: result: no" >&5
18072echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018073
18074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018075
18076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018077
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018078for ac_prog in true
18079do
18080 # Extract the first word of "$ac_prog", so it can be a program name with args.
18081set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018082{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18083echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018084if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018085 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018086else
18087 if test -n "$TRUE"; then
18088 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18089else
18090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18091for as_dir in $PATH
18092do
18093 IFS=$as_save_IFS
18094 test -z "$as_dir" && as_dir=.
18095 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018096 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 +000018097 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018098 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018099 break 2
18100 fi
18101done
18102done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018103IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018104
18105fi
18106fi
18107TRUE=$ac_cv_prog_TRUE
18108if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018109 { echo "$as_me:$LINENO: result: $TRUE" >&5
18110echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018111else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018112 { echo "$as_me:$LINENO: result: no" >&5
18113echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018114fi
18115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018116
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018117 test -n "$TRUE" && break
18118done
18119test -n "$TRUE" || TRUE="/bin/true"
18120
18121
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018122{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18123echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018124if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018125 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018126else
18127 ac_check_lib_save_LIBS=$LIBS
18128LIBS="-lc $LIBS"
18129cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018130/* confdefs.h. */
18131_ACEOF
18132cat confdefs.h >>conftest.$ac_ext
18133cat >>conftest.$ac_ext <<_ACEOF
18134/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018136/* Override any GCC internal prototype to avoid an error.
18137 Use char because int might match the return type of a GCC
18138 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018139#ifdef __cplusplus
18140extern "C"
18141#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018142char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018143int
18144main ()
18145{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018146return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018147 ;
18148 return 0;
18149}
18150_ACEOF
18151rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018152if { (ac_try="$ac_link"
18153case "(($ac_try" in
18154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18155 *) ac_try_echo=$ac_try;;
18156esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018158 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018159 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018160 grep -v '^ *+' conftest.er1 >conftest.err
18161 rm -f conftest.er1
18162 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018164 (exit $ac_status); } && {
18165 test -z "$ac_c_werror_flag" ||
18166 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018167 } && test -s conftest$ac_exeext &&
18168 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018169 ac_cv_lib_c_inet_aton=yes
18170else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018172sed 's/^/| /' conftest.$ac_ext >&5
18173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018174 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018176
18177rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018178 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018179LIBS=$ac_check_lib_save_LIBS
18180fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018181{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18182echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18183if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018184 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018185else
18186
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018187{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18188echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018189if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018190 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018191else
18192 ac_check_lib_save_LIBS=$LIBS
18193LIBS="-lresolv $LIBS"
18194cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018195/* confdefs.h. */
18196_ACEOF
18197cat confdefs.h >>conftest.$ac_ext
18198cat >>conftest.$ac_ext <<_ACEOF
18199/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018201/* Override any GCC internal prototype to avoid an error.
18202 Use char because int might match the return type of a GCC
18203 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018204#ifdef __cplusplus
18205extern "C"
18206#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018207char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018208int
18209main ()
18210{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018211return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018212 ;
18213 return 0;
18214}
18215_ACEOF
18216rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018217if { (ac_try="$ac_link"
18218case "(($ac_try" in
18219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18220 *) ac_try_echo=$ac_try;;
18221esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018223 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018224 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018225 grep -v '^ *+' conftest.er1 >conftest.err
18226 rm -f conftest.er1
18227 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018229 (exit $ac_status); } && {
18230 test -z "$ac_c_werror_flag" ||
18231 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018232 } && test -s conftest$ac_exeext &&
18233 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018234 ac_cv_lib_resolv_inet_aton=yes
18235else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018236 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018237sed 's/^/| /' conftest.$ac_ext >&5
18238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018239 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018241
18242rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018243 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018244LIBS=$ac_check_lib_save_LIBS
18245fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018246{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18247echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18248if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018249 cat >>confdefs.h <<_ACEOF
18250#define HAVE_LIBRESOLV 1
18251_ACEOF
18252
18253 LIBS="-lresolv $LIBS"
18254
18255fi
18256
18257
18258fi
18259
18260
Christian Heimesd0764e22007-12-04 15:00:33 +000018261# On Tru64, chflags seems to be present, but calling it will
18262# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018263{ echo "$as_me:$LINENO: checking for chflags" >&5
18264echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018265if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018266 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018267else
18268 if test "$cross_compiling" = yes; then
18269 ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018270else
18271 cat >conftest.$ac_ext <<_ACEOF
18272/* confdefs.h. */
18273_ACEOF
18274cat confdefs.h >>conftest.$ac_ext
18275cat >>conftest.$ac_ext <<_ACEOF
18276/* end confdefs.h. */
18277
18278#include <sys/stat.h>
18279#include <unistd.h>
18280int main(int argc, char*argv[])
18281{
18282 if(chflags(argv[0], 0) != 0)
18283 return 1;
18284 return 0;
18285}
18286
18287_ACEOF
18288rm -f conftest$ac_exeext
18289if { (ac_try="$ac_link"
18290case "(($ac_try" in
18291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18292 *) ac_try_echo=$ac_try;;
18293esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018295 (eval "$ac_link") 2>&5
18296 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018298 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18299 { (case "(($ac_try" in
18300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18301 *) ac_try_echo=$ac_try;;
18302esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018304 (eval "$ac_try") 2>&5
18305 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018307 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018308 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018309else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018310 echo "$as_me: program exited with status $ac_status" >&5
18311echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018312sed 's/^/| /' conftest.$ac_ext >&5
18313
18314( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018315ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018316fi
18317rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018318fi
18319
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018320
18321
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018322fi
18323
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018324{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18325echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018326if test $ac_cv_have_chflags = yes
18327then
18328
18329cat >>confdefs.h <<\_ACEOF
18330#define HAVE_CHFLAGS 1
18331_ACEOF
18332
18333fi
18334
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018335{ echo "$as_me:$LINENO: checking for lchflags" >&5
18336echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018337if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018338 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018339else
18340 if test "$cross_compiling" = yes; then
18341 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018342else
18343 cat >conftest.$ac_ext <<_ACEOF
18344/* confdefs.h. */
18345_ACEOF
18346cat confdefs.h >>conftest.$ac_ext
18347cat >>conftest.$ac_ext <<_ACEOF
18348/* end confdefs.h. */
18349
18350#include <sys/stat.h>
18351#include <unistd.h>
18352int main(int argc, char*argv[])
18353{
18354 if(lchflags(argv[0], 0) != 0)
18355 return 1;
18356 return 0;
18357}
18358
18359_ACEOF
18360rm -f conftest$ac_exeext
18361if { (ac_try="$ac_link"
18362case "(($ac_try" in
18363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18364 *) ac_try_echo=$ac_try;;
18365esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018367 (eval "$ac_link") 2>&5
18368 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018370 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18371 { (case "(($ac_try" in
18372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18373 *) ac_try_echo=$ac_try;;
18374esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018376 (eval "$ac_try") 2>&5
18377 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018379 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018380 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018381else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018382 echo "$as_me: program exited with status $ac_status" >&5
18383echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018384sed 's/^/| /' conftest.$ac_ext >&5
18385
18386( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018387ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018388fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018389rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18390fi
18391
18392
Christian Heimesd0764e22007-12-04 15:00:33 +000018393
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018394fi
18395
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018396{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18397echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018398if test $ac_cv_have_lchflags = yes
18399then
18400
18401cat >>confdefs.h <<\_ACEOF
18402#define HAVE_LCHFLAGS 1
18403_ACEOF
18404
18405fi
18406
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018407case $ac_sys_system/$ac_sys_release in
18408Darwin/*)
18409 _CUR_CFLAGS="${CFLAGS}"
18410 _CUR_LDFLAGS="${LDFLAGS}"
18411 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18412 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18413 ;;
18414esac
18415
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018416{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18417echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018418if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018419 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018420else
18421 ac_check_lib_save_LIBS=$LIBS
18422LIBS="-lz $LIBS"
18423cat >conftest.$ac_ext <<_ACEOF
18424/* confdefs.h. */
18425_ACEOF
18426cat confdefs.h >>conftest.$ac_ext
18427cat >>conftest.$ac_ext <<_ACEOF
18428/* end confdefs.h. */
18429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018430/* Override any GCC internal prototype to avoid an error.
18431 Use char because int might match the return type of a GCC
18432 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018433#ifdef __cplusplus
18434extern "C"
18435#endif
18436char inflateCopy ();
18437int
18438main ()
18439{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018440return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018441 ;
18442 return 0;
18443}
18444_ACEOF
18445rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018446if { (ac_try="$ac_link"
18447case "(($ac_try" in
18448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18449 *) ac_try_echo=$ac_try;;
18450esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018452 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018453 ac_status=$?
18454 grep -v '^ *+' conftest.er1 >conftest.err
18455 rm -f conftest.er1
18456 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018458 (exit $ac_status); } && {
18459 test -z "$ac_c_werror_flag" ||
18460 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018461 } && test -s conftest$ac_exeext &&
18462 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018463 ac_cv_lib_z_inflateCopy=yes
18464else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018465 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018466sed 's/^/| /' conftest.$ac_ext >&5
18467
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018468 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018469fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018470
18471rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018472 conftest$ac_exeext conftest.$ac_ext
18473LIBS=$ac_check_lib_save_LIBS
18474fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018475{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18476echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18477if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018478
18479cat >>confdefs.h <<\_ACEOF
18480#define HAVE_ZLIB_COPY 1
18481_ACEOF
18482
18483fi
18484
18485
18486case $ac_sys_system/$ac_sys_release in
18487Darwin/*)
18488 CFLAGS="${_CUR_CFLAGS}"
18489 LDFLAGS="${_CUR_LDFLAGS}"
18490 ;;
18491esac
18492
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018493{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18494echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018495cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018496/* confdefs.h. */
18497_ACEOF
18498cat confdefs.h >>conftest.$ac_ext
18499cat >>conftest.$ac_ext <<_ACEOF
18500/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018501
18502#include "confdefs.h"
18503#include <netdb.h>
18504
Martin v. Löwise9416172003-05-03 10:12:45 +000018505int
18506main ()
18507{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018508void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018509 ;
18510 return 0;
18511}
18512_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018513rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018514if { (ac_try="$ac_link"
18515case "(($ac_try" in
18516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18517 *) ac_try_echo=$ac_try;;
18518esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018520 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018522 grep -v '^ *+' conftest.er1 >conftest.err
18523 rm -f conftest.er1
18524 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018526 (exit $ac_status); } && {
18527 test -z "$ac_c_werror_flag" ||
18528 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018529 } && test -s conftest$ac_exeext &&
18530 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018531
18532cat >>confdefs.h <<\_ACEOF
18533#define HAVE_HSTRERROR 1
18534_ACEOF
18535
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018536 { echo "$as_me:$LINENO: result: yes" >&5
18537echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018538else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018539 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018540sed 's/^/| /' conftest.$ac_ext >&5
18541
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018542 { echo "$as_me:$LINENO: result: no" >&5
18543echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018544
18545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018546
18547rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018548 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018549
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018550{ echo "$as_me:$LINENO: checking for inet_aton" >&5
18551echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018552cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018553/* confdefs.h. */
18554_ACEOF
18555cat confdefs.h >>conftest.$ac_ext
18556cat >>conftest.$ac_ext <<_ACEOF
18557/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018558
18559#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018560#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018561#include <sys/socket.h>
18562#include <netinet/in.h>
18563#include <arpa/inet.h>
18564
Martin v. Löwise9416172003-05-03 10:12:45 +000018565int
18566main ()
18567{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018568void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018569 ;
18570 return 0;
18571}
18572_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018573rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018574if { (ac_try="$ac_link"
18575case "(($ac_try" in
18576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18577 *) ac_try_echo=$ac_try;;
18578esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018580 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018582 grep -v '^ *+' conftest.er1 >conftest.err
18583 rm -f conftest.er1
18584 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018586 (exit $ac_status); } && {
18587 test -z "$ac_c_werror_flag" ||
18588 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018589 } && test -s conftest$ac_exeext &&
18590 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018591
18592cat >>confdefs.h <<\_ACEOF
18593#define HAVE_INET_ATON 1
18594_ACEOF
18595
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018596 { echo "$as_me:$LINENO: result: yes" >&5
18597echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018598else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018600sed 's/^/| /' conftest.$ac_ext >&5
18601
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018602 { echo "$as_me:$LINENO: result: no" >&5
18603echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018604
18605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018606
18607rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018608 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018609
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018610{ echo "$as_me:$LINENO: checking for inet_pton" >&5
18611echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018612cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018613/* confdefs.h. */
18614_ACEOF
18615cat confdefs.h >>conftest.$ac_ext
18616cat >>conftest.$ac_ext <<_ACEOF
18617/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018618
18619#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018620#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018621#include <sys/socket.h>
18622#include <netinet/in.h>
18623#include <arpa/inet.h>
18624
Martin v. Löwise9416172003-05-03 10:12:45 +000018625int
18626main ()
18627{
18628void* p = inet_pton
18629 ;
18630 return 0;
18631}
18632_ACEOF
18633rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018634if { (ac_try="$ac_compile"
18635case "(($ac_try" in
18636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18637 *) ac_try_echo=$ac_try;;
18638esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018640 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018641 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018642 grep -v '^ *+' conftest.er1 >conftest.err
18643 rm -f conftest.er1
18644 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018646 (exit $ac_status); } && {
18647 test -z "$ac_c_werror_flag" ||
18648 test ! -s conftest.err
18649 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018650
18651cat >>confdefs.h <<\_ACEOF
18652#define HAVE_INET_PTON 1
18653_ACEOF
18654
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018655 { echo "$as_me:$LINENO: result: yes" >&5
18656echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018657else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018659sed 's/^/| /' conftest.$ac_ext >&5
18660
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018661 { echo "$as_me:$LINENO: result: no" >&5
18662echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018663
18664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018665
18666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018667
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018668# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018669{ echo "$as_me:$LINENO: checking for setgroups" >&5
18670echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018671cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018672/* confdefs.h. */
18673_ACEOF
18674cat confdefs.h >>conftest.$ac_ext
18675cat >>conftest.$ac_ext <<_ACEOF
18676/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018677
18678#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018679#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018680#ifdef HAVE_GRP_H
18681#include <grp.h>
18682#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000018683
Martin v. Löwisd5843682002-11-21 20:41:28 +000018684int
18685main ()
18686{
18687void* p = setgroups
18688 ;
18689 return 0;
18690}
18691_ACEOF
18692rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018693if { (ac_try="$ac_compile"
18694case "(($ac_try" in
18695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18696 *) ac_try_echo=$ac_try;;
18697esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018699 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018701 grep -v '^ *+' conftest.er1 >conftest.err
18702 rm -f conftest.er1
18703 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018705 (exit $ac_status); } && {
18706 test -z "$ac_c_werror_flag" ||
18707 test ! -s conftest.err
18708 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018709
18710cat >>confdefs.h <<\_ACEOF
18711#define HAVE_SETGROUPS 1
18712_ACEOF
18713
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018714 { echo "$as_me:$LINENO: result: yes" >&5
18715echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018716else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018718sed 's/^/| /' conftest.$ac_ext >&5
18719
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018720 { echo "$as_me:$LINENO: result: no" >&5
18721echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018722
18723fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018724
18725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018726
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018727# check for openpty and forkpty
18728
Martin v. Löwis11437992002-04-12 09:54:03 +000018729
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018730for ac_func in openpty
18731do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018732as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18733{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18734echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018735if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018736 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018737else
Martin v. Löwis11437992002-04-12 09:54:03 +000018738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018739/* confdefs.h. */
18740_ACEOF
18741cat confdefs.h >>conftest.$ac_ext
18742cat >>conftest.$ac_ext <<_ACEOF
18743/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018744/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18745 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18746#define $ac_func innocuous_$ac_func
18747
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018748/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018749 which can conflict with char $ac_func (); below.
18750 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018751 <limits.h> exists even on freestanding compilers. */
18752
18753#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018754# include <limits.h>
18755#else
18756# include <assert.h>
18757#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018758
18759#undef $ac_func
18760
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018761/* Override any GCC internal prototype to avoid an error.
18762 Use char because int might match the return type of a GCC
18763 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018764#ifdef __cplusplus
18765extern "C"
18766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018767char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018768/* The GNU C library defines this for functions which it implements
18769 to always fail with ENOSYS. Some functions are actually named
18770 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018771#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018772choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018773#endif
18774
Skip Montanaro6dead952003-09-25 14:50:04 +000018775int
18776main ()
18777{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018778return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018779 ;
18780 return 0;
18781}
18782_ACEOF
18783rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018784if { (ac_try="$ac_link"
18785case "(($ac_try" in
18786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18787 *) ac_try_echo=$ac_try;;
18788esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018790 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +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 Oussoren74f29b42009-09-20 20:09:26 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018799 } && test -s conftest$ac_exeext &&
18800 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018801 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018802else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018804sed 's/^/| /' conftest.$ac_ext >&5
18805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018806 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018808
18809rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018810 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018811fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018812ac_res=`eval echo '${'$as_ac_var'}'`
18813 { echo "$as_me:$LINENO: result: $ac_res" >&5
18814echo "${ECHO_T}$ac_res" >&6; }
18815if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018816 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018817#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018818_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018819
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018820else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018821 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18822echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018823if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018824 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018825else
Martin v. Löwis11437992002-04-12 09:54:03 +000018826 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018827LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018828cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018829/* confdefs.h. */
18830_ACEOF
18831cat confdefs.h >>conftest.$ac_ext
18832cat >>conftest.$ac_ext <<_ACEOF
18833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018835/* Override any GCC internal prototype to avoid an error.
18836 Use char because int might match the return type of a GCC
18837 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018838#ifdef __cplusplus
18839extern "C"
18840#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018841char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018842int
18843main ()
18844{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018845return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018846 ;
18847 return 0;
18848}
18849_ACEOF
18850rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018851if { (ac_try="$ac_link"
18852case "(($ac_try" in
18853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18854 *) ac_try_echo=$ac_try;;
18855esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018857 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018859 grep -v '^ *+' conftest.er1 >conftest.err
18860 rm -f conftest.er1
18861 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018863 (exit $ac_status); } && {
18864 test -z "$ac_c_werror_flag" ||
18865 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018866 } && test -s conftest$ac_exeext &&
18867 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018868 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018869else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018871sed 's/^/| /' conftest.$ac_ext >&5
18872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018873 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018875
18876rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018877 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018878LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018879fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018880{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18881echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
18882if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018883 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018884#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018885_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018886 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018887else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018888 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18889echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018890if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018891 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018892else
18893 ac_check_lib_save_LIBS=$LIBS
18894LIBS="-lbsd $LIBS"
18895cat >conftest.$ac_ext <<_ACEOF
18896/* confdefs.h. */
18897_ACEOF
18898cat confdefs.h >>conftest.$ac_ext
18899cat >>conftest.$ac_ext <<_ACEOF
18900/* end confdefs.h. */
18901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018902/* Override any GCC internal prototype to avoid an error.
18903 Use char because int might match the return type of a GCC
18904 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018905#ifdef __cplusplus
18906extern "C"
18907#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018908char openpty ();
18909int
18910main ()
18911{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018912return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018913 ;
18914 return 0;
18915}
18916_ACEOF
18917rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018918if { (ac_try="$ac_link"
18919case "(($ac_try" in
18920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18921 *) ac_try_echo=$ac_try;;
18922esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018924 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018925 ac_status=$?
18926 grep -v '^ *+' conftest.er1 >conftest.err
18927 rm -f conftest.er1
18928 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018930 (exit $ac_status); } && {
18931 test -z "$ac_c_werror_flag" ||
18932 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018933 } && test -s conftest$ac_exeext &&
18934 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018935 ac_cv_lib_bsd_openpty=yes
18936else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018937 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018938sed 's/^/| /' conftest.$ac_ext >&5
18939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018940 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018942
18943rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018944 conftest$ac_exeext conftest.$ac_ext
18945LIBS=$ac_check_lib_save_LIBS
18946fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018947{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18948echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
18949if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018950 cat >>confdefs.h <<\_ACEOF
18951#define HAVE_OPENPTY 1
18952_ACEOF
18953 LIBS="$LIBS -lbsd"
18954fi
18955
18956
18957fi
18958
Fred Drake8cef4cf2000-06-28 16:40:38 +000018959
18960fi
18961done
18962
Martin v. Löwis11437992002-04-12 09:54:03 +000018963
Fred Drake8cef4cf2000-06-28 16:40:38 +000018964for ac_func in forkpty
18965do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018966as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18967{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18968echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018969if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018970 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018971else
Martin v. Löwis11437992002-04-12 09:54:03 +000018972 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018973/* confdefs.h. */
18974_ACEOF
18975cat confdefs.h >>conftest.$ac_ext
18976cat >>conftest.$ac_ext <<_ACEOF
18977/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018978/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18979 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18980#define $ac_func innocuous_$ac_func
18981
Fred Drake8cef4cf2000-06-28 16:40:38 +000018982/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018983 which can conflict with char $ac_func (); below.
18984 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018985 <limits.h> exists even on freestanding compilers. */
18986
18987#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018988# include <limits.h>
18989#else
18990# include <assert.h>
18991#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018992
18993#undef $ac_func
18994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018995/* Override any GCC internal prototype to avoid an error.
18996 Use char because int might match the return type of a GCC
18997 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018998#ifdef __cplusplus
18999extern "C"
19000#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019001char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019002/* The GNU C library defines this for functions which it implements
19003 to always fail with ENOSYS. Some functions are actually named
19004 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019005#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019006choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019007#endif
19008
Skip Montanaro6dead952003-09-25 14:50:04 +000019009int
19010main ()
19011{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019012return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019013 ;
19014 return 0;
19015}
19016_ACEOF
19017rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019018if { (ac_try="$ac_link"
19019case "(($ac_try" in
19020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19021 *) ac_try_echo=$ac_try;;
19022esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019024 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019025 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019026 grep -v '^ *+' conftest.er1 >conftest.err
19027 rm -f conftest.er1
19028 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019030 (exit $ac_status); } && {
19031 test -z "$ac_c_werror_flag" ||
19032 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019033 } && test -s conftest$ac_exeext &&
19034 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019035 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019036else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019037 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019038sed 's/^/| /' conftest.$ac_ext >&5
19039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019040 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019042
19043rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019044 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019045fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019046ac_res=`eval echo '${'$as_ac_var'}'`
19047 { echo "$as_me:$LINENO: result: $ac_res" >&5
19048echo "${ECHO_T}$ac_res" >&6; }
19049if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019050 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019051#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019052_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019053
Fred Drake8cef4cf2000-06-28 16:40:38 +000019054else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019055 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19056echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019057if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019058 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019059else
Martin v. Löwis11437992002-04-12 09:54:03 +000019060 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019061LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019062cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019063/* confdefs.h. */
19064_ACEOF
19065cat confdefs.h >>conftest.$ac_ext
19066cat >>conftest.$ac_ext <<_ACEOF
19067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019069/* Override any GCC internal prototype to avoid an error.
19070 Use char because int might match the return type of a GCC
19071 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019072#ifdef __cplusplus
19073extern "C"
19074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019075char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019076int
19077main ()
19078{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019079return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019080 ;
19081 return 0;
19082}
19083_ACEOF
19084rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019085if { (ac_try="$ac_link"
19086case "(($ac_try" in
19087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19088 *) ac_try_echo=$ac_try;;
19089esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019091 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019093 grep -v '^ *+' conftest.er1 >conftest.err
19094 rm -f conftest.er1
19095 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019097 (exit $ac_status); } && {
19098 test -z "$ac_c_werror_flag" ||
19099 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019100 } && test -s conftest$ac_exeext &&
19101 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019102 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019103else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019105sed 's/^/| /' conftest.$ac_ext >&5
19106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019107 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019109
19110rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019111 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019112LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019113fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019114{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19115echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19116if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019117 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019118#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019119_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019120 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019121else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019122 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19123echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019124if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019125 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019126else
19127 ac_check_lib_save_LIBS=$LIBS
19128LIBS="-lbsd $LIBS"
19129cat >conftest.$ac_ext <<_ACEOF
19130/* confdefs.h. */
19131_ACEOF
19132cat confdefs.h >>conftest.$ac_ext
19133cat >>conftest.$ac_ext <<_ACEOF
19134/* end confdefs.h. */
19135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019136/* Override any GCC internal prototype to avoid an error.
19137 Use char because int might match the return type of a GCC
19138 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019139#ifdef __cplusplus
19140extern "C"
19141#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019142char forkpty ();
19143int
19144main ()
19145{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019146return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019147 ;
19148 return 0;
19149}
19150_ACEOF
19151rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019152if { (ac_try="$ac_link"
19153case "(($ac_try" in
19154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19155 *) ac_try_echo=$ac_try;;
19156esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019158 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019159 ac_status=$?
19160 grep -v '^ *+' conftest.er1 >conftest.err
19161 rm -f conftest.er1
19162 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019164 (exit $ac_status); } && {
19165 test -z "$ac_c_werror_flag" ||
19166 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019167 } && test -s conftest$ac_exeext &&
19168 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019169 ac_cv_lib_bsd_forkpty=yes
19170else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019171 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019172sed 's/^/| /' conftest.$ac_ext >&5
19173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019174 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019176
19177rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019178 conftest$ac_exeext conftest.$ac_ext
19179LIBS=$ac_check_lib_save_LIBS
19180fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019181{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19182echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19183if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019184 cat >>confdefs.h <<\_ACEOF
19185#define HAVE_FORKPTY 1
19186_ACEOF
19187 LIBS="$LIBS -lbsd"
19188fi
19189
19190
19191fi
19192
Fred Drake8cef4cf2000-06-28 16:40:38 +000019193
19194fi
19195done
19196
Jack Jansendd19cf82001-12-06 22:36:17 +000019197
Christian Heimesb186d002008-03-18 15:15:01 +000019198# Stuff for expat.
19199
19200for ac_func in memmove
19201do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019202as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19203{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19204echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019205if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019206 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019207else
19208 cat >conftest.$ac_ext <<_ACEOF
19209/* confdefs.h. */
19210_ACEOF
19211cat confdefs.h >>conftest.$ac_ext
19212cat >>conftest.$ac_ext <<_ACEOF
19213/* end confdefs.h. */
19214/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19215 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19216#define $ac_func innocuous_$ac_func
19217
19218/* System header to define __stub macros and hopefully few prototypes,
19219 which can conflict with char $ac_func (); below.
19220 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19221 <limits.h> exists even on freestanding compilers. */
19222
19223#ifdef __STDC__
19224# include <limits.h>
19225#else
19226# include <assert.h>
19227#endif
19228
19229#undef $ac_func
19230
19231/* Override any GCC internal prototype to avoid an error.
19232 Use char because int might match the return type of a GCC
19233 builtin and then its argument prototype would still apply. */
19234#ifdef __cplusplus
19235extern "C"
19236#endif
19237char $ac_func ();
19238/* The GNU C library defines this for functions which it implements
19239 to always fail with ENOSYS. Some functions are actually named
19240 something starting with __ and the normal name is an alias. */
19241#if defined __stub_$ac_func || defined __stub___$ac_func
19242choke me
19243#endif
19244
19245int
19246main ()
19247{
19248return $ac_func ();
19249 ;
19250 return 0;
19251}
19252_ACEOF
19253rm -f conftest.$ac_objext conftest$ac_exeext
19254if { (ac_try="$ac_link"
19255case "(($ac_try" in
19256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19257 *) ac_try_echo=$ac_try;;
19258esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019260 (eval "$ac_link") 2>conftest.er1
19261 ac_status=$?
19262 grep -v '^ *+' conftest.er1 >conftest.err
19263 rm -f conftest.er1
19264 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019266 (exit $ac_status); } && {
19267 test -z "$ac_c_werror_flag" ||
19268 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019269 } && test -s conftest$ac_exeext &&
19270 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019271 eval "$as_ac_var=yes"
19272else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019273 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019274sed 's/^/| /' conftest.$ac_ext >&5
19275
19276 eval "$as_ac_var=no"
19277fi
19278
19279rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19280 conftest$ac_exeext conftest.$ac_ext
19281fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019282ac_res=`eval echo '${'$as_ac_var'}'`
19283 { echo "$as_me:$LINENO: result: $ac_res" >&5
19284echo "${ECHO_T}$ac_res" >&6; }
19285if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019286 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019287#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019288_ACEOF
19289
19290fi
19291done
19292
19293
Michael W. Hudson54241132001-12-07 15:38:26 +000019294# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019295
19296
19297
19298
19299
19300
Fred Drake8cef4cf2000-06-28 16:40:38 +000019301for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19302do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019303as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19304{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19305echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019306if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019307 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019308else
Martin v. Löwis11437992002-04-12 09:54:03 +000019309 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019310/* confdefs.h. */
19311_ACEOF
19312cat confdefs.h >>conftest.$ac_ext
19313cat >>conftest.$ac_ext <<_ACEOF
19314/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019315/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19316 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19317#define $ac_func innocuous_$ac_func
19318
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019319/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019320 which can conflict with char $ac_func (); below.
19321 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019322 <limits.h> exists even on freestanding compilers. */
19323
19324#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019325# include <limits.h>
19326#else
19327# include <assert.h>
19328#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019329
19330#undef $ac_func
19331
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019332/* Override any GCC internal prototype to avoid an error.
19333 Use char because int might match the return type of a GCC
19334 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019335#ifdef __cplusplus
19336extern "C"
19337#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019338char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019339/* The GNU C library defines this for functions which it implements
19340 to always fail with ENOSYS. Some functions are actually named
19341 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019342#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019343choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019344#endif
19345
Skip Montanaro6dead952003-09-25 14:50:04 +000019346int
19347main ()
19348{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019349return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019350 ;
19351 return 0;
19352}
19353_ACEOF
19354rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019355if { (ac_try="$ac_link"
19356case "(($ac_try" in
19357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19358 *) ac_try_echo=$ac_try;;
19359esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019361 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019362 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019363 grep -v '^ *+' conftest.er1 >conftest.err
19364 rm -f conftest.er1
19365 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019367 (exit $ac_status); } && {
19368 test -z "$ac_c_werror_flag" ||
19369 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019370 } && test -s conftest$ac_exeext &&
19371 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019372 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019373else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019375sed 's/^/| /' conftest.$ac_ext >&5
19376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019377 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019379
19380rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019381 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019382fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019383ac_res=`eval echo '${'$as_ac_var'}'`
19384 { echo "$as_me:$LINENO: result: $ac_res" >&5
19385echo "${ECHO_T}$ac_res" >&6; }
19386if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019387 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019388#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019389_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019390
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019391fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019392done
19393
Michael W. Hudson54241132001-12-07 15:38:26 +000019394
Martin v. Löwis11437992002-04-12 09:54:03 +000019395
19396
19397
Christian Heimesb186d002008-03-18 15:15:01 +000019398for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019399do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019400as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19401{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19402echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019403if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019404 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019405else
Martin v. Löwis11437992002-04-12 09:54:03 +000019406 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019407/* confdefs.h. */
19408_ACEOF
19409cat confdefs.h >>conftest.$ac_ext
19410cat >>conftest.$ac_ext <<_ACEOF
19411/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019412/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19413 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19414#define $ac_func innocuous_$ac_func
19415
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019416/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019417 which can conflict with char $ac_func (); below.
19418 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019419 <limits.h> exists even on freestanding compilers. */
19420
19421#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019422# include <limits.h>
19423#else
19424# include <assert.h>
19425#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019426
19427#undef $ac_func
19428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019429/* Override any GCC internal prototype to avoid an error.
19430 Use char because int might match the return type of a GCC
19431 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019432#ifdef __cplusplus
19433extern "C"
19434#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019435char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019436/* The GNU C library defines this for functions which it implements
19437 to always fail with ENOSYS. Some functions are actually named
19438 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019439#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019440choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019441#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019442
Skip Montanaro6dead952003-09-25 14:50:04 +000019443int
19444main ()
19445{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019446return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019447 ;
19448 return 0;
19449}
19450_ACEOF
19451rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019452if { (ac_try="$ac_link"
19453case "(($ac_try" in
19454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19455 *) ac_try_echo=$ac_try;;
19456esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019458 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019459 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019460 grep -v '^ *+' conftest.er1 >conftest.err
19461 rm -f conftest.er1
19462 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019464 (exit $ac_status); } && {
19465 test -z "$ac_c_werror_flag" ||
19466 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019467 } && test -s conftest$ac_exeext &&
19468 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019469 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019470else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019472sed 's/^/| /' conftest.$ac_ext >&5
19473
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019474 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019475fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019476
19477rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019478 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019479fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019480ac_res=`eval echo '${'$as_ac_var'}'`
19481 { echo "$as_me:$LINENO: result: $ac_res" >&5
19482echo "${ECHO_T}$ac_res" >&6; }
19483if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019484 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019485#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019486_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019487
Martin v. Löwis1142de32002-03-29 16:28:31 +000019488else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019489 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019490 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019491 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19492 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019493esac
19494
Martin v. Löwis1142de32002-03-29 16:28:31 +000019495fi
19496done
19497
19498
Martin v. Löwis11437992002-04-12 09:54:03 +000019499
Martin v. Löwis1142de32002-03-29 16:28:31 +000019500for ac_func in getpgrp
19501do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019502as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19503{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19504echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019505if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019506 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019507else
Martin v. Löwis11437992002-04-12 09:54:03 +000019508 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019509/* confdefs.h. */
19510_ACEOF
19511cat confdefs.h >>conftest.$ac_ext
19512cat >>conftest.$ac_ext <<_ACEOF
19513/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019514/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19515 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19516#define $ac_func innocuous_$ac_func
19517
Martin v. Löwis1142de32002-03-29 16:28:31 +000019518/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019519 which can conflict with char $ac_func (); below.
19520 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019521 <limits.h> exists even on freestanding compilers. */
19522
19523#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019524# include <limits.h>
19525#else
19526# include <assert.h>
19527#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019528
19529#undef $ac_func
19530
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019531/* Override any GCC internal prototype to avoid an error.
19532 Use char because int might match the return type of a GCC
19533 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019534#ifdef __cplusplus
19535extern "C"
19536#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019537char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019538/* The GNU C library defines this for functions which it implements
19539 to always fail with ENOSYS. Some functions are actually named
19540 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019541#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019542choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019543#endif
19544
Skip Montanaro6dead952003-09-25 14:50:04 +000019545int
19546main ()
19547{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019548return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019549 ;
19550 return 0;
19551}
19552_ACEOF
19553rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019554if { (ac_try="$ac_link"
19555case "(($ac_try" in
19556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19557 *) ac_try_echo=$ac_try;;
19558esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019560 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019562 grep -v '^ *+' conftest.er1 >conftest.err
19563 rm -f conftest.er1
19564 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019566 (exit $ac_status); } && {
19567 test -z "$ac_c_werror_flag" ||
19568 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019569 } && test -s conftest$ac_exeext &&
19570 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019571 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019572else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019574sed 's/^/| /' conftest.$ac_ext >&5
19575
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019576 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019578
19579rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019580 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019581fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019582ac_res=`eval echo '${'$as_ac_var'}'`
19583 { echo "$as_me:$LINENO: result: $ac_res" >&5
19584echo "${ECHO_T}$ac_res" >&6; }
19585if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019586 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019587#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019588_ACEOF
19589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019590/* confdefs.h. */
19591_ACEOF
19592cat confdefs.h >>conftest.$ac_ext
19593cat >>conftest.$ac_ext <<_ACEOF
19594/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019595#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019596int
19597main ()
19598{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019599getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019600 ;
19601 return 0;
19602}
19603_ACEOF
19604rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019605if { (ac_try="$ac_compile"
19606case "(($ac_try" in
19607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19608 *) ac_try_echo=$ac_try;;
19609esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019611 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019613 grep -v '^ *+' conftest.er1 >conftest.err
19614 rm -f conftest.er1
19615 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019617 (exit $ac_status); } && {
19618 test -z "$ac_c_werror_flag" ||
19619 test ! -s conftest.err
19620 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019621
19622cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019623#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019624_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019625
Martin v. Löwis11437992002-04-12 09:54:03 +000019626
Guido van Rossumf78abae1997-01-21 22:02:36 +000019627else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019629sed 's/^/| /' conftest.$ac_ext >&5
19630
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019631
Guido van Rossum627b2d71993-12-24 10:39:16 +000019632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019633
19634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019635
Guido van Rossum627b2d71993-12-24 10:39:16 +000019636fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019637done
Guido van Rossum627b2d71993-12-24 10:39:16 +000019638
Jack Jansen150753c2003-03-29 22:07:47 +000019639
19640for ac_func in setpgrp
19641do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019642as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19643{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19644echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019645if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019646 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019647else
Martin v. Löwis11437992002-04-12 09:54:03 +000019648 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019649/* confdefs.h. */
19650_ACEOF
19651cat confdefs.h >>conftest.$ac_ext
19652cat >>conftest.$ac_ext <<_ACEOF
19653/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019654/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19655 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19656#define $ac_func innocuous_$ac_func
19657
Jack Jansen150753c2003-03-29 22:07:47 +000019658/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019659 which can conflict with char $ac_func (); below.
19660 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019661 <limits.h> exists even on freestanding compilers. */
19662
19663#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019664# include <limits.h>
19665#else
19666# include <assert.h>
19667#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019668
19669#undef $ac_func
19670
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019671/* Override any GCC internal prototype to avoid an error.
19672 Use char because int might match the return type of a GCC
19673 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000019674#ifdef __cplusplus
19675extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000019676#endif
Jack Jansen150753c2003-03-29 22:07:47 +000019677char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000019678/* The GNU C library defines this for functions which it implements
19679 to always fail with ENOSYS. Some functions are actually named
19680 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019681#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000019682choke me
Jack Jansen150753c2003-03-29 22:07:47 +000019683#endif
19684
Skip Montanaro6dead952003-09-25 14:50:04 +000019685int
19686main ()
19687{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019688return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019689 ;
19690 return 0;
19691}
19692_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019693rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019694if { (ac_try="$ac_link"
19695case "(($ac_try" in
19696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19697 *) ac_try_echo=$ac_try;;
19698esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019700 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019702 grep -v '^ *+' conftest.er1 >conftest.err
19703 rm -f conftest.er1
19704 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019706 (exit $ac_status); } && {
19707 test -z "$ac_c_werror_flag" ||
19708 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019709 } && test -s conftest$ac_exeext &&
19710 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000019711 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019712else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019714sed 's/^/| /' conftest.$ac_ext >&5
19715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019716 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019718
19719rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019720 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019721fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019722ac_res=`eval echo '${'$as_ac_var'}'`
19723 { echo "$as_me:$LINENO: result: $ac_res" >&5
19724echo "${ECHO_T}$ac_res" >&6; }
19725if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000019726 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019727#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000019728_ACEOF
19729 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019730/* confdefs.h. */
19731_ACEOF
19732cat confdefs.h >>conftest.$ac_ext
19733cat >>conftest.$ac_ext <<_ACEOF
19734/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019735#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019736int
19737main ()
19738{
19739setpgrp(0,0);
19740 ;
19741 return 0;
19742}
19743_ACEOF
19744rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019745if { (ac_try="$ac_compile"
19746case "(($ac_try" in
19747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19748 *) ac_try_echo=$ac_try;;
19749esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019751 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019753 grep -v '^ *+' conftest.er1 >conftest.err
19754 rm -f conftest.er1
19755 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019757 (exit $ac_status); } && {
19758 test -z "$ac_c_werror_flag" ||
19759 test ! -s conftest.err
19760 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019761
19762cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019763#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019764_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019765
Jack Jansen150753c2003-03-29 22:07:47 +000019766
19767else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019769sed 's/^/| /' conftest.$ac_ext >&5
19770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019771
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019773
19774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019775
19776fi
19777done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019778
Martin v. Löwis11437992002-04-12 09:54:03 +000019779
Thomas Wouters3a584202000-08-05 23:28:51 +000019780for ac_func in gettimeofday
19781do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019782as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19783{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19784echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019785if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019786 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019787else
Martin v. Löwis11437992002-04-12 09:54:03 +000019788 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019789/* confdefs.h. */
19790_ACEOF
19791cat confdefs.h >>conftest.$ac_ext
19792cat >>conftest.$ac_ext <<_ACEOF
19793/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019794/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19795 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19796#define $ac_func innocuous_$ac_func
19797
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019798/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019799 which can conflict with char $ac_func (); below.
19800 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019801 <limits.h> exists even on freestanding compilers. */
19802
19803#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019804# include <limits.h>
19805#else
19806# include <assert.h>
19807#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019808
19809#undef $ac_func
19810
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019811/* Override any GCC internal prototype to avoid an error.
19812 Use char because int might match the return type of a GCC
19813 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019814#ifdef __cplusplus
19815extern "C"
19816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019817char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019818/* The GNU C library defines this for functions which it implements
19819 to always fail with ENOSYS. Some functions are actually named
19820 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019821#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019822choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019823#endif
19824
Skip Montanaro6dead952003-09-25 14:50:04 +000019825int
19826main ()
19827{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019828return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019829 ;
19830 return 0;
19831}
19832_ACEOF
19833rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019834if { (ac_try="$ac_link"
19835case "(($ac_try" in
19836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19837 *) ac_try_echo=$ac_try;;
19838esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019840 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019841 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019842 grep -v '^ *+' conftest.er1 >conftest.err
19843 rm -f conftest.er1
19844 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019846 (exit $ac_status); } && {
19847 test -z "$ac_c_werror_flag" ||
19848 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019849 } && test -s conftest$ac_exeext &&
19850 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019851 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019852else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019854sed 's/^/| /' conftest.$ac_ext >&5
19855
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019856 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019858
19859rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019860 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019861fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019862ac_res=`eval echo '${'$as_ac_var'}'`
19863 { echo "$as_me:$LINENO: result: $ac_res" >&5
19864echo "${ECHO_T}$ac_res" >&6; }
19865if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019866 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019867#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019868_ACEOF
19869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019870/* confdefs.h. */
19871_ACEOF
19872cat confdefs.h >>conftest.$ac_ext
19873cat >>conftest.$ac_ext <<_ACEOF
19874/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019875#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019876int
19877main ()
19878{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019879gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019880 ;
19881 return 0;
19882}
19883_ACEOF
19884rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019885if { (ac_try="$ac_compile"
19886case "(($ac_try" in
19887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19888 *) ac_try_echo=$ac_try;;
19889esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019891 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019893 grep -v '^ *+' conftest.er1 >conftest.err
19894 rm -f conftest.er1
19895 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019897 (exit $ac_status); } && {
19898 test -z "$ac_c_werror_flag" ||
19899 test ! -s conftest.err
19900 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019901 :
19902else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019903 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019904sed 's/^/| /' conftest.$ac_ext >&5
19905
Martin v. Löwis11437992002-04-12 09:54:03 +000019906
19907cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019908#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019909_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019910
Martin v. Löwis11437992002-04-12 09:54:03 +000019911
Guido van Rossum627b2d71993-12-24 10:39:16 +000019912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019913
19914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019915
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019916fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019917done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019918
Michael W. Hudson54241132001-12-07 15:38:26 +000019919
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019920{ echo "$as_me:$LINENO: checking for major" >&5
19921echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019922cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019923/* confdefs.h. */
19924_ACEOF
19925cat confdefs.h >>conftest.$ac_ext
19926cat >>conftest.$ac_ext <<_ACEOF
19927/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019928
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019929#if defined(MAJOR_IN_MKDEV)
19930#include <sys/mkdev.h>
19931#elif defined(MAJOR_IN_SYSMACROS)
19932#include <sys/sysmacros.h>
19933#else
19934#include <sys/types.h>
19935#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019936
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019937int
19938main ()
19939{
19940
19941 makedev(major(0),minor(0));
19942
19943 ;
19944 return 0;
19945}
19946_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019947rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019948if { (ac_try="$ac_link"
19949case "(($ac_try" in
19950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19951 *) ac_try_echo=$ac_try;;
19952esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019954 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019956 grep -v '^ *+' conftest.er1 >conftest.err
19957 rm -f conftest.er1
19958 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019960 (exit $ac_status); } && {
19961 test -z "$ac_c_werror_flag" ||
19962 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019963 } && test -s conftest$ac_exeext &&
19964 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019965
19966
19967cat >>confdefs.h <<\_ACEOF
19968#define HAVE_DEVICE_MACROS 1
19969_ACEOF
19970
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019971 { echo "$as_me:$LINENO: result: yes" >&5
19972echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019973
19974else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019976sed 's/^/| /' conftest.$ac_ext >&5
19977
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019978
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019979 { echo "$as_me:$LINENO: result: no" >&5
19980echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019981
19982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019983
19984rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019985 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019986
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019987# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019988# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019989{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19990echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019991cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019992/* confdefs.h. */
19993_ACEOF
19994cat confdefs.h >>conftest.$ac_ext
19995cat >>conftest.$ac_ext <<_ACEOF
19996/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019997
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019998#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019999#include <sys/socket.h>
20000#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020001#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020002
Martin v. Löwis11437992002-04-12 09:54:03 +000020003int
20004main ()
20005{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020006getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020007 ;
20008 return 0;
20009}
20010_ACEOF
20011rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020012if { (ac_try="$ac_link"
20013case "(($ac_try" in
20014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20015 *) ac_try_echo=$ac_try;;
20016esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020018 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020020 grep -v '^ *+' conftest.er1 >conftest.err
20021 rm -f conftest.er1
20022 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020024 (exit $ac_status); } && {
20025 test -z "$ac_c_werror_flag" ||
20026 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020027 } && test -s conftest$ac_exeext &&
20028 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020029 have_getaddrinfo=yes
20030else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020031 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020032sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020033
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020034 have_getaddrinfo=no
20035fi
20036
20037rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20038 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020039{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20040echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020041if test $have_getaddrinfo = yes
20042then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020043 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20044echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020045 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020046 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020047else
20048 if test "$cross_compiling" = yes; then
20049 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020050else
Martin v. Löwis11437992002-04-12 09:54:03 +000020051 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020052/* confdefs.h. */
20053_ACEOF
20054cat confdefs.h >>conftest.$ac_ext
20055cat >>conftest.$ac_ext <<_ACEOF
20056/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020057
20058#include <sys/types.h>
20059#include <netdb.h>
20060#include <string.h>
20061#include <sys/socket.h>
20062#include <netinet/in.h>
20063
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020064int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020065{
20066 int passive, gaierr, inet4 = 0, inet6 = 0;
20067 struct addrinfo hints, *ai, *aitop;
20068 char straddr[INET6_ADDRSTRLEN], strport[16];
20069
20070 for (passive = 0; passive <= 1; passive++) {
20071 memset(&hints, 0, sizeof(hints));
20072 hints.ai_family = AF_UNSPEC;
20073 hints.ai_flags = passive ? AI_PASSIVE : 0;
20074 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020075 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020076 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20077 (void)gai_strerror(gaierr);
20078 goto bad;
20079 }
20080 for (ai = aitop; ai; ai = ai->ai_next) {
20081 if (ai->ai_addr == NULL ||
20082 ai->ai_addrlen == 0 ||
20083 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20084 straddr, sizeof(straddr), strport, sizeof(strport),
20085 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20086 goto bad;
20087 }
20088 switch (ai->ai_family) {
20089 case AF_INET:
20090 if (strcmp(strport, "54321") != 0) {
20091 goto bad;
20092 }
20093 if (passive) {
20094 if (strcmp(straddr, "0.0.0.0") != 0) {
20095 goto bad;
20096 }
20097 } else {
20098 if (strcmp(straddr, "127.0.0.1") != 0) {
20099 goto bad;
20100 }
20101 }
20102 inet4++;
20103 break;
20104 case AF_INET6:
20105 if (strcmp(strport, "54321") != 0) {
20106 goto bad;
20107 }
20108 if (passive) {
20109 if (strcmp(straddr, "::") != 0) {
20110 goto bad;
20111 }
20112 } else {
20113 if (strcmp(straddr, "::1") != 0) {
20114 goto bad;
20115 }
20116 }
20117 inet6++;
20118 break;
20119 case AF_UNSPEC:
20120 goto bad;
20121 break;
20122 default:
20123 /* another family support? */
20124 break;
20125 }
20126 }
20127 }
20128
20129 if (!(inet4 == 0 || inet4 == 2))
20130 goto bad;
20131 if (!(inet6 == 0 || inet6 == 2))
20132 goto bad;
20133
20134 if (aitop)
20135 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020136 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020137
20138 bad:
20139 if (aitop)
20140 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020141 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020142}
20143
Martin v. Löwis11437992002-04-12 09:54:03 +000020144_ACEOF
20145rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020146if { (ac_try="$ac_link"
20147case "(($ac_try" in
20148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20149 *) ac_try_echo=$ac_try;;
20150esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020152 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020153 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020155 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020156 { (case "(($ac_try" in
20157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20158 *) ac_try_echo=$ac_try;;
20159esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020161 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020162 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020164 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020165 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020166else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020167 echo "$as_me: program exited with status $ac_status" >&5
20168echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020169sed 's/^/| /' conftest.$ac_ext >&5
20170
Martin v. Löwis11437992002-04-12 09:54:03 +000020171( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020172ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020174rm -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 +000020175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020176
20177
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020178fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020179
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020181
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020182if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20183then
20184 if test $ipv6 = yes
20185 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020186 echo 'Fatal: You must get working getaddrinfo() function.'
20187 echo ' or you can specify "--disable-ipv6"'.
20188 exit 1
20189 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020190else
Martin v. Löwis11437992002-04-12 09:54:03 +000020191
20192cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020193#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020194_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020195
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020196fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020197
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020198for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020199do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020200as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20201{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20202echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020203if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020204 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020205else
Martin v. Löwis11437992002-04-12 09:54:03 +000020206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020207/* confdefs.h. */
20208_ACEOF
20209cat confdefs.h >>conftest.$ac_ext
20210cat >>conftest.$ac_ext <<_ACEOF
20211/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020212/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20213 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20214#define $ac_func innocuous_$ac_func
20215
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020216/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020217 which can conflict with char $ac_func (); below.
20218 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020219 <limits.h> exists even on freestanding compilers. */
20220
20221#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020222# include <limits.h>
20223#else
20224# include <assert.h>
20225#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020226
20227#undef $ac_func
20228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020229/* Override any GCC internal prototype to avoid an error.
20230 Use char because int might match the return type of a GCC
20231 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020232#ifdef __cplusplus
20233extern "C"
20234#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020235char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020236/* The GNU C library defines this for functions which it implements
20237 to always fail with ENOSYS. Some functions are actually named
20238 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020239#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020240choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020241#endif
20242
Skip Montanaro6dead952003-09-25 14:50:04 +000020243int
20244main ()
20245{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020246return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020247 ;
20248 return 0;
20249}
20250_ACEOF
20251rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020252if { (ac_try="$ac_link"
20253case "(($ac_try" in
20254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20255 *) ac_try_echo=$ac_try;;
20256esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020258 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020259 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020260 grep -v '^ *+' conftest.er1 >conftest.err
20261 rm -f conftest.er1
20262 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020264 (exit $ac_status); } && {
20265 test -z "$ac_c_werror_flag" ||
20266 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020267 } && test -s conftest$ac_exeext &&
20268 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020269 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020270else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020272sed 's/^/| /' conftest.$ac_ext >&5
20273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020274 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020276
20277rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020278 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020279fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020280ac_res=`eval echo '${'$as_ac_var'}'`
20281 { echo "$as_me:$LINENO: result: $ac_res" >&5
20282echo "${ECHO_T}$ac_res" >&6; }
20283if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020284 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020285#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020286_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020287
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020288fi
20289done
20290
Michael W. Hudson54241132001-12-07 15:38:26 +000020291
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020292# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020293{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20294echo $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 +000020295if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020296 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020297else
Martin v. Löwis11437992002-04-12 09:54:03 +000020298 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020299/* confdefs.h. */
20300_ACEOF
20301cat confdefs.h >>conftest.$ac_ext
20302cat >>conftest.$ac_ext <<_ACEOF
20303/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020304#include <sys/types.h>
20305#include <sys/time.h>
20306#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020307
Martin v. Löwis11437992002-04-12 09:54:03 +000020308int
20309main ()
20310{
20311if ((struct tm *) 0)
20312return 0;
20313 ;
20314 return 0;
20315}
20316_ACEOF
20317rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020318if { (ac_try="$ac_compile"
20319case "(($ac_try" in
20320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20321 *) ac_try_echo=$ac_try;;
20322esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020324 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020326 grep -v '^ *+' conftest.er1 >conftest.err
20327 rm -f conftest.er1
20328 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020330 (exit $ac_status); } && {
20331 test -z "$ac_c_werror_flag" ||
20332 test ! -s conftest.err
20333 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020334 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020335else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020336 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020337sed 's/^/| /' conftest.$ac_ext >&5
20338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020339 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020341
20342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020343fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020344{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20345echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020346if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020347
20348cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020349#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020350_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020351
20352fi
20353
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020354{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20355echo $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 +000020356if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020357 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020358else
Martin v. Löwis11437992002-04-12 09:54:03 +000020359 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020360/* confdefs.h. */
20361_ACEOF
20362cat confdefs.h >>conftest.$ac_ext
20363cat >>conftest.$ac_ext <<_ACEOF
20364/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020365#include <sys/types.h>
20366#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020367
Martin v. Löwis11437992002-04-12 09:54:03 +000020368int
20369main ()
20370{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020371struct tm tm;
20372 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020373 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020374 ;
20375 return 0;
20376}
20377_ACEOF
20378rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020379if { (ac_try="$ac_compile"
20380case "(($ac_try" in
20381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20382 *) ac_try_echo=$ac_try;;
20383esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020385 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020386 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020387 grep -v '^ *+' conftest.er1 >conftest.err
20388 rm -f conftest.er1
20389 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020391 (exit $ac_status); } && {
20392 test -z "$ac_c_werror_flag" ||
20393 test ! -s conftest.err
20394 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020395 ac_cv_struct_tm=time.h
20396else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020398sed 's/^/| /' conftest.$ac_ext >&5
20399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020400 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020402
20403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020404fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020405{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20406echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020407if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020408
20409cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020410#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020411_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020412
20413fi
20414
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020415{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20416echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020417if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020418 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020419else
Martin v. Löwis11437992002-04-12 09:54:03 +000020420 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020421/* confdefs.h. */
20422_ACEOF
20423cat confdefs.h >>conftest.$ac_ext
20424cat >>conftest.$ac_ext <<_ACEOF
20425/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020426#include <sys/types.h>
20427#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020428
20429
Martin v. Löwis11437992002-04-12 09:54:03 +000020430int
20431main ()
20432{
20433static struct tm ac_aggr;
20434if (ac_aggr.tm_zone)
20435return 0;
20436 ;
20437 return 0;
20438}
20439_ACEOF
20440rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020441if { (ac_try="$ac_compile"
20442case "(($ac_try" in
20443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20444 *) ac_try_echo=$ac_try;;
20445esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020447 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020448 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020449 grep -v '^ *+' conftest.er1 >conftest.err
20450 rm -f conftest.er1
20451 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020453 (exit $ac_status); } && {
20454 test -z "$ac_c_werror_flag" ||
20455 test ! -s conftest.err
20456 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020457 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020458else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020459 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020460sed 's/^/| /' conftest.$ac_ext >&5
20461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020462 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020463/* confdefs.h. */
20464_ACEOF
20465cat confdefs.h >>conftest.$ac_ext
20466cat >>conftest.$ac_ext <<_ACEOF
20467/* end confdefs.h. */
20468#include <sys/types.h>
20469#include <$ac_cv_struct_tm>
20470
20471
20472int
20473main ()
20474{
20475static struct tm ac_aggr;
20476if (sizeof ac_aggr.tm_zone)
20477return 0;
20478 ;
20479 return 0;
20480}
20481_ACEOF
20482rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020483if { (ac_try="$ac_compile"
20484case "(($ac_try" in
20485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20486 *) ac_try_echo=$ac_try;;
20487esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020489 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020491 grep -v '^ *+' conftest.er1 >conftest.err
20492 rm -f conftest.er1
20493 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020495 (exit $ac_status); } && {
20496 test -z "$ac_c_werror_flag" ||
20497 test ! -s conftest.err
20498 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020499 ac_cv_member_struct_tm_tm_zone=yes
20500else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020502sed 's/^/| /' conftest.$ac_ext >&5
20503
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020504 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020506
20507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020509
20510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020511fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020512{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20513echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
20514if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020515
20516cat >>confdefs.h <<_ACEOF
20517#define HAVE_STRUCT_TM_TM_ZONE 1
20518_ACEOF
20519
20520
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020521fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020522
Martin v. Löwis11437992002-04-12 09:54:03 +000020523if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20524
20525cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020526#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020527_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020528
20529else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020530 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20531echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020532if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020533 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020534else
20535 cat >conftest.$ac_ext <<_ACEOF
20536/* confdefs.h. */
20537_ACEOF
20538cat confdefs.h >>conftest.$ac_ext
20539cat >>conftest.$ac_ext <<_ACEOF
20540/* end confdefs.h. */
20541#include <time.h>
20542
20543int
20544main ()
20545{
20546#ifndef tzname
20547 (void) tzname;
20548#endif
20549
20550 ;
20551 return 0;
20552}
20553_ACEOF
20554rm -f conftest.$ac_objext
20555if { (ac_try="$ac_compile"
20556case "(($ac_try" in
20557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20558 *) ac_try_echo=$ac_try;;
20559esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020561 (eval "$ac_compile") 2>conftest.er1
20562 ac_status=$?
20563 grep -v '^ *+' conftest.er1 >conftest.err
20564 rm -f conftest.er1
20565 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020567 (exit $ac_status); } && {
20568 test -z "$ac_c_werror_flag" ||
20569 test ! -s conftest.err
20570 } && test -s conftest.$ac_objext; then
20571 ac_cv_have_decl_tzname=yes
20572else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020573 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020574sed 's/^/| /' conftest.$ac_ext >&5
20575
20576 ac_cv_have_decl_tzname=no
20577fi
20578
20579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20580fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020581{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20582echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
20583if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020584
20585cat >>confdefs.h <<_ACEOF
20586#define HAVE_DECL_TZNAME 1
20587_ACEOF
20588
20589
20590else
20591 cat >>confdefs.h <<_ACEOF
20592#define HAVE_DECL_TZNAME 0
20593_ACEOF
20594
20595
20596fi
20597
20598
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020599 { echo "$as_me:$LINENO: checking for tzname" >&5
20600echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020601if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020602 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020603else
Martin v. Löwis11437992002-04-12 09:54:03 +000020604 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020605/* confdefs.h. */
20606_ACEOF
20607cat confdefs.h >>conftest.$ac_ext
20608cat >>conftest.$ac_ext <<_ACEOF
20609/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020610#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020611#if !HAVE_DECL_TZNAME
20612extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000020613#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020614
Martin v. Löwis11437992002-04-12 09:54:03 +000020615int
20616main ()
20617{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020618return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000020619 ;
20620 return 0;
20621}
20622_ACEOF
20623rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020624if { (ac_try="$ac_link"
20625case "(($ac_try" in
20626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20627 *) ac_try_echo=$ac_try;;
20628esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020630 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020632 grep -v '^ *+' conftest.er1 >conftest.err
20633 rm -f conftest.er1
20634 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020636 (exit $ac_status); } && {
20637 test -z "$ac_c_werror_flag" ||
20638 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020639 } && test -s conftest$ac_exeext &&
20640 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020641 ac_cv_var_tzname=yes
20642else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020643 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020644sed 's/^/| /' conftest.$ac_ext >&5
20645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020646 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020648
20649rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020650 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000020651fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020652{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20653echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020654 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020655
20656cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020657#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020658_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020659
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020660 fi
20661fi
20662
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020663{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
20664echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020665if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020666 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020667else
20668 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020669/* confdefs.h. */
20670_ACEOF
20671cat confdefs.h >>conftest.$ac_ext
20672cat >>conftest.$ac_ext <<_ACEOF
20673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020674$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020675int
20676main ()
20677{
20678static struct stat ac_aggr;
20679if (ac_aggr.st_rdev)
20680return 0;
20681 ;
20682 return 0;
20683}
20684_ACEOF
20685rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020686if { (ac_try="$ac_compile"
20687case "(($ac_try" in
20688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20689 *) ac_try_echo=$ac_try;;
20690esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020692 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020694 grep -v '^ *+' conftest.er1 >conftest.err
20695 rm -f conftest.er1
20696 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020698 (exit $ac_status); } && {
20699 test -z "$ac_c_werror_flag" ||
20700 test ! -s conftest.err
20701 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020702 ac_cv_member_struct_stat_st_rdev=yes
20703else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020705sed 's/^/| /' conftest.$ac_ext >&5
20706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020707 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020708/* confdefs.h. */
20709_ACEOF
20710cat confdefs.h >>conftest.$ac_ext
20711cat >>conftest.$ac_ext <<_ACEOF
20712/* end confdefs.h. */
20713$ac_includes_default
20714int
20715main ()
20716{
20717static struct stat ac_aggr;
20718if (sizeof ac_aggr.st_rdev)
20719return 0;
20720 ;
20721 return 0;
20722}
20723_ACEOF
20724rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020725if { (ac_try="$ac_compile"
20726case "(($ac_try" in
20727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20728 *) ac_try_echo=$ac_try;;
20729esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020731 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020733 grep -v '^ *+' conftest.er1 >conftest.err
20734 rm -f conftest.er1
20735 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020737 (exit $ac_status); } && {
20738 test -z "$ac_c_werror_flag" ||
20739 test ! -s conftest.err
20740 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020741 ac_cv_member_struct_stat_st_rdev=yes
20742else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020744sed 's/^/| /' conftest.$ac_ext >&5
20745
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020746 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020748
20749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020751
20752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020753fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020754{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20755echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20756if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020757
20758cat >>confdefs.h <<_ACEOF
20759#define HAVE_STRUCT_STAT_ST_RDEV 1
20760_ACEOF
20761
20762
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020763fi
20764
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020765{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20766echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020767if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020768 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020769else
Martin v. Löwis11437992002-04-12 09:54:03 +000020770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020771/* confdefs.h. */
20772_ACEOF
20773cat confdefs.h >>conftest.$ac_ext
20774cat >>conftest.$ac_ext <<_ACEOF
20775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020776$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020777int
20778main ()
20779{
20780static struct stat ac_aggr;
20781if (ac_aggr.st_blksize)
20782return 0;
20783 ;
20784 return 0;
20785}
20786_ACEOF
20787rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020788if { (ac_try="$ac_compile"
20789case "(($ac_try" in
20790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20791 *) ac_try_echo=$ac_try;;
20792esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020794 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020796 grep -v '^ *+' conftest.er1 >conftest.err
20797 rm -f conftest.er1
20798 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020800 (exit $ac_status); } && {
20801 test -z "$ac_c_werror_flag" ||
20802 test ! -s conftest.err
20803 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020804 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020805else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020807sed 's/^/| /' conftest.$ac_ext >&5
20808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020809 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020810/* confdefs.h. */
20811_ACEOF
20812cat confdefs.h >>conftest.$ac_ext
20813cat >>conftest.$ac_ext <<_ACEOF
20814/* end confdefs.h. */
20815$ac_includes_default
20816int
20817main ()
20818{
20819static struct stat ac_aggr;
20820if (sizeof ac_aggr.st_blksize)
20821return 0;
20822 ;
20823 return 0;
20824}
20825_ACEOF
20826rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020827if { (ac_try="$ac_compile"
20828case "(($ac_try" in
20829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20830 *) ac_try_echo=$ac_try;;
20831esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020833 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020835 grep -v '^ *+' conftest.er1 >conftest.err
20836 rm -f conftest.er1
20837 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020839 (exit $ac_status); } && {
20840 test -z "$ac_c_werror_flag" ||
20841 test ! -s conftest.err
20842 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020843 ac_cv_member_struct_stat_st_blksize=yes
20844else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020846sed 's/^/| /' conftest.$ac_ext >&5
20847
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020848 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020850
20851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020853
20854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020855fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020856{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20857echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
20858if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020859
Martin v. Löwis11437992002-04-12 09:54:03 +000020860cat >>confdefs.h <<_ACEOF
20861#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20862_ACEOF
20863
20864
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020865fi
20866
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020867{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20868echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020869if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020870 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020871else
20872 cat >conftest.$ac_ext <<_ACEOF
20873/* confdefs.h. */
20874_ACEOF
20875cat confdefs.h >>conftest.$ac_ext
20876cat >>conftest.$ac_ext <<_ACEOF
20877/* end confdefs.h. */
20878$ac_includes_default
20879int
20880main ()
20881{
20882static struct stat ac_aggr;
20883if (ac_aggr.st_flags)
20884return 0;
20885 ;
20886 return 0;
20887}
20888_ACEOF
20889rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020890if { (ac_try="$ac_compile"
20891case "(($ac_try" in
20892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20893 *) ac_try_echo=$ac_try;;
20894esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020896 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020897 ac_status=$?
20898 grep -v '^ *+' conftest.er1 >conftest.err
20899 rm -f conftest.er1
20900 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020902 (exit $ac_status); } && {
20903 test -z "$ac_c_werror_flag" ||
20904 test ! -s conftest.err
20905 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020906 ac_cv_member_struct_stat_st_flags=yes
20907else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020908 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020909sed 's/^/| /' conftest.$ac_ext >&5
20910
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020911 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020912/* confdefs.h. */
20913_ACEOF
20914cat confdefs.h >>conftest.$ac_ext
20915cat >>conftest.$ac_ext <<_ACEOF
20916/* end confdefs.h. */
20917$ac_includes_default
20918int
20919main ()
20920{
20921static struct stat ac_aggr;
20922if (sizeof ac_aggr.st_flags)
20923return 0;
20924 ;
20925 return 0;
20926}
20927_ACEOF
20928rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020929if { (ac_try="$ac_compile"
20930case "(($ac_try" in
20931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20932 *) ac_try_echo=$ac_try;;
20933esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020935 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020936 ac_status=$?
20937 grep -v '^ *+' conftest.er1 >conftest.err
20938 rm -f conftest.er1
20939 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020941 (exit $ac_status); } && {
20942 test -z "$ac_c_werror_flag" ||
20943 test ! -s conftest.err
20944 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020945 ac_cv_member_struct_stat_st_flags=yes
20946else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020947 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020948sed 's/^/| /' conftest.$ac_ext >&5
20949
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020950 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020952
20953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020955
20956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020957fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020958{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20959echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
20960if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020961
20962cat >>confdefs.h <<_ACEOF
20963#define HAVE_STRUCT_STAT_ST_FLAGS 1
20964_ACEOF
20965
20966
20967fi
20968
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020969{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20970echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020971if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020972 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020973else
20974 cat >conftest.$ac_ext <<_ACEOF
20975/* confdefs.h. */
20976_ACEOF
20977cat confdefs.h >>conftest.$ac_ext
20978cat >>conftest.$ac_ext <<_ACEOF
20979/* end confdefs.h. */
20980$ac_includes_default
20981int
20982main ()
20983{
20984static struct stat ac_aggr;
20985if (ac_aggr.st_gen)
20986return 0;
20987 ;
20988 return 0;
20989}
20990_ACEOF
20991rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020992if { (ac_try="$ac_compile"
20993case "(($ac_try" in
20994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20995 *) ac_try_echo=$ac_try;;
20996esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020998 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020999 ac_status=$?
21000 grep -v '^ *+' conftest.er1 >conftest.err
21001 rm -f conftest.er1
21002 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021004 (exit $ac_status); } && {
21005 test -z "$ac_c_werror_flag" ||
21006 test ! -s conftest.err
21007 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021008 ac_cv_member_struct_stat_st_gen=yes
21009else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021010 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021011sed 's/^/| /' conftest.$ac_ext >&5
21012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021013 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021014/* confdefs.h. */
21015_ACEOF
21016cat confdefs.h >>conftest.$ac_ext
21017cat >>conftest.$ac_ext <<_ACEOF
21018/* end confdefs.h. */
21019$ac_includes_default
21020int
21021main ()
21022{
21023static struct stat ac_aggr;
21024if (sizeof ac_aggr.st_gen)
21025return 0;
21026 ;
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 Oussoren74f29b42009-09-20 20:09:26 +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öwisebd9d5b2005-08-09 15:00:59 +000021038 ac_status=$?
21039 grep -v '^ *+' conftest.er1 >conftest.err
21040 rm -f conftest.er1
21041 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021047 ac_cv_member_struct_stat_st_gen=yes
21048else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021049 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021050sed 's/^/| /' conftest.$ac_ext >&5
21051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021052 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021054
21055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021057
21058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021059fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021060{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21061echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21062if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021063
21064cat >>confdefs.h <<_ACEOF
21065#define HAVE_STRUCT_STAT_ST_GEN 1
21066_ACEOF
21067
21068
21069fi
21070
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021071{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21072echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021073if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021074 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021075else
21076 cat >conftest.$ac_ext <<_ACEOF
21077/* confdefs.h. */
21078_ACEOF
21079cat confdefs.h >>conftest.$ac_ext
21080cat >>conftest.$ac_ext <<_ACEOF
21081/* end confdefs.h. */
21082$ac_includes_default
21083int
21084main ()
21085{
21086static struct stat ac_aggr;
21087if (ac_aggr.st_birthtime)
21088return 0;
21089 ;
21090 return 0;
21091}
21092_ACEOF
21093rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021094if { (ac_try="$ac_compile"
21095case "(($ac_try" in
21096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21097 *) ac_try_echo=$ac_try;;
21098esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021100 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021101 ac_status=$?
21102 grep -v '^ *+' conftest.er1 >conftest.err
21103 rm -f conftest.er1
21104 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021106 (exit $ac_status); } && {
21107 test -z "$ac_c_werror_flag" ||
21108 test ! -s conftest.err
21109 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021110 ac_cv_member_struct_stat_st_birthtime=yes
21111else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021112 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021113sed 's/^/| /' conftest.$ac_ext >&5
21114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021115 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021116/* confdefs.h. */
21117_ACEOF
21118cat confdefs.h >>conftest.$ac_ext
21119cat >>conftest.$ac_ext <<_ACEOF
21120/* end confdefs.h. */
21121$ac_includes_default
21122int
21123main ()
21124{
21125static struct stat ac_aggr;
21126if (sizeof ac_aggr.st_birthtime)
21127return 0;
21128 ;
21129 return 0;
21130}
21131_ACEOF
21132rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021133if { (ac_try="$ac_compile"
21134case "(($ac_try" in
21135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21136 *) ac_try_echo=$ac_try;;
21137esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021139 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021140 ac_status=$?
21141 grep -v '^ *+' conftest.er1 >conftest.err
21142 rm -f conftest.er1
21143 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021145 (exit $ac_status); } && {
21146 test -z "$ac_c_werror_flag" ||
21147 test ! -s conftest.err
21148 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021149 ac_cv_member_struct_stat_st_birthtime=yes
21150else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021151 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021152sed 's/^/| /' conftest.$ac_ext >&5
21153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021154 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021156
21157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021159
21160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021161fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021162{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21163echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21164if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021165
21166cat >>confdefs.h <<_ACEOF
21167#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21168_ACEOF
21169
21170
21171fi
21172
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021173{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21174echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021175if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021176 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021177else
Martin v. Löwis11437992002-04-12 09:54:03 +000021178 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021179/* confdefs.h. */
21180_ACEOF
21181cat confdefs.h >>conftest.$ac_ext
21182cat >>conftest.$ac_ext <<_ACEOF
21183/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021184$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021185int
21186main ()
21187{
21188static struct stat ac_aggr;
21189if (ac_aggr.st_blocks)
21190return 0;
21191 ;
21192 return 0;
21193}
21194_ACEOF
21195rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021196if { (ac_try="$ac_compile"
21197case "(($ac_try" in
21198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21199 *) ac_try_echo=$ac_try;;
21200esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021202 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021203 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021204 grep -v '^ *+' conftest.er1 >conftest.err
21205 rm -f conftest.er1
21206 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021208 (exit $ac_status); } && {
21209 test -z "$ac_c_werror_flag" ||
21210 test ! -s conftest.err
21211 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021212 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021213else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021215sed 's/^/| /' conftest.$ac_ext >&5
21216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021218/* confdefs.h. */
21219_ACEOF
21220cat confdefs.h >>conftest.$ac_ext
21221cat >>conftest.$ac_ext <<_ACEOF
21222/* end confdefs.h. */
21223$ac_includes_default
21224int
21225main ()
21226{
21227static struct stat ac_aggr;
21228if (sizeof ac_aggr.st_blocks)
21229return 0;
21230 ;
21231 return 0;
21232}
21233_ACEOF
21234rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021235if { (ac_try="$ac_compile"
21236case "(($ac_try" in
21237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21238 *) ac_try_echo=$ac_try;;
21239esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021241 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021242 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021243 grep -v '^ *+' conftest.er1 >conftest.err
21244 rm -f conftest.er1
21245 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021247 (exit $ac_status); } && {
21248 test -z "$ac_c_werror_flag" ||
21249 test ! -s conftest.err
21250 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021251 ac_cv_member_struct_stat_st_blocks=yes
21252else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021254sed 's/^/| /' conftest.$ac_ext >&5
21255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021256 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021258
21259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021261
21262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021263fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021264{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21265echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21266if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021267
Martin v. Löwis11437992002-04-12 09:54:03 +000021268cat >>confdefs.h <<_ACEOF
21269#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21270_ACEOF
21271
21272
21273cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021274#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021275_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021276
21277else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021278 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021279 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021280 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21281 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021282esac
21283
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021284fi
21285
Michael W. Hudson54241132001-12-07 15:38:26 +000021286
Martin v. Löwis11437992002-04-12 09:54:03 +000021287
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021288{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21289echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021290if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021291 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021292else
Martin v. Löwis11437992002-04-12 09:54:03 +000021293 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021294/* confdefs.h. */
21295_ACEOF
21296cat confdefs.h >>conftest.$ac_ext
21297cat >>conftest.$ac_ext <<_ACEOF
21298/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021299#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021300int
21301main ()
21302{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021303return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021304 ;
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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021325 ac_cv_header_time_altzone=yes
21326else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021327 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021328sed 's/^/| /' conftest.$ac_ext >&5
21329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021330 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021331fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21334fi
21335
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021336{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21337echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021338if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021339
21340cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021341#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021342_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021343
21344fi
21345
Guido van Rossumda88dad1995-01-26 00:46:29 +000021346was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021347{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21348echo $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 +000021349cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021350/* confdefs.h. */
21351_ACEOF
21352cat confdefs.h >>conftest.$ac_ext
21353cat >>conftest.$ac_ext <<_ACEOF
21354/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021355
21356#include <sys/types.h>
21357#include <sys/select.h>
21358#include <sys/time.h>
21359
Martin v. Löwis11437992002-04-12 09:54:03 +000021360int
21361main ()
21362{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021363;
Martin v. Löwis11437992002-04-12 09:54:03 +000021364 ;
21365 return 0;
21366}
21367_ACEOF
21368rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021369if { (ac_try="$ac_compile"
21370case "(($ac_try" in
21371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21372 *) ac_try_echo=$ac_try;;
21373esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021375 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021376 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021377 grep -v '^ *+' conftest.er1 >conftest.err
21378 rm -f conftest.er1
21379 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021381 (exit $ac_status); } && {
21382 test -z "$ac_c_werror_flag" ||
21383 test ! -s conftest.err
21384 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021385
21386
21387cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021388#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021389_ACEOF
21390
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021391 was_it_defined=yes
21392
Guido van Rossumf78abae1997-01-21 22:02:36 +000021393else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021395sed 's/^/| /' conftest.$ac_ext >&5
21396
Thomas Wouters477c8d52006-05-27 19:21:47 +000021397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021398fi
21399
21400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021401{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21402echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021403
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021404{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21405echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021406if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021407 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021408else
Martin v. Löwis11437992002-04-12 09:54:03 +000021409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021410/* confdefs.h. */
21411_ACEOF
21412cat confdefs.h >>conftest.$ac_ext
21413cat >>conftest.$ac_ext <<_ACEOF
21414/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021415
21416# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021417int
21418main ()
21419{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021420struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021421 ;
21422 return 0;
21423}
21424_ACEOF
21425rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021426if { (ac_try="$ac_compile"
21427case "(($ac_try" in
21428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21429 *) ac_try_echo=$ac_try;;
21430esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021432 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021433 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021434 grep -v '^ *+' conftest.er1 >conftest.err
21435 rm -f conftest.er1
21436 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021438 (exit $ac_status); } && {
21439 test -z "$ac_c_werror_flag" ||
21440 test ! -s conftest.err
21441 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021442 ac_cv_struct_addrinfo=yes
21443else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021445sed 's/^/| /' conftest.$ac_ext >&5
21446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021447 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021448fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021449
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21451fi
21452
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021453{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21454echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021455if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021456
21457cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021458#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021459_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021460
21461fi
21462
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021463{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21464echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021465if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021466 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021467else
Martin v. Löwis11437992002-04-12 09:54:03 +000021468 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021469/* confdefs.h. */
21470_ACEOF
21471cat confdefs.h >>conftest.$ac_ext
21472cat >>conftest.$ac_ext <<_ACEOF
21473/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021474
21475# include <sys/types.h>
21476# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021477int
21478main ()
21479{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021480struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021481 ;
21482 return 0;
21483}
21484_ACEOF
21485rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021486if { (ac_try="$ac_compile"
21487case "(($ac_try" in
21488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21489 *) ac_try_echo=$ac_try;;
21490esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021492 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021493 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021494 grep -v '^ *+' conftest.er1 >conftest.err
21495 rm -f conftest.er1
21496 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021498 (exit $ac_status); } && {
21499 test -z "$ac_c_werror_flag" ||
21500 test ! -s conftest.err
21501 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021502 ac_cv_struct_sockaddr_storage=yes
21503else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021505sed 's/^/| /' conftest.$ac_ext >&5
21506
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021507 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021508fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21511fi
21512
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021513{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21514echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021515if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021516
21517cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021518#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021519_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021520
21521fi
21522
Guido van Rossum627b2d71993-12-24 10:39:16 +000021523# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021524
Michael W. Hudson54241132001-12-07 15:38:26 +000021525
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021526{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21527echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021528if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021529 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021530else
Martin v. Löwis11437992002-04-12 09:54:03 +000021531 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021532/* confdefs.h. */
21533_ACEOF
21534cat confdefs.h >>conftest.$ac_ext
21535cat >>conftest.$ac_ext <<_ACEOF
21536/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021537$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021538int
21539main ()
21540{
21541static int test_array [1 - 2 * !(((char) -1) < 0)];
21542test_array [0] = 0
21543
21544 ;
21545 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021546}
Martin v. Löwis11437992002-04-12 09:54:03 +000021547_ACEOF
21548rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021549if { (ac_try="$ac_compile"
21550case "(($ac_try" in
21551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21552 *) ac_try_echo=$ac_try;;
21553esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021555 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021557 grep -v '^ *+' conftest.er1 >conftest.err
21558 rm -f conftest.er1
21559 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021561 (exit $ac_status); } && {
21562 test -z "$ac_c_werror_flag" ||
21563 test ! -s conftest.err
21564 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021565 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021566else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021568sed 's/^/| /' conftest.$ac_ext >&5
21569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021570 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021572
21573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021574fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021575{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21576echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021577if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021578 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021579#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021580_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021581
21582fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021583
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021584{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21585echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021586if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021587 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021588else
21589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021590/* confdefs.h. */
21591_ACEOF
21592cat confdefs.h >>conftest.$ac_ext
21593cat >>conftest.$ac_ext <<_ACEOF
21594/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021595
Martin v. Löwis11437992002-04-12 09:54:03 +000021596int
21597main ()
21598{
21599/* FIXME: Include the comments suggested by Paul. */
21600#ifndef __cplusplus
21601 /* Ultrix mips cc rejects this. */
21602 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021603 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000021604 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021605 char const *const *pcpcc;
21606 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021607 /* NEC SVR4.0.2 mips cc rejects this. */
21608 struct point {int x, y;};
21609 static struct point const zero = {0,0};
21610 /* AIX XL C 1.02.0.0 rejects this.
21611 It does not let you subtract one const X* pointer from another in
21612 an arm of an if-expression whose if-part is not a constant
21613 expression */
21614 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021615 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021616 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021617 ++pcpcc;
21618 ppc = (char**) pcpcc;
21619 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021620 { /* SCO 3.2v4 cc rejects this. */
21621 char *t;
21622 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021623
Martin v. Löwis11437992002-04-12 09:54:03 +000021624 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021625 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021626 }
21627 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21628 int x[] = {25, 17};
21629 const int *foo = &x[0];
21630 ++foo;
21631 }
21632 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21633 typedef const int *iptr;
21634 iptr p = 0;
21635 ++p;
21636 }
21637 { /* AIX XL C 1.02.0.0 rejects this saying
21638 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21639 struct s { int j; const int *ap[3]; };
21640 struct s *b; b->j = 5;
21641 }
21642 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21643 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021644 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021645 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021646 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021647#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021648
Martin v. Löwis11437992002-04-12 09:54:03 +000021649 ;
21650 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021651}
Martin v. Löwis11437992002-04-12 09:54:03 +000021652_ACEOF
21653rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021654if { (ac_try="$ac_compile"
21655case "(($ac_try" in
21656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21657 *) ac_try_echo=$ac_try;;
21658esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021660 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021662 grep -v '^ *+' conftest.er1 >conftest.err
21663 rm -f conftest.er1
21664 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021666 (exit $ac_status); } && {
21667 test -z "$ac_c_werror_flag" ||
21668 test ! -s conftest.err
21669 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021670 ac_cv_c_const=yes
21671else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021673sed 's/^/| /' conftest.$ac_ext >&5
21674
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021675 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021677
21678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021679fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021680{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21681echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021682if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021683
21684cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021685#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000021686_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021687
21688fi
21689
Michael W. Hudson54241132001-12-07 15:38:26 +000021690
Guido van Rossumda88dad1995-01-26 00:46:29 +000021691works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021692{ echo "$as_me:$LINENO: checking for working volatile" >&5
21693echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021694cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021695/* confdefs.h. */
21696_ACEOF
21697cat confdefs.h >>conftest.$ac_ext
21698cat >>conftest.$ac_ext <<_ACEOF
21699/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021700
Martin v. Löwis11437992002-04-12 09:54:03 +000021701int
21702main ()
21703{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021704volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021705 ;
21706 return 0;
21707}
21708_ACEOF
21709rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021710if { (ac_try="$ac_compile"
21711case "(($ac_try" in
21712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21713 *) ac_try_echo=$ac_try;;
21714esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021716 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021717 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021718 grep -v '^ *+' conftest.er1 >conftest.err
21719 rm -f conftest.er1
21720 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021722 (exit $ac_status); } && {
21723 test -z "$ac_c_werror_flag" ||
21724 test ! -s conftest.err
21725 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021726 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021727else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021729sed 's/^/| /' conftest.$ac_ext >&5
21730
Martin v. Löwis11437992002-04-12 09:54:03 +000021731
21732cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021733#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000021734_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021735
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021736
Guido van Rossum627b2d71993-12-24 10:39:16 +000021737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021738
21739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021740{ echo "$as_me:$LINENO: result: $works" >&5
21741echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021742
Guido van Rossumda88dad1995-01-26 00:46:29 +000021743works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021744{ echo "$as_me:$LINENO: checking for working signed char" >&5
21745echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021746cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021747/* confdefs.h. */
21748_ACEOF
21749cat confdefs.h >>conftest.$ac_ext
21750cat >>conftest.$ac_ext <<_ACEOF
21751/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021752
Martin v. Löwis11437992002-04-12 09:54:03 +000021753int
21754main ()
21755{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021756signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021757 ;
21758 return 0;
21759}
21760_ACEOF
21761rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021762if { (ac_try="$ac_compile"
21763case "(($ac_try" in
21764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21765 *) ac_try_echo=$ac_try;;
21766esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021768 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021770 grep -v '^ *+' conftest.er1 >conftest.err
21771 rm -f conftest.er1
21772 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021774 (exit $ac_status); } && {
21775 test -z "$ac_c_werror_flag" ||
21776 test ! -s conftest.err
21777 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021778 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021779else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021781sed 's/^/| /' conftest.$ac_ext >&5
21782
Martin v. Löwis11437992002-04-12 09:54:03 +000021783
21784cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021785#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021786_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021787
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021788
Guido van Rossum7f43da71994-08-01 12:15:30 +000021789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021790
21791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021792{ echo "$as_me:$LINENO: result: $works" >&5
21793echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021794
Guido van Rossumda88dad1995-01-26 00:46:29 +000021795have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021796{ echo "$as_me:$LINENO: checking for prototypes" >&5
21797echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021798cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021799/* confdefs.h. */
21800_ACEOF
21801cat confdefs.h >>conftest.$ac_ext
21802cat >>conftest.$ac_ext <<_ACEOF
21803/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021804int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021805int
21806main ()
21807{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021808return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021809 ;
21810 return 0;
21811}
21812_ACEOF
21813rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021814if { (ac_try="$ac_compile"
21815case "(($ac_try" in
21816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21817 *) ac_try_echo=$ac_try;;
21818esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021820 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021821 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021822 grep -v '^ *+' conftest.er1 >conftest.err
21823 rm -f conftest.er1
21824 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021826 (exit $ac_status); } && {
21827 test -z "$ac_c_werror_flag" ||
21828 test ! -s conftest.err
21829 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021830
21831
21832cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021833#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021834_ACEOF
21835
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021836 have_prototypes=yes
21837
Guido van Rossumf78abae1997-01-21 22:02:36 +000021838else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021840sed 's/^/| /' conftest.$ac_ext >&5
21841
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021842
Guido van Rossum7f43da71994-08-01 12:15:30 +000021843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021844
21845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021846{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21847echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021848
Guido van Rossumda88dad1995-01-26 00:46:29 +000021849works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021850{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21851echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021852cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021853/* confdefs.h. */
21854_ACEOF
21855cat confdefs.h >>conftest.$ac_ext
21856cat >>conftest.$ac_ext <<_ACEOF
21857/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021858
21859#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021860int foo(int x, ...) {
21861 va_list va;
21862 va_start(va, x);
21863 va_arg(va, int);
21864 va_arg(va, char *);
21865 va_arg(va, double);
21866 return 0;
21867}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021868
Martin v. Löwis11437992002-04-12 09:54:03 +000021869int
21870main ()
21871{
Guido van Rossum90eea071996-08-30 20:58:57 +000021872return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021873 ;
21874 return 0;
21875}
21876_ACEOF
21877rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021878if { (ac_try="$ac_compile"
21879case "(($ac_try" in
21880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21881 *) ac_try_echo=$ac_try;;
21882esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021884 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021886 grep -v '^ *+' conftest.er1 >conftest.err
21887 rm -f conftest.er1
21888 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021890 (exit $ac_status); } && {
21891 test -z "$ac_c_werror_flag" ||
21892 test ! -s conftest.err
21893 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021894
21895
21896cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021897#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021898_ACEOF
21899
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021900 works=yes
21901
Guido van Rossumf78abae1997-01-21 22:02:36 +000021902else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021903 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021904sed 's/^/| /' conftest.$ac_ext >&5
21905
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021906
Guido van Rossum627b2d71993-12-24 10:39:16 +000021907fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021908
21909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021910{ echo "$as_me:$LINENO: result: $works" >&5
21911echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021912
Martin v. Löwisd6320502004-08-12 13:45:08 +000021913# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021914{ echo "$as_me:$LINENO: checking for socketpair" >&5
21915echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021916cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021917/* confdefs.h. */
21918_ACEOF
21919cat confdefs.h >>conftest.$ac_ext
21920cat >>conftest.$ac_ext <<_ACEOF
21921/* end confdefs.h. */
21922
21923#include <sys/types.h>
21924#include <sys/socket.h>
21925
21926int
21927main ()
21928{
21929void *x=socketpair
21930 ;
21931 return 0;
21932}
21933_ACEOF
21934rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021935if { (ac_try="$ac_compile"
21936case "(($ac_try" in
21937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21938 *) ac_try_echo=$ac_try;;
21939esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021941 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021943 grep -v '^ *+' conftest.er1 >conftest.err
21944 rm -f conftest.er1
21945 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021947 (exit $ac_status); } && {
21948 test -z "$ac_c_werror_flag" ||
21949 test ! -s conftest.err
21950 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021951
21952cat >>confdefs.h <<\_ACEOF
21953#define HAVE_SOCKETPAIR 1
21954_ACEOF
21955
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021956 { echo "$as_me:$LINENO: result: yes" >&5
21957echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021958else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021959 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021960sed 's/^/| /' conftest.$ac_ext >&5
21961
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021962 { echo "$as_me:$LINENO: result: no" >&5
21963echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021964
21965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021966
21967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021968
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021969# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021970{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21971echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021972cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021973/* confdefs.h. */
21974_ACEOF
21975cat confdefs.h >>conftest.$ac_ext
21976cat >>conftest.$ac_ext <<_ACEOF
21977/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021978#include <sys/types.h>
21979#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021980int
21981main ()
21982{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021983struct sockaddr x;
21984x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021985 ;
21986 return 0;
21987}
21988_ACEOF
21989rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021990if { (ac_try="$ac_compile"
21991case "(($ac_try" in
21992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21993 *) ac_try_echo=$ac_try;;
21994esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021996 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021997 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021998 grep -v '^ *+' conftest.er1 >conftest.err
21999 rm -f conftest.er1
22000 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022002 (exit $ac_status); } && {
22003 test -z "$ac_c_werror_flag" ||
22004 test ! -s conftest.err
22005 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022006 { echo "$as_me:$LINENO: result: yes" >&5
22007echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022008
22009cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022010#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022011_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022012
22013else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022015sed 's/^/| /' conftest.$ac_ext >&5
22016
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022017 { echo "$as_me:$LINENO: result: no" >&5
22018echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022020
22021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022022
Guido van Rossumda88dad1995-01-26 00:46:29 +000022023va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022024{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22025echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022026cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022027/* confdefs.h. */
22028_ACEOF
22029cat confdefs.h >>conftest.$ac_ext
22030cat >>conftest.$ac_ext <<_ACEOF
22031/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022032
22033#ifdef HAVE_STDARG_PROTOTYPES
22034#include <stdarg.h>
22035#else
22036#include <varargs.h>
22037#endif
22038
Martin v. Löwis11437992002-04-12 09:54:03 +000022039int
22040main ()
22041{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022042va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022043 ;
22044 return 0;
22045}
22046_ACEOF
22047rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022048if { (ac_try="$ac_compile"
22049case "(($ac_try" in
22050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22051 *) ac_try_echo=$ac_try;;
22052esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022054 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022056 grep -v '^ *+' conftest.er1 >conftest.err
22057 rm -f conftest.er1
22058 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022060 (exit $ac_status); } && {
22061 test -z "$ac_c_werror_flag" ||
22062 test ! -s conftest.err
22063 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022064 :
22065else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022067sed 's/^/| /' conftest.$ac_ext >&5
22068
Martin v. Löwis11437992002-04-12 09:54:03 +000022069
22070
22071cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022072#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022073_ACEOF
22074
Guido van Rossumda88dad1995-01-26 00:46:29 +000022075 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022076
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022078
22079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022080{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22081echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022082
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022083# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022084
22085
22086
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022087{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22088echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022089if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022090 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022091else
Martin v. Löwis11437992002-04-12 09:54:03 +000022092 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022093/* confdefs.h. */
22094_ACEOF
22095cat confdefs.h >>conftest.$ac_ext
22096cat >>conftest.$ac_ext <<_ACEOF
22097/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022098/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22099 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22100#define gethostbyname_r innocuous_gethostbyname_r
22101
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022102/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022103 which can conflict with char gethostbyname_r (); below.
22104 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022105 <limits.h> exists even on freestanding compilers. */
22106
22107#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022108# include <limits.h>
22109#else
22110# include <assert.h>
22111#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022112
22113#undef gethostbyname_r
22114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022115/* Override any GCC internal prototype to avoid an error.
22116 Use char because int might match the return type of a GCC
22117 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022118#ifdef __cplusplus
22119extern "C"
22120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022121char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022122/* The GNU C library defines this for functions which it implements
22123 to always fail with ENOSYS. Some functions are actually named
22124 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022125#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022126choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022127#endif
22128
Skip Montanaro6dead952003-09-25 14:50:04 +000022129int
22130main ()
22131{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022132return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022133 ;
22134 return 0;
22135}
22136_ACEOF
22137rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022138if { (ac_try="$ac_link"
22139case "(($ac_try" in
22140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22141 *) ac_try_echo=$ac_try;;
22142esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022144 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022146 grep -v '^ *+' conftest.er1 >conftest.err
22147 rm -f conftest.er1
22148 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022150 (exit $ac_status); } && {
22151 test -z "$ac_c_werror_flag" ||
22152 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022153 } && test -s conftest$ac_exeext &&
22154 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022155 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022156else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022158sed 's/^/| /' conftest.$ac_ext >&5
22159
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022160 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022162
22163rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022164 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022165fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022166{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22167echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22168if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022169
Martin v. Löwis11437992002-04-12 09:54:03 +000022170 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022171#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022172_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022173
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022174 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22175echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022176 OLD_CFLAGS=$CFLAGS
22177 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022178 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022179/* confdefs.h. */
22180_ACEOF
22181cat confdefs.h >>conftest.$ac_ext
22182cat >>conftest.$ac_ext <<_ACEOF
22183/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022184
22185# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022186
Martin v. Löwis11437992002-04-12 09:54:03 +000022187int
22188main ()
22189{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022190
22191 char *name;
22192 struct hostent *he, *res;
22193 char buffer[2048];
22194 int buflen = 2048;
22195 int h_errnop;
22196
22197 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022198
22199 ;
22200 return 0;
22201}
22202_ACEOF
22203rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022204if { (ac_try="$ac_compile"
22205case "(($ac_try" in
22206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22207 *) ac_try_echo=$ac_try;;
22208esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022210 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022212 grep -v '^ *+' conftest.er1 >conftest.err
22213 rm -f conftest.er1
22214 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022216 (exit $ac_status); } && {
22217 test -z "$ac_c_werror_flag" ||
22218 test ! -s conftest.err
22219 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022220
22221 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022222#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022223_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022224
Martin v. Löwis11437992002-04-12 09:54:03 +000022225
22226cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022227#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022228_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022229
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022230 { echo "$as_me:$LINENO: result: yes" >&5
22231echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022232
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022233else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022235sed 's/^/| /' conftest.$ac_ext >&5
22236
Martin v. Löwis11437992002-04-12 09:54:03 +000022237
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022238 { echo "$as_me:$LINENO: result: no" >&5
22239echo "${ECHO_T}no" >&6; }
22240 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22241echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022243/* confdefs.h. */
22244_ACEOF
22245cat confdefs.h >>conftest.$ac_ext
22246cat >>conftest.$ac_ext <<_ACEOF
22247/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022248
22249# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022250
Martin v. Löwis11437992002-04-12 09:54:03 +000022251int
22252main ()
22253{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022254
22255 char *name;
22256 struct hostent *he;
22257 char buffer[2048];
22258 int buflen = 2048;
22259 int h_errnop;
22260
22261 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022262
22263 ;
22264 return 0;
22265}
22266_ACEOF
22267rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022268if { (ac_try="$ac_compile"
22269case "(($ac_try" in
22270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22271 *) ac_try_echo=$ac_try;;
22272esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022274 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022276 grep -v '^ *+' conftest.er1 >conftest.err
22277 rm -f conftest.er1
22278 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022280 (exit $ac_status); } && {
22281 test -z "$ac_c_werror_flag" ||
22282 test ! -s conftest.err
22283 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022284
22285 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022286#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022287_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022288
Martin v. Löwis11437992002-04-12 09:54:03 +000022289
22290cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022291#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022292_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022293
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022294 { echo "$as_me:$LINENO: result: yes" >&5
22295echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022296
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022297else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022299sed 's/^/| /' conftest.$ac_ext >&5
22300
Martin v. Löwis11437992002-04-12 09:54:03 +000022301
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022302 { echo "$as_me:$LINENO: result: no" >&5
22303echo "${ECHO_T}no" >&6; }
22304 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22305echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022307/* confdefs.h. */
22308_ACEOF
22309cat confdefs.h >>conftest.$ac_ext
22310cat >>conftest.$ac_ext <<_ACEOF
22311/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022312
22313# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022314
Martin v. Löwis11437992002-04-12 09:54:03 +000022315int
22316main ()
22317{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022318
22319 char *name;
22320 struct hostent *he;
22321 struct hostent_data data;
22322
22323 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022324
22325 ;
22326 return 0;
22327}
22328_ACEOF
22329rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022330if { (ac_try="$ac_compile"
22331case "(($ac_try" in
22332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22333 *) ac_try_echo=$ac_try;;
22334esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022336 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022337 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022338 grep -v '^ *+' conftest.er1 >conftest.err
22339 rm -f conftest.er1
22340 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022342 (exit $ac_status); } && {
22343 test -z "$ac_c_werror_flag" ||
22344 test ! -s conftest.err
22345 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022346
22347 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022348#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022349_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022350
Martin v. Löwis11437992002-04-12 09:54:03 +000022351
22352cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022353#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022354_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022355
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022356 { echo "$as_me:$LINENO: result: yes" >&5
22357echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022358
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022359else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022360 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022361sed 's/^/| /' conftest.$ac_ext >&5
22362
Martin v. Löwis11437992002-04-12 09:54:03 +000022363
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022364 { echo "$as_me:$LINENO: result: no" >&5
22365echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022366
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022368
22369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022370
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022372
22373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022374
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022376
22377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022378 CFLAGS=$OLD_CFLAGS
22379
22380else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022381
Martin v. Löwis11437992002-04-12 09:54:03 +000022382
22383for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022384do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022385as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22386{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22387echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022388if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022389 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022390else
Martin v. Löwis11437992002-04-12 09:54:03 +000022391 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022392/* confdefs.h. */
22393_ACEOF
22394cat confdefs.h >>conftest.$ac_ext
22395cat >>conftest.$ac_ext <<_ACEOF
22396/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022397/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22398 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22399#define $ac_func innocuous_$ac_func
22400
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022401/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022402 which can conflict with char $ac_func (); below.
22403 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022404 <limits.h> exists even on freestanding compilers. */
22405
22406#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022407# include <limits.h>
22408#else
22409# include <assert.h>
22410#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022411
22412#undef $ac_func
22413
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022414/* Override any GCC internal prototype to avoid an error.
22415 Use char because int might match the return type of a GCC
22416 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022417#ifdef __cplusplus
22418extern "C"
22419#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022420char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022421/* The GNU C library defines this for functions which it implements
22422 to always fail with ENOSYS. Some functions are actually named
22423 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022424#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022425choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022426#endif
22427
Skip Montanaro6dead952003-09-25 14:50:04 +000022428int
22429main ()
22430{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022431return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022432 ;
22433 return 0;
22434}
22435_ACEOF
22436rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022437if { (ac_try="$ac_link"
22438case "(($ac_try" in
22439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22440 *) ac_try_echo=$ac_try;;
22441esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022443 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022445 grep -v '^ *+' conftest.er1 >conftest.err
22446 rm -f conftest.er1
22447 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022449 (exit $ac_status); } && {
22450 test -z "$ac_c_werror_flag" ||
22451 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022452 } && test -s conftest$ac_exeext &&
22453 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022454 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022455else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022456 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022457sed 's/^/| /' conftest.$ac_ext >&5
22458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022459 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022461
22462rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022463 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022464fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022465ac_res=`eval echo '${'$as_ac_var'}'`
22466 { echo "$as_me:$LINENO: result: $ac_res" >&5
22467echo "${ECHO_T}$ac_res" >&6; }
22468if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022469 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022470#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022471_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022472
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022473fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022474done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022475
Michael W. Hudson54241132001-12-07 15:38:26 +000022476
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022477fi
22478
Michael W. Hudson54241132001-12-07 15:38:26 +000022479
22480
22481
22482
22483
22484
Guido van Rossum627b2d71993-12-24 10:39:16 +000022485# checks for system services
22486# (none yet)
22487
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022488# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022489{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22490echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022491if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022492 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022493else
Martin v. Löwis11437992002-04-12 09:54:03 +000022494 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022495/* confdefs.h. */
22496_ACEOF
22497cat confdefs.h >>conftest.$ac_ext
22498cat >>conftest.$ac_ext <<_ACEOF
22499/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022500/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22501 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22502#define __fpu_control innocuous___fpu_control
22503
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022504/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022505 which can conflict with char __fpu_control (); below.
22506 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022507 <limits.h> exists even on freestanding compilers. */
22508
22509#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022510# include <limits.h>
22511#else
22512# include <assert.h>
22513#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022514
22515#undef __fpu_control
22516
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022517/* Override any GCC internal prototype to avoid an error.
22518 Use char because int might match the return type of a GCC
22519 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022520#ifdef __cplusplus
22521extern "C"
22522#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022523char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022524/* The GNU C library defines this for functions which it implements
22525 to always fail with ENOSYS. Some functions are actually named
22526 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022527#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022528choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022529#endif
22530
Skip Montanaro6dead952003-09-25 14:50:04 +000022531int
22532main ()
22533{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022534return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022535 ;
22536 return 0;
22537}
22538_ACEOF
22539rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022540if { (ac_try="$ac_link"
22541case "(($ac_try" in
22542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22543 *) ac_try_echo=$ac_try;;
22544esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022546 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022548 grep -v '^ *+' conftest.er1 >conftest.err
22549 rm -f conftest.er1
22550 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022552 (exit $ac_status); } && {
22553 test -z "$ac_c_werror_flag" ||
22554 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022555 } && test -s conftest$ac_exeext &&
22556 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022557 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022558else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022560sed 's/^/| /' conftest.$ac_ext >&5
22561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022562 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022564
22565rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022566 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022567fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022568{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22569echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
22570if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022571 :
22572else
Martin v. Löwis11437992002-04-12 09:54:03 +000022573
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022574{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22575echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022576if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022577 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022578else
Martin v. Löwis11437992002-04-12 09:54:03 +000022579 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022580LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022581cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022582/* confdefs.h. */
22583_ACEOF
22584cat confdefs.h >>conftest.$ac_ext
22585cat >>conftest.$ac_ext <<_ACEOF
22586/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022588/* Override any GCC internal prototype to avoid an error.
22589 Use char because int might match the return type of a GCC
22590 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022591#ifdef __cplusplus
22592extern "C"
22593#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022594char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022595int
22596main ()
22597{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022598return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022599 ;
22600 return 0;
22601}
22602_ACEOF
22603rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022604if { (ac_try="$ac_link"
22605case "(($ac_try" in
22606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22607 *) ac_try_echo=$ac_try;;
22608esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022610 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022612 grep -v '^ *+' conftest.er1 >conftest.err
22613 rm -f conftest.er1
22614 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022616 (exit $ac_status); } && {
22617 test -z "$ac_c_werror_flag" ||
22618 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022619 } && test -s conftest$ac_exeext &&
22620 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022621 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022622else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022624sed 's/^/| /' conftest.$ac_ext >&5
22625
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022626 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022628
22629rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022630 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022631LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022632fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022633{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22634echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
22635if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022636 cat >>confdefs.h <<_ACEOF
22637#define HAVE_LIBIEEE 1
22638_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022639
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022640 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022641
Guido van Rossum627b2d71993-12-24 10:39:16 +000022642fi
22643
Michael W. Hudson54241132001-12-07 15:38:26 +000022644
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022645fi
22646
Michael W. Hudson54241132001-12-07 15:38:26 +000022647
Guido van Rossum7f253911997-05-09 02:42:48 +000022648# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022649{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22650echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022651
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022652# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022653if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022654 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022655if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022656then
22657
22658cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022659#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022660_ACEOF
22661
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022662 { echo "$as_me:$LINENO: result: yes" >&5
22663echo "${ECHO_T}yes" >&6; }
22664else { echo "$as_me:$LINENO: result: no" >&5
22665echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022666fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022667else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022668 { echo "$as_me:$LINENO: result: no" >&5
22669echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022670fi
22671
Guido van Rossum7f253911997-05-09 02:42:48 +000022672
Guido van Rossum7f43da71994-08-01 12:15:30 +000022673# check for --with-libm=...
22674
Guido van Rossum563e7081996-09-10 18:20:48 +000022675case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022676Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022677*) LIBM=-lm
22678esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022679{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22680echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022682# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022683if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022684 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022685if test "$withval" = no
22686then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022687 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
22688echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022689elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022690then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022691 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22692echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
22693else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22694echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022695 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022696fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022697else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022698 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22699echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022700fi
22701
Guido van Rossum7f43da71994-08-01 12:15:30 +000022702
22703# check for --with-libc=...
22704
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022705{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22706echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022708# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022709if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022710 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022711if test "$withval" = no
22712then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022713 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
22714echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022715elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022716then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022717 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22718echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
22719else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22720echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022721 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022722fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022723else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022724 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22725echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022726fi
22727
Guido van Rossum7f43da71994-08-01 12:15:30 +000022728
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022729# **************************************************
22730# * Check for various properties of floating point *
22731# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022732
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022733{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
22734echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022735if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022736 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022737else
22738
22739if test "$cross_compiling" = yes; then
22740 ac_cv_little_endian_double=no
22741else
22742 cat >conftest.$ac_ext <<_ACEOF
22743/* confdefs.h. */
22744_ACEOF
22745cat confdefs.h >>conftest.$ac_ext
22746cat >>conftest.$ac_ext <<_ACEOF
22747/* end confdefs.h. */
22748
22749#include <string.h>
22750int main() {
22751 double x = 9006104071832581.0;
22752 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22753 return 0;
22754 else
22755 return 1;
22756}
22757
22758_ACEOF
22759rm -f conftest$ac_exeext
22760if { (ac_try="$ac_link"
22761case "(($ac_try" in
22762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22763 *) ac_try_echo=$ac_try;;
22764esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022766 (eval "$ac_link") 2>&5
22767 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022769 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22770 { (case "(($ac_try" in
22771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22772 *) ac_try_echo=$ac_try;;
22773esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022775 (eval "$ac_try") 2>&5
22776 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022778 (exit $ac_status); }; }; then
22779 ac_cv_little_endian_double=yes
22780else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022781 echo "$as_me: program exited with status $ac_status" >&5
22782echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022783sed 's/^/| /' conftest.$ac_ext >&5
22784
22785( exit $ac_status )
22786ac_cv_little_endian_double=no
22787fi
22788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22789fi
22790
22791
22792fi
22793
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022794{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22795echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022796if test "$ac_cv_little_endian_double" = yes
22797then
22798
22799cat >>confdefs.h <<\_ACEOF
22800#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22801_ACEOF
22802
22803fi
22804
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022805{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22806echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022807if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022808 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022809else
22810
22811if test "$cross_compiling" = yes; then
22812 ac_cv_big_endian_double=no
22813else
22814 cat >conftest.$ac_ext <<_ACEOF
22815/* confdefs.h. */
22816_ACEOF
22817cat confdefs.h >>conftest.$ac_ext
22818cat >>conftest.$ac_ext <<_ACEOF
22819/* end confdefs.h. */
22820
22821#include <string.h>
22822int main() {
22823 double x = 9006104071832581.0;
22824 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22825 return 0;
22826 else
22827 return 1;
22828}
22829
22830_ACEOF
22831rm -f conftest$ac_exeext
22832if { (ac_try="$ac_link"
22833case "(($ac_try" in
22834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22835 *) ac_try_echo=$ac_try;;
22836esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022838 (eval "$ac_link") 2>&5
22839 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022841 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22842 { (case "(($ac_try" in
22843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22844 *) ac_try_echo=$ac_try;;
22845esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022847 (eval "$ac_try") 2>&5
22848 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022850 (exit $ac_status); }; }; then
22851 ac_cv_big_endian_double=yes
22852else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022853 echo "$as_me: program exited with status $ac_status" >&5
22854echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022855sed 's/^/| /' conftest.$ac_ext >&5
22856
22857( exit $ac_status )
22858ac_cv_big_endian_double=no
22859fi
22860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22861fi
22862
22863
22864fi
22865
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022866{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
22867echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022868if test "$ac_cv_big_endian_double" = yes
22869then
22870
22871cat >>confdefs.h <<\_ACEOF
22872#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
22873_ACEOF
22874
22875fi
22876
22877# Some ARM platforms use a mixed-endian representation for doubles.
22878# While Python doesn't currently have full support for these platforms
22879# (see e.g., issue 1762561), we can at least make sure that float <-> string
22880# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022881{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
22882echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022883if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022884 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022885else
22886
22887if test "$cross_compiling" = yes; then
22888 ac_cv_mixed_endian_double=no
22889else
22890 cat >conftest.$ac_ext <<_ACEOF
22891/* confdefs.h. */
22892_ACEOF
22893cat confdefs.h >>conftest.$ac_ext
22894cat >>conftest.$ac_ext <<_ACEOF
22895/* end confdefs.h. */
22896
22897#include <string.h>
22898int main() {
22899 double x = 9006104071832581.0;
22900 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
22901 return 0;
22902 else
22903 return 1;
22904}
22905
22906_ACEOF
22907rm -f conftest$ac_exeext
22908if { (ac_try="$ac_link"
22909case "(($ac_try" in
22910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22911 *) ac_try_echo=$ac_try;;
22912esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022914 (eval "$ac_link") 2>&5
22915 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022917 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22918 { (case "(($ac_try" in
22919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22920 *) ac_try_echo=$ac_try;;
22921esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022923 (eval "$ac_try") 2>&5
22924 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022926 (exit $ac_status); }; }; then
22927 ac_cv_mixed_endian_double=yes
22928else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022929 echo "$as_me: program exited with status $ac_status" >&5
22930echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022931sed 's/^/| /' conftest.$ac_ext >&5
22932
22933( exit $ac_status )
22934ac_cv_mixed_endian_double=no
22935fi
22936rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22937fi
22938
22939
22940fi
22941
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022942{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
22943echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022944if test "$ac_cv_mixed_endian_double" = yes
22945then
22946
22947cat >>confdefs.h <<\_ACEOF
22948#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
22949_ACEOF
22950
22951fi
22952
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022953# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000022954# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022955# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000022956# rounding; this is a problem on x86, where the x87 FPU has a default
22957# rounding precision of 64 bits. For gcc/x86, we try to fix this by
22958# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022959if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
22960then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022961 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000022962 # x87 control word. It should be, but you never know...
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022963 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
22964echo $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 +000022965 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022966/* confdefs.h. */
22967_ACEOF
22968cat confdefs.h >>conftest.$ac_ext
22969cat >>conftest.$ac_ext <<_ACEOF
22970/* end confdefs.h. */
22971
22972int
22973main ()
22974{
22975
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022976 unsigned short cw;
22977 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
22978 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022979
22980 ;
22981 return 0;
22982}
22983_ACEOF
22984rm -f conftest.$ac_objext
22985if { (ac_try="$ac_compile"
22986case "(($ac_try" in
22987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22988 *) ac_try_echo=$ac_try;;
22989esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022991 (eval "$ac_compile") 2>conftest.er1
22992 ac_status=$?
22993 grep -v '^ *+' conftest.er1 >conftest.err
22994 rm -f conftest.er1
22995 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022997 (exit $ac_status); } && {
22998 test -z "$ac_c_werror_flag" ||
22999 test ! -s conftest.err
23000 } && test -s conftest.$ac_objext; then
23001 have_gcc_asm_for_x87=yes
23002else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023003 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023004sed 's/^/| /' conftest.$ac_ext >&5
23005
23006 have_gcc_asm_for_x87=no
23007fi
23008
23009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023010 { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
23011echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023012 if test "$have_gcc_asm_for_x87" = yes
23013 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023014
23015cat >>confdefs.h <<\_ACEOF
23016#define HAVE_GCC_ASM_FOR_X87 1
23017_ACEOF
23018
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023019 fi
23020fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023021
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023022# Detect whether system arithmetic is subject to x87-style double
23023# rounding issues. The result of this test has little meaning on non
23024# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23025# mode is round-to-nearest and double rounding issues are present, and
23026# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023027{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23028echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023029# $BASECFLAGS may affect the result
23030ac_save_cc="$CC"
23031CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023032if test "$cross_compiling" = yes; then
23033 ac_cv_x87_double_rounding=no
23034else
23035 cat >conftest.$ac_ext <<_ACEOF
23036/* confdefs.h. */
23037_ACEOF
23038cat confdefs.h >>conftest.$ac_ext
23039cat >>conftest.$ac_ext <<_ACEOF
23040/* end confdefs.h. */
23041
23042#include <stdlib.h>
23043#include <math.h>
23044int main() {
23045 volatile double x, y, z;
23046 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23047 x = 0.99999999999999989; /* 1-2**-53 */
23048 y = 1./x;
23049 if (y != 1.)
23050 exit(0);
23051 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23052 x = 1e16;
23053 y = 2.99999;
23054 z = x + y;
23055 if (z != 1e16+4.)
23056 exit(0);
23057 /* both tests show evidence of double rounding */
23058 exit(1);
23059}
23060
23061_ACEOF
23062rm -f conftest$ac_exeext
23063if { (ac_try="$ac_link"
23064case "(($ac_try" in
23065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23066 *) ac_try_echo=$ac_try;;
23067esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023069 (eval "$ac_link") 2>&5
23070 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023072 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23073 { (case "(($ac_try" in
23074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23075 *) ac_try_echo=$ac_try;;
23076esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023078 (eval "$ac_try") 2>&5
23079 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023081 (exit $ac_status); }; }; then
23082 ac_cv_x87_double_rounding=no
23083else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023084 echo "$as_me: program exited with status $ac_status" >&5
23085echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023086sed 's/^/| /' conftest.$ac_ext >&5
23087
23088( exit $ac_status )
23089ac_cv_x87_double_rounding=yes
23090fi
23091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23092fi
23093
23094
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023095CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023096{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23097echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023098if test "$ac_cv_x87_double_rounding" = yes
23099then
23100
23101cat >>confdefs.h <<\_ACEOF
23102#define X87_DOUBLE_ROUNDING 1
23103_ACEOF
23104
23105fi
23106
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023107# ************************************
23108# * Check for mathematical functions *
23109# ************************************
23110
23111LIBS_SAVE=$LIBS
23112LIBS="$LIBS $LIBM"
23113
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023114# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23115# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023116{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23117echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023118if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023119 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023120else
23121
23122if test "$cross_compiling" = yes; then
23123 ac_cv_tanh_preserves_zero_sign=no
23124else
23125 cat >conftest.$ac_ext <<_ACEOF
23126/* confdefs.h. */
23127_ACEOF
23128cat confdefs.h >>conftest.$ac_ext
23129cat >>conftest.$ac_ext <<_ACEOF
23130/* end confdefs.h. */
23131
23132#include <math.h>
23133#include <stdlib.h>
23134int main() {
23135 /* return 0 if either negative zeros don't exist
23136 on this platform or if negative zeros exist
23137 and tanh(-0.) == -0. */
23138 if (atan2(0., -1.) == atan2(-0., -1.) ||
23139 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23140 else exit(1);
23141}
23142
23143_ACEOF
23144rm -f conftest$ac_exeext
23145if { (ac_try="$ac_link"
23146case "(($ac_try" in
23147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23148 *) ac_try_echo=$ac_try;;
23149esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023151 (eval "$ac_link") 2>&5
23152 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023154 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23155 { (case "(($ac_try" in
23156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23157 *) ac_try_echo=$ac_try;;
23158esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023160 (eval "$ac_try") 2>&5
23161 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023163 (exit $ac_status); }; }; then
23164 ac_cv_tanh_preserves_zero_sign=yes
23165else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023166 echo "$as_me: program exited with status $ac_status" >&5
23167echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023168sed 's/^/| /' conftest.$ac_ext >&5
23169
23170( exit $ac_status )
23171ac_cv_tanh_preserves_zero_sign=no
23172fi
23173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23174fi
23175
23176
23177fi
23178
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023179{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23180echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023181if test "$ac_cv_tanh_preserves_zero_sign" = yes
23182then
23183
23184cat >>confdefs.h <<\_ACEOF
23185#define TANH_PRESERVES_ZERO_SIGN 1
23186_ACEOF
23187
23188fi
23189
23190
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023191
Michael W. Hudson54241132001-12-07 15:38:26 +000023192
Christian Heimes99170a52007-12-19 02:07:34 +000023193
23194
23195
23196
23197
Mark Dickinsonf2537862009-04-18 13:58:18 +000023198
Mark Dickinson9c113362009-09-05 10:36:23 +000023199for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23200do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023201as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23202{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23203echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023204if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023205 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023206else
23207 cat >conftest.$ac_ext <<_ACEOF
23208/* confdefs.h. */
23209_ACEOF
23210cat confdefs.h >>conftest.$ac_ext
23211cat >>conftest.$ac_ext <<_ACEOF
23212/* end confdefs.h. */
23213/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23214 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23215#define $ac_func innocuous_$ac_func
23216
23217/* System header to define __stub macros and hopefully few prototypes,
23218 which can conflict with char $ac_func (); below.
23219 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23220 <limits.h> exists even on freestanding compilers. */
23221
23222#ifdef __STDC__
23223# include <limits.h>
23224#else
23225# include <assert.h>
23226#endif
23227
23228#undef $ac_func
23229
23230/* Override any GCC internal prototype to avoid an error.
23231 Use char because int might match the return type of a GCC
23232 builtin and then its argument prototype would still apply. */
23233#ifdef __cplusplus
23234extern "C"
23235#endif
23236char $ac_func ();
23237/* The GNU C library defines this for functions which it implements
23238 to always fail with ENOSYS. Some functions are actually named
23239 something starting with __ and the normal name is an alias. */
23240#if defined __stub_$ac_func || defined __stub___$ac_func
23241choke me
23242#endif
23243
23244int
23245main ()
23246{
23247return $ac_func ();
23248 ;
23249 return 0;
23250}
23251_ACEOF
23252rm -f conftest.$ac_objext conftest$ac_exeext
23253if { (ac_try="$ac_link"
23254case "(($ac_try" in
23255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23256 *) ac_try_echo=$ac_try;;
23257esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023259 (eval "$ac_link") 2>conftest.er1
23260 ac_status=$?
23261 grep -v '^ *+' conftest.er1 >conftest.err
23262 rm -f conftest.er1
23263 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023265 (exit $ac_status); } && {
23266 test -z "$ac_c_werror_flag" ||
23267 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023268 } && test -s conftest$ac_exeext &&
23269 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023270 eval "$as_ac_var=yes"
23271else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023272 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023273sed 's/^/| /' conftest.$ac_ext >&5
23274
23275 eval "$as_ac_var=no"
23276fi
23277
23278rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23279 conftest$ac_exeext conftest.$ac_ext
23280fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023281ac_res=`eval echo '${'$as_ac_var'}'`
23282 { echo "$as_me:$LINENO: result: $ac_res" >&5
23283echo "${ECHO_T}$ac_res" >&6; }
23284if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023285 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023286#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023287_ACEOF
23288
23289fi
23290done
23291
23292
23293
23294
23295
23296
23297for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023298do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023299as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23300{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23301echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023302if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023303 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023304else
23305 cat >conftest.$ac_ext <<_ACEOF
23306/* confdefs.h. */
23307_ACEOF
23308cat confdefs.h >>conftest.$ac_ext
23309cat >>conftest.$ac_ext <<_ACEOF
23310/* end confdefs.h. */
23311/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23312 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23313#define $ac_func innocuous_$ac_func
23314
23315/* System header to define __stub macros and hopefully few prototypes,
23316 which can conflict with char $ac_func (); below.
23317 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23318 <limits.h> exists even on freestanding compilers. */
23319
23320#ifdef __STDC__
23321# include <limits.h>
23322#else
23323# include <assert.h>
23324#endif
23325
23326#undef $ac_func
23327
23328/* Override any GCC internal prototype to avoid an error.
23329 Use char because int might match the return type of a GCC
23330 builtin and then its argument prototype would still apply. */
23331#ifdef __cplusplus
23332extern "C"
23333#endif
23334char $ac_func ();
23335/* The GNU C library defines this for functions which it implements
23336 to always fail with ENOSYS. Some functions are actually named
23337 something starting with __ and the normal name is an alias. */
23338#if defined __stub_$ac_func || defined __stub___$ac_func
23339choke me
23340#endif
23341
23342int
23343main ()
23344{
23345return $ac_func ();
23346 ;
23347 return 0;
23348}
23349_ACEOF
23350rm -f conftest.$ac_objext conftest$ac_exeext
23351if { (ac_try="$ac_link"
23352case "(($ac_try" in
23353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23354 *) ac_try_echo=$ac_try;;
23355esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023357 (eval "$ac_link") 2>conftest.er1
23358 ac_status=$?
23359 grep -v '^ *+' conftest.er1 >conftest.err
23360 rm -f conftest.er1
23361 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023363 (exit $ac_status); } && {
23364 test -z "$ac_c_werror_flag" ||
23365 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023366 } && test -s conftest$ac_exeext &&
23367 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023368 eval "$as_ac_var=yes"
23369else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023370 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023371sed 's/^/| /' conftest.$ac_ext >&5
23372
23373 eval "$as_ac_var=no"
23374fi
23375
23376rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23377 conftest$ac_exeext conftest.$ac_ext
23378fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023379ac_res=`eval echo '${'$as_ac_var'}'`
23380 { echo "$as_me:$LINENO: result: $ac_res" >&5
23381echo "${ECHO_T}$ac_res" >&6; }
23382if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023383 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023384#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023385_ACEOF
23386
23387fi
23388done
23389
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023390{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23391echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023392if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023393 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023394else
23395 cat >conftest.$ac_ext <<_ACEOF
23396/* confdefs.h. */
23397_ACEOF
23398cat confdefs.h >>conftest.$ac_ext
23399cat >>conftest.$ac_ext <<_ACEOF
23400/* end confdefs.h. */
23401#include <math.h>
23402
23403int
23404main ()
23405{
23406#ifndef isinf
23407 (void) isinf;
23408#endif
23409
23410 ;
23411 return 0;
23412}
23413_ACEOF
23414rm -f conftest.$ac_objext
23415if { (ac_try="$ac_compile"
23416case "(($ac_try" in
23417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23418 *) ac_try_echo=$ac_try;;
23419esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023421 (eval "$ac_compile") 2>conftest.er1
23422 ac_status=$?
23423 grep -v '^ *+' conftest.er1 >conftest.err
23424 rm -f conftest.er1
23425 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023427 (exit $ac_status); } && {
23428 test -z "$ac_c_werror_flag" ||
23429 test ! -s conftest.err
23430 } && test -s conftest.$ac_objext; then
23431 ac_cv_have_decl_isinf=yes
23432else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023433 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023434sed 's/^/| /' conftest.$ac_ext >&5
23435
23436 ac_cv_have_decl_isinf=no
23437fi
23438
23439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23440fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023441{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23442echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23443if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023444
23445cat >>confdefs.h <<_ACEOF
23446#define HAVE_DECL_ISINF 1
23447_ACEOF
23448
23449
23450else
23451 cat >>confdefs.h <<_ACEOF
23452#define HAVE_DECL_ISINF 0
23453_ACEOF
23454
23455
23456fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023457{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23458echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023459if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023460 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023461else
23462 cat >conftest.$ac_ext <<_ACEOF
23463/* confdefs.h. */
23464_ACEOF
23465cat confdefs.h >>conftest.$ac_ext
23466cat >>conftest.$ac_ext <<_ACEOF
23467/* end confdefs.h. */
23468#include <math.h>
23469
23470int
23471main ()
23472{
23473#ifndef isnan
23474 (void) isnan;
23475#endif
23476
23477 ;
23478 return 0;
23479}
23480_ACEOF
23481rm -f conftest.$ac_objext
23482if { (ac_try="$ac_compile"
23483case "(($ac_try" in
23484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23485 *) ac_try_echo=$ac_try;;
23486esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023488 (eval "$ac_compile") 2>conftest.er1
23489 ac_status=$?
23490 grep -v '^ *+' conftest.er1 >conftest.err
23491 rm -f conftest.er1
23492 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023494 (exit $ac_status); } && {
23495 test -z "$ac_c_werror_flag" ||
23496 test ! -s conftest.err
23497 } && test -s conftest.$ac_objext; then
23498 ac_cv_have_decl_isnan=yes
23499else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023500 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023501sed 's/^/| /' conftest.$ac_ext >&5
23502
23503 ac_cv_have_decl_isnan=no
23504fi
23505
23506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23507fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023508{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23509echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23510if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023511
23512cat >>confdefs.h <<_ACEOF
23513#define HAVE_DECL_ISNAN 1
23514_ACEOF
23515
23516
23517else
23518 cat >>confdefs.h <<_ACEOF
23519#define HAVE_DECL_ISNAN 0
23520_ACEOF
23521
23522
23523fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023524{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23525echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023526if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023527 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023528else
23529 cat >conftest.$ac_ext <<_ACEOF
23530/* confdefs.h. */
23531_ACEOF
23532cat confdefs.h >>conftest.$ac_ext
23533cat >>conftest.$ac_ext <<_ACEOF
23534/* end confdefs.h. */
23535#include <math.h>
23536
23537int
23538main ()
23539{
23540#ifndef isfinite
23541 (void) isfinite;
23542#endif
23543
23544 ;
23545 return 0;
23546}
23547_ACEOF
23548rm -f conftest.$ac_objext
23549if { (ac_try="$ac_compile"
23550case "(($ac_try" in
23551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23552 *) ac_try_echo=$ac_try;;
23553esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023555 (eval "$ac_compile") 2>conftest.er1
23556 ac_status=$?
23557 grep -v '^ *+' conftest.er1 >conftest.err
23558 rm -f conftest.er1
23559 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023561 (exit $ac_status); } && {
23562 test -z "$ac_c_werror_flag" ||
23563 test ! -s conftest.err
23564 } && test -s conftest.$ac_objext; then
23565 ac_cv_have_decl_isfinite=yes
23566else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023567 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023568sed 's/^/| /' conftest.$ac_ext >&5
23569
23570 ac_cv_have_decl_isfinite=no
23571fi
23572
23573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23574fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023575{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23576echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23577if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023578
23579cat >>confdefs.h <<_ACEOF
23580#define HAVE_DECL_ISFINITE 1
23581_ACEOF
23582
23583
23584else
23585 cat >>confdefs.h <<_ACEOF
23586#define HAVE_DECL_ISFINITE 0
23587_ACEOF
23588
23589
23590fi
23591
23592
Christian Heimes99170a52007-12-19 02:07:34 +000023593
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023594LIBS=$LIBS_SAVE
23595
Mark Dickinson10683072009-04-18 21:18:19 +000023596# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023597{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23598echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023599if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023600 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023601else
23602 if test "$cross_compiling" = yes; then
23603 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000023604else
23605 cat >conftest.$ac_ext <<_ACEOF
23606/* confdefs.h. */
23607_ACEOF
23608cat confdefs.h >>conftest.$ac_ext
23609cat >>conftest.$ac_ext <<_ACEOF
23610/* end confdefs.h. */
23611
23612#include <unistd.h>
23613#include <fcntl.h>
23614#include <stdio.h>
23615#include <semaphore.h>
23616#include <sys/stat.h>
23617
23618int main(void){
23619 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23620 int count;
23621 int res;
23622 if(a==SEM_FAILED){
23623 perror("sem_open");
23624 return 1;
23625
23626 }
23627 res = sem_getvalue(a, &count);
23628 sem_close(a);
23629 return res==-1 ? 1 : 0;
23630}
23631
Mark Dickinson10683072009-04-18 21:18:19 +000023632_ACEOF
23633rm -f conftest$ac_exeext
23634if { (ac_try="$ac_link"
23635case "(($ac_try" in
23636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23637 *) ac_try_echo=$ac_try;;
23638esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023640 (eval "$ac_link") 2>&5
23641 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023643 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23644 { (case "(($ac_try" in
23645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23646 *) ac_try_echo=$ac_try;;
23647esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023649 (eval "$ac_try") 2>&5
23650 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023652 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023653 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000023654else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023655 echo "$as_me: program exited with status $ac_status" >&5
23656echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023657sed 's/^/| /' conftest.$ac_ext >&5
23658
23659( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023660ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023661fi
23662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023663fi
23664
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023665
23666
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023667fi
23668
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023669{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23670echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023671if test $ac_cv_broken_sem_getvalue = yes
23672then
23673
23674cat >>confdefs.h <<\_ACEOF
23675#define HAVE_BROKEN_SEM_GETVALUE 1
23676_ACEOF
23677
23678fi
23679
Mark Dickinsonbd792642009-03-18 20:06:12 +000023680# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023681{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23682echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023683# Check whether --enable-big-digits was given.
23684if test "${enable_big_digits+set}" = set; then
23685 enableval=$enable_big_digits; case $enable_big_digits in
23686yes)
23687 enable_big_digits=30 ;;
23688no)
23689 enable_big_digits=15 ;;
2369015|30)
23691 ;;
23692*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023693 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23694echo "$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 +000023695 { (exit 1); exit 1; }; } ;;
23696esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023697{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23698echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023699
23700cat >>confdefs.h <<_ACEOF
23701#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23702_ACEOF
23703
23704
23705else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023706 { echo "$as_me:$LINENO: result: no value specified" >&5
23707echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023708fi
23709
23710
Guido van Rossumef2255b2000-03-10 22:30:29 +000023711# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023712if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023713 { echo "$as_me:$LINENO: checking for wchar.h" >&5
23714echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023715if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023716 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023717fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023718{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23719echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023720else
Martin v. Löwis11437992002-04-12 09:54:03 +000023721 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023722{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23723echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023724cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023725/* confdefs.h. */
23726_ACEOF
23727cat confdefs.h >>conftest.$ac_ext
23728cat >>conftest.$ac_ext <<_ACEOF
23729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023730$ac_includes_default
23731#include <wchar.h>
23732_ACEOF
23733rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023734if { (ac_try="$ac_compile"
23735case "(($ac_try" in
23736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23737 *) ac_try_echo=$ac_try;;
23738esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023742 grep -v '^ *+' conftest.er1 >conftest.err
23743 rm -f conftest.er1
23744 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023746 (exit $ac_status); } && {
23747 test -z "$ac_c_werror_flag" ||
23748 test ! -s conftest.err
23749 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023750 ac_header_compiler=yes
23751else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023753sed 's/^/| /' conftest.$ac_ext >&5
23754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023755 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023757
23758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023759{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23760echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023761
23762# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023763{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23764echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023765cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023766/* confdefs.h. */
23767_ACEOF
23768cat confdefs.h >>conftest.$ac_ext
23769cat >>conftest.$ac_ext <<_ACEOF
23770/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023771#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023772_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023773if { (ac_try="$ac_cpp conftest.$ac_ext"
23774case "(($ac_try" in
23775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23776 *) ac_try_echo=$ac_try;;
23777esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023779 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023780 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023781 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023782 rm -f conftest.er1
23783 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023785 (exit $ac_status); } >/dev/null && {
23786 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23787 test ! -s conftest.err
23788 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023789 ac_header_preproc=yes
23790else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023792sed 's/^/| /' conftest.$ac_ext >&5
23793
Martin v. Löwis11437992002-04-12 09:54:03 +000023794 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023796
Martin v. Löwis11437992002-04-12 09:54:03 +000023797rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023798{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23799echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023800
23801# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023802case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23803 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023804 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23805echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23806 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23807echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023808 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023809 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023810 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023811 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23812echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23813 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23814echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23815 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23816echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23817 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23818echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23819 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23820echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23821 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23822echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023823 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000023824## -------------------------------------- ##
23825## Report this to http://bugs.python.org/ ##
23826## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023827_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023828 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023829 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023830esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023831{ echo "$as_me:$LINENO: checking for wchar.h" >&5
23832echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023833if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023834 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023835else
23836 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023837fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023838{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23839echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023840
23841fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023842if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023843
23844
23845cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023846#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023847_ACEOF
23848
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023849 wchar_h="yes"
23850
Guido van Rossumef2255b2000-03-10 22:30:29 +000023851else
Martin v. Löwis11437992002-04-12 09:54:03 +000023852 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023853
23854fi
23855
Michael W. Hudson54241132001-12-07 15:38:26 +000023856
Martin v. Löwis11437992002-04-12 09:54:03 +000023857
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023858# determine wchar_t size
23859if test "$wchar_h" = yes
23860then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023861 { echo "$as_me:$LINENO: checking for wchar_t" >&5
23862echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
23863if test "${ac_cv_type_wchar_t+set}" = set; then
23864 echo $ECHO_N "(cached) $ECHO_C" >&6
23865else
23866 cat >conftest.$ac_ext <<_ACEOF
23867/* confdefs.h. */
23868_ACEOF
23869cat confdefs.h >>conftest.$ac_ext
23870cat >>conftest.$ac_ext <<_ACEOF
23871/* end confdefs.h. */
23872#include <wchar.h>
23873
23874typedef wchar_t ac__type_new_;
23875int
23876main ()
23877{
23878if ((ac__type_new_ *) 0)
23879 return 0;
23880if (sizeof (ac__type_new_))
23881 return 0;
23882 ;
23883 return 0;
23884}
23885_ACEOF
23886rm -f conftest.$ac_objext
23887if { (ac_try="$ac_compile"
23888case "(($ac_try" in
23889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23890 *) ac_try_echo=$ac_try;;
23891esac
23892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23893 (eval "$ac_compile") 2>conftest.er1
23894 ac_status=$?
23895 grep -v '^ *+' conftest.er1 >conftest.err
23896 rm -f conftest.er1
23897 cat conftest.err >&5
23898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23899 (exit $ac_status); } && {
23900 test -z "$ac_c_werror_flag" ||
23901 test ! -s conftest.err
23902 } && test -s conftest.$ac_objext; then
23903 ac_cv_type_wchar_t=yes
23904else
23905 echo "$as_me: failed program was:" >&5
23906sed 's/^/| /' conftest.$ac_ext >&5
23907
23908 ac_cv_type_wchar_t=no
23909fi
23910
23911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23912fi
23913{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
23914echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
23915
23916# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023917# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23918# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23919# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023920{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
23921echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023922if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023923 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023924else
Martin v. Löwis11437992002-04-12 09:54:03 +000023925 if test "$cross_compiling" = yes; then
23926 # Depending upon the size, compute the lo and hi bounds.
23927cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023928/* confdefs.h. */
23929_ACEOF
23930cat confdefs.h >>conftest.$ac_ext
23931cat >>conftest.$ac_ext <<_ACEOF
23932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023933#include <wchar.h>
23934
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023935 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023936int
23937main ()
23938{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023939static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023940test_array [0] = 0
23941
23942 ;
23943 return 0;
23944}
23945_ACEOF
23946rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023947if { (ac_try="$ac_compile"
23948case "(($ac_try" in
23949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23950 *) ac_try_echo=$ac_try;;
23951esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023955 grep -v '^ *+' conftest.er1 >conftest.err
23956 rm -f conftest.er1
23957 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023959 (exit $ac_status); } && {
23960 test -z "$ac_c_werror_flag" ||
23961 test ! -s conftest.err
23962 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023963 ac_lo=0 ac_mid=0
23964 while :; do
23965 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023966/* confdefs.h. */
23967_ACEOF
23968cat confdefs.h >>conftest.$ac_ext
23969cat >>conftest.$ac_ext <<_ACEOF
23970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023971#include <wchar.h>
23972
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023973 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023974int
23975main ()
23976{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023977static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023978test_array [0] = 0
23979
23980 ;
23981 return 0;
23982}
23983_ACEOF
23984rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023985if { (ac_try="$ac_compile"
23986case "(($ac_try" in
23987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23988 *) ac_try_echo=$ac_try;;
23989esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023991 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023993 grep -v '^ *+' conftest.er1 >conftest.err
23994 rm -f conftest.er1
23995 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023997 (exit $ac_status); } && {
23998 test -z "$ac_c_werror_flag" ||
23999 test ! -s conftest.err
24000 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024001 ac_hi=$ac_mid; break
24002else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024004sed 's/^/| /' conftest.$ac_ext >&5
24005
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024006 ac_lo=`expr $ac_mid + 1`
24007 if test $ac_lo -le $ac_mid; then
24008 ac_lo= ac_hi=
24009 break
24010 fi
24011 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024013
24014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024015 done
24016else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024018sed 's/^/| /' conftest.$ac_ext >&5
24019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024020 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024021/* confdefs.h. */
24022_ACEOF
24023cat confdefs.h >>conftest.$ac_ext
24024cat >>conftest.$ac_ext <<_ACEOF
24025/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024026#include <wchar.h>
24027
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024028 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024029int
24030main ()
24031{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024032static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024033test_array [0] = 0
24034
24035 ;
24036 return 0;
24037}
24038_ACEOF
24039rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024040if { (ac_try="$ac_compile"
24041case "(($ac_try" in
24042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24043 *) ac_try_echo=$ac_try;;
24044esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024046 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024047 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024048 grep -v '^ *+' conftest.er1 >conftest.err
24049 rm -f conftest.er1
24050 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024052 (exit $ac_status); } && {
24053 test -z "$ac_c_werror_flag" ||
24054 test ! -s conftest.err
24055 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024056 ac_hi=-1 ac_mid=-1
24057 while :; do
24058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024059/* confdefs.h. */
24060_ACEOF
24061cat confdefs.h >>conftest.$ac_ext
24062cat >>conftest.$ac_ext <<_ACEOF
24063/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024064#include <wchar.h>
24065
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024066 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024067int
24068main ()
24069{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024070static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024071test_array [0] = 0
24072
24073 ;
24074 return 0;
24075}
24076_ACEOF
24077rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024078if { (ac_try="$ac_compile"
24079case "(($ac_try" in
24080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24081 *) ac_try_echo=$ac_try;;
24082esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024084 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024085 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024086 grep -v '^ *+' conftest.er1 >conftest.err
24087 rm -f conftest.er1
24088 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024090 (exit $ac_status); } && {
24091 test -z "$ac_c_werror_flag" ||
24092 test ! -s conftest.err
24093 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024094 ac_lo=$ac_mid; break
24095else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024097sed 's/^/| /' conftest.$ac_ext >&5
24098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024099 ac_hi=`expr '(' $ac_mid ')' - 1`
24100 if test $ac_mid -le $ac_hi; then
24101 ac_lo= ac_hi=
24102 break
24103 fi
24104 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024106
24107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024108 done
24109else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024111sed 's/^/| /' conftest.$ac_ext >&5
24112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024113 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024115
24116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024118
24119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024120# Binary search between lo and hi bounds.
24121while test "x$ac_lo" != "x$ac_hi"; do
24122 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24123 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024124/* confdefs.h. */
24125_ACEOF
24126cat confdefs.h >>conftest.$ac_ext
24127cat >>conftest.$ac_ext <<_ACEOF
24128/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024129#include <wchar.h>
24130
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024131 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024132int
24133main ()
24134{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024135static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024136test_array [0] = 0
24137
24138 ;
24139 return 0;
24140}
24141_ACEOF
24142rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024143if { (ac_try="$ac_compile"
24144case "(($ac_try" in
24145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24146 *) ac_try_echo=$ac_try;;
24147esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024149 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024151 grep -v '^ *+' conftest.er1 >conftest.err
24152 rm -f conftest.er1
24153 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024155 (exit $ac_status); } && {
24156 test -z "$ac_c_werror_flag" ||
24157 test ! -s conftest.err
24158 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024159 ac_hi=$ac_mid
24160else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024162sed 's/^/| /' conftest.$ac_ext >&5
24163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024164 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024166
24167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024168done
24169case $ac_lo in
24170?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024171'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024172 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024173See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024174echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024175See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024176 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024177 else
24178 ac_cv_sizeof_wchar_t=0
24179 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024180esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024181else
Martin v. Löwis11437992002-04-12 09:54:03 +000024182 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024183/* confdefs.h. */
24184_ACEOF
24185cat confdefs.h >>conftest.$ac_ext
24186cat >>conftest.$ac_ext <<_ACEOF
24187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024188#include <wchar.h>
24189
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024190 typedef wchar_t ac__type_sizeof_;
24191static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24192static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024193#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024194#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024195int
24196main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024197{
Martin v. Löwis11437992002-04-12 09:54:03 +000024198
24199 FILE *f = fopen ("conftest.val", "w");
24200 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024201 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024202 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024203 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024204 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024205 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024206 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024207 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024208 }
24209 else
24210 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024211 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024212 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024213 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024214 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024215 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024216 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024217
24218 ;
24219 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024220}
Martin v. Löwis11437992002-04-12 09:54:03 +000024221_ACEOF
24222rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024223if { (ac_try="$ac_link"
24224case "(($ac_try" in
24225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24226 *) ac_try_echo=$ac_try;;
24227esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024229 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024230 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024232 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024233 { (case "(($ac_try" in
24234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24235 *) ac_try_echo=$ac_try;;
24236esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024238 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024239 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024241 (exit $ac_status); }; }; then
24242 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024243else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024244 echo "$as_me: program exited with status $ac_status" >&5
24245echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024246sed 's/^/| /' conftest.$ac_ext >&5
24247
Martin v. Löwis11437992002-04-12 09:54:03 +000024248( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024249if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024250 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024251See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024252echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024253See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024254 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024255 else
24256 ac_cv_sizeof_wchar_t=0
24257 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024259rm -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 +000024260fi
24261rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024262fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024263{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24264echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024265
24266
24267
Martin v. Löwis11437992002-04-12 09:54:03 +000024268cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024269#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024270_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024271
Michael W. Hudson54241132001-12-07 15:38:26 +000024272
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024273fi
24274
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024275{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24276echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024277have_ucs4_tcl=no
24278cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024279/* confdefs.h. */
24280_ACEOF
24281cat confdefs.h >>conftest.$ac_ext
24282cat >>conftest.$ac_ext <<_ACEOF
24283/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024284
24285#include <tcl.h>
24286#if TCL_UTF_MAX != 6
24287# error "NOT UCS4_TCL"
24288#endif
24289int
24290main ()
24291{
24292
24293 ;
24294 return 0;
24295}
24296_ACEOF
24297rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024298if { (ac_try="$ac_compile"
24299case "(($ac_try" in
24300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24301 *) ac_try_echo=$ac_try;;
24302esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024304 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024305 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024306 grep -v '^ *+' conftest.er1 >conftest.err
24307 rm -f conftest.er1
24308 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024310 (exit $ac_status); } && {
24311 test -z "$ac_c_werror_flag" ||
24312 test ! -s conftest.err
24313 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024314
24315
24316cat >>confdefs.h <<\_ACEOF
24317#define HAVE_UCS4_TCL 1
24318_ACEOF
24319
24320 have_ucs4_tcl=yes
24321
24322else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024324sed 's/^/| /' conftest.$ac_ext >&5
24325
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024326
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024328
24329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024330{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24331echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024332
Skip Montanaro6dead952003-09-25 14:50:04 +000024333# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024334if test "$wchar_h" = yes
24335then
24336 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024337 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24338echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024339 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024340 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024341else
24342
24343 if test "$cross_compiling" = yes; then
24344 ac_cv_wchar_t_signed=yes
24345else
24346 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024347/* confdefs.h. */
24348_ACEOF
24349cat confdefs.h >>conftest.$ac_ext
24350cat >>conftest.$ac_ext <<_ACEOF
24351/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024352
24353 #include <wchar.h>
24354 int main()
24355 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024356 /* Success: exit code 0 */
24357 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024358 }
24359
24360_ACEOF
24361rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024362if { (ac_try="$ac_link"
24363case "(($ac_try" in
24364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24365 *) ac_try_echo=$ac_try;;
24366esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024368 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024369 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024371 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024372 { (case "(($ac_try" in
24373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24374 *) ac_try_echo=$ac_try;;
24375esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024377 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024378 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024380 (exit $ac_status); }; }; then
24381 ac_cv_wchar_t_signed=yes
24382else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024383 echo "$as_me: program exited with status $ac_status" >&5
24384echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024385sed 's/^/| /' conftest.$ac_ext >&5
24386
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024387( exit $ac_status )
24388ac_cv_wchar_t_signed=no
24389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024390rm -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 +000024391fi
24392
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024393
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024394fi
24395
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024396 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24397echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024398fi
24399
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024400{ echo "$as_me:$LINENO: checking what type to use for str" >&5
24401echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000024402
24403# Check whether --with-wide-unicode was given.
24404if test "${with_wide_unicode+set}" = set; then
24405 withval=$with_wide_unicode;
24406if test "$withval" != no
24407then unicode_size="4"
24408else unicode_size="2"
24409fi
24410
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024411else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024412
Georg Brandl52d168a2008-01-07 18:10:24 +000024413case "$have_ucs4_tcl" in
24414 yes) unicode_size="4" ;;
24415 *) unicode_size="2" ;;
24416esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024417
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024418fi
24419
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024420
24421
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024422
Georg Brandl52d168a2008-01-07 18:10:24 +000024423case "$unicode_size" in
24424 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024425#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024426_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000024427 ;;
24428 *) cat >>confdefs.h <<\_ACEOF
24429#define Py_UNICODE_SIZE 2
24430_ACEOF
24431 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024432esac
24433
Michael W. Hudson54241132001-12-07 15:38:26 +000024434
Martin v. Löwis11437992002-04-12 09:54:03 +000024435
24436
Georg Brandl52d168a2008-01-07 18:10:24 +000024437# wchar_t is only usable if it maps to an unsigned type
24438if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024439 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000024440then
24441 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024442
Martin v. Löwis11437992002-04-12 09:54:03 +000024443cat >>confdefs.h <<\_ACEOF
24444#define HAVE_USABLE_WCHAR_T 1
24445_ACEOF
24446
Georg Brandl52d168a2008-01-07 18:10:24 +000024447 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024448#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024449_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024450
Georg Brandl52d168a2008-01-07 18:10:24 +000024451elif test "$ac_cv_sizeof_short" = "$unicode_size"
24452then
24453 PY_UNICODE_TYPE="unsigned short"
24454 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024455#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024456_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024457
Georg Brandl52d168a2008-01-07 18:10:24 +000024458elif test "$ac_cv_sizeof_long" = "$unicode_size"
24459then
24460 PY_UNICODE_TYPE="unsigned long"
24461 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024462#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024463_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024464
Georg Brandl52d168a2008-01-07 18:10:24 +000024465else
24466 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024467fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024468{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24469echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024470
24471# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024472{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24473echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024474if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024475 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024476else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024477 # See if sys/param.h defines the BYTE_ORDER macro.
24478cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024479/* confdefs.h. */
24480_ACEOF
24481cat confdefs.h >>conftest.$ac_ext
24482cat >>conftest.$ac_ext <<_ACEOF
24483/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024484#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024485#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024486
Martin v. Löwis11437992002-04-12 09:54:03 +000024487int
24488main ()
24489{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024490#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24491 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24492 bogus endian macros
24493#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024494
24495 ;
24496 return 0;
24497}
24498_ACEOF
24499rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024500if { (ac_try="$ac_compile"
24501case "(($ac_try" in
24502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24503 *) ac_try_echo=$ac_try;;
24504esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024506 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024507 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024508 grep -v '^ *+' conftest.er1 >conftest.err
24509 rm -f conftest.er1
24510 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024512 (exit $ac_status); } && {
24513 test -z "$ac_c_werror_flag" ||
24514 test ! -s conftest.err
24515 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024516 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024517cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024518/* confdefs.h. */
24519_ACEOF
24520cat confdefs.h >>conftest.$ac_ext
24521cat >>conftest.$ac_ext <<_ACEOF
24522/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024523#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024524#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024525
Martin v. Löwis11437992002-04-12 09:54:03 +000024526int
24527main ()
24528{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024529#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024530 not big endian
24531#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024532
24533 ;
24534 return 0;
24535}
24536_ACEOF
24537rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024538if { (ac_try="$ac_compile"
24539case "(($ac_try" in
24540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24541 *) ac_try_echo=$ac_try;;
24542esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024544 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024545 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024546 grep -v '^ *+' conftest.er1 >conftest.err
24547 rm -f conftest.er1
24548 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024550 (exit $ac_status); } && {
24551 test -z "$ac_c_werror_flag" ||
24552 test ! -s conftest.err
24553 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024554 ac_cv_c_bigendian=yes
24555else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024557sed 's/^/| /' conftest.$ac_ext >&5
24558
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024559 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024561
24562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024563else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024565sed 's/^/| /' conftest.$ac_ext >&5
24566
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024567 # It does not; compile a test program.
24568if test "$cross_compiling" = yes; then
24569 # try to guess the endianness by grepping values into an object file
24570 ac_cv_c_bigendian=unknown
24571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024572/* confdefs.h. */
24573_ACEOF
24574cat confdefs.h >>conftest.$ac_ext
24575cat >>conftest.$ac_ext <<_ACEOF
24576/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024577short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24578short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24579void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24580short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24581short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24582void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024583int
24584main ()
24585{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024586 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024587 ;
24588 return 0;
24589}
24590_ACEOF
24591rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024592if { (ac_try="$ac_compile"
24593case "(($ac_try" in
24594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24595 *) ac_try_echo=$ac_try;;
24596esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024598 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024600 grep -v '^ *+' conftest.er1 >conftest.err
24601 rm -f conftest.er1
24602 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024604 (exit $ac_status); } && {
24605 test -z "$ac_c_werror_flag" ||
24606 test ! -s conftest.err
24607 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024608 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024609 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024610fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024611if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24612 if test "$ac_cv_c_bigendian" = unknown; then
24613 ac_cv_c_bigendian=no
24614 else
24615 # finding both strings is unlikely to happen, but who knows?
24616 ac_cv_c_bigendian=unknown
24617 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024618fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024619else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024621sed 's/^/| /' conftest.$ac_ext >&5
24622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024623
Martin v. Löwis11437992002-04-12 09:54:03 +000024624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024625
24626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024627else
24628 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024629/* confdefs.h. */
24630_ACEOF
24631cat confdefs.h >>conftest.$ac_ext
24632cat >>conftest.$ac_ext <<_ACEOF
24633/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024634$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024635int
24636main ()
24637{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024638
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024639 /* Are we little or big endian? From Harbison&Steele. */
24640 union
24641 {
24642 long int l;
24643 char c[sizeof (long int)];
24644 } u;
24645 u.l = 1;
24646 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024647
24648 ;
24649 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024650}
Martin v. Löwis11437992002-04-12 09:54:03 +000024651_ACEOF
24652rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024653if { (ac_try="$ac_link"
24654case "(($ac_try" in
24655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24656 *) ac_try_echo=$ac_try;;
24657esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024659 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024660 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024662 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024663 { (case "(($ac_try" in
24664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24665 *) ac_try_echo=$ac_try;;
24666esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024668 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024669 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024671 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024672 ac_cv_c_bigendian=no
24673else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024674 echo "$as_me: program exited with status $ac_status" >&5
24675echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024676sed 's/^/| /' conftest.$ac_ext >&5
24677
Martin v. Löwis11437992002-04-12 09:54:03 +000024678( exit $ac_status )
24679ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024681rm -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 +000024682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024683
24684
Martin v. Löwis11437992002-04-12 09:54:03 +000024685fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024686
24687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24688fi
24689{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24690echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
24691case $ac_cv_c_bigendian in
24692 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024693
24694cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024695#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024696_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024697 ;;
24698 no)
24699 ;;
24700 *)
24701 { { echo "$as_me:$LINENO: error: unknown endianness
24702presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24703echo "$as_me: error: unknown endianness
24704presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024705 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024706esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024707
Michael W. Hudson54241132001-12-07 15:38:26 +000024708
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024709# Check whether right shifting a negative integer extends the sign bit
24710# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024711{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24712echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024713if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024714 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024715else
Martin v. Löwis11437992002-04-12 09:54:03 +000024716
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024717if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024718 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024719else
Martin v. Löwis11437992002-04-12 09:54:03 +000024720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024721/* confdefs.h. */
24722_ACEOF
24723cat confdefs.h >>conftest.$ac_ext
24724cat >>conftest.$ac_ext <<_ACEOF
24725/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024726
24727int main()
24728{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024729 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024730}
24731
Martin v. Löwis11437992002-04-12 09:54:03 +000024732_ACEOF
24733rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024734if { (ac_try="$ac_link"
24735case "(($ac_try" in
24736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24737 *) ac_try_echo=$ac_try;;
24738esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024740 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024741 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024743 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024744 { (case "(($ac_try" in
24745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24746 *) ac_try_echo=$ac_try;;
24747esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024749 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024750 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024752 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024753 ac_cv_rshift_extends_sign=yes
24754else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024755 echo "$as_me: program exited with status $ac_status" >&5
24756echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024757sed 's/^/| /' conftest.$ac_ext >&5
24758
Martin v. Löwis11437992002-04-12 09:54:03 +000024759( exit $ac_status )
24760ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024762rm -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 +000024763fi
24764
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024765
24766fi
24767
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024768{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24769echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024770if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024771then
Martin v. Löwis11437992002-04-12 09:54:03 +000024772
24773cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024774#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024775_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024776
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024777fi
24778
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024779# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024780{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24781echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024782if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024783 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024784else
Martin v. Löwis11437992002-04-12 09:54:03 +000024785
24786cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024787/* confdefs.h. */
24788_ACEOF
24789cat confdefs.h >>conftest.$ac_ext
24790cat >>conftest.$ac_ext <<_ACEOF
24791/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024792#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024793int
24794main ()
24795{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024796
24797 FILE *f = fopen("/dev/null", "r");
24798 flockfile(f);
24799 getc_unlocked(f);
24800 funlockfile(f);
24801
Martin v. Löwis11437992002-04-12 09:54:03 +000024802 ;
24803 return 0;
24804}
24805_ACEOF
24806rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024807if { (ac_try="$ac_link"
24808case "(($ac_try" in
24809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24810 *) ac_try_echo=$ac_try;;
24811esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024813 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024815 grep -v '^ *+' conftest.er1 >conftest.err
24816 rm -f conftest.er1
24817 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024819 (exit $ac_status); } && {
24820 test -z "$ac_c_werror_flag" ||
24821 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024822 } && test -s conftest$ac_exeext &&
24823 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024824 ac_cv_have_getc_unlocked=yes
24825else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024827sed 's/^/| /' conftest.$ac_ext >&5
24828
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024829 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024831
24832rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024833 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024834fi
24835
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024836{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24837echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024838if test "$ac_cv_have_getc_unlocked" = yes
24839then
Martin v. Löwis11437992002-04-12 09:54:03 +000024840
24841cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024842#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024843_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024844
24845fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024846
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024847# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024848# save the value of LIBS so we don't actually link Python with readline
24849LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024850
Gregory P. Smith18820942008-09-07 06:24:49 +000024851# On some systems we need to link readline to a termcap compatible
24852# library. NOTE: Keep the precedence of listed libraries synchronised
24853# with setup.py.
24854py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024855{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
24856echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024857for py_libtermcap in "" ncursesw ncurses curses termcap; do
24858 if test -z "$py_libtermcap"; then
24859 READLINE_LIBS="-lreadline"
24860 else
24861 READLINE_LIBS="-lreadline -l$py_libtermcap"
24862 fi
24863 LIBS="$READLINE_LIBS $LIBS_no_readline"
24864 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024865/* confdefs.h. */
24866_ACEOF
24867cat confdefs.h >>conftest.$ac_ext
24868cat >>conftest.$ac_ext <<_ACEOF
24869/* end confdefs.h. */
24870
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024871/* Override any GCC internal prototype to avoid an error.
24872 Use char because int might match the return type of a GCC
24873 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024874#ifdef __cplusplus
24875extern "C"
24876#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024877char readline ();
24878int
24879main ()
24880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024881return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024882 ;
24883 return 0;
24884}
24885_ACEOF
24886rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024887if { (ac_try="$ac_link"
24888case "(($ac_try" in
24889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24890 *) ac_try_echo=$ac_try;;
24891esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024893 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024894 ac_status=$?
24895 grep -v '^ *+' conftest.er1 >conftest.err
24896 rm -f conftest.er1
24897 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024899 (exit $ac_status); } && {
24900 test -z "$ac_c_werror_flag" ||
24901 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024902 } && test -s conftest$ac_exeext &&
24903 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000024904 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024905else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024906 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024907sed 's/^/| /' conftest.$ac_ext >&5
24908
Gregory P. Smith18820942008-09-07 06:24:49 +000024909
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024911
24912rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024913 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000024914 if test $py_cv_lib_readline = yes; then
24915 break
24916 fi
24917done
24918# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
24919#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000024920if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024921 { echo "$as_me:$LINENO: result: none" >&5
24922echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024923else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024924 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
24925echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024926
24927cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024928#define HAVE_LIBREADLINE 1
24929_ACEOF
24930
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024931fi
24932
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024933# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024934{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24935echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024936if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024937 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024938else
24939 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024940LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024941cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024942/* confdefs.h. */
24943_ACEOF
24944cat confdefs.h >>conftest.$ac_ext
24945cat >>conftest.$ac_ext <<_ACEOF
24946/* end confdefs.h. */
24947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024948/* Override any GCC internal prototype to avoid an error.
24949 Use char because int might match the return type of a GCC
24950 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024951#ifdef __cplusplus
24952extern "C"
24953#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024954char rl_callback_handler_install ();
24955int
24956main ()
24957{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024958return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024959 ;
24960 return 0;
24961}
24962_ACEOF
24963rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024964if { (ac_try="$ac_link"
24965case "(($ac_try" in
24966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24967 *) ac_try_echo=$ac_try;;
24968esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024970 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024971 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024972 grep -v '^ *+' conftest.er1 >conftest.err
24973 rm -f conftest.er1
24974 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024976 (exit $ac_status); } && {
24977 test -z "$ac_c_werror_flag" ||
24978 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024979 } && test -s conftest$ac_exeext &&
24980 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024981 ac_cv_lib_readline_rl_callback_handler_install=yes
24982else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024983 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024984sed 's/^/| /' conftest.$ac_ext >&5
24985
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024986 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024988
24989rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024990 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024991LIBS=$ac_check_lib_save_LIBS
24992fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024993{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
24994echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
24995if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024996
24997cat >>confdefs.h <<\_ACEOF
24998#define HAVE_RL_CALLBACK 1
24999_ACEOF
25000
25001fi
25002
25003
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025004# check for readline 2.2
25005cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025006/* confdefs.h. */
25007_ACEOF
25008cat confdefs.h >>conftest.$ac_ext
25009cat >>conftest.$ac_ext <<_ACEOF
25010/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025011#include <readline/readline.h>
25012_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025013if { (ac_try="$ac_cpp conftest.$ac_ext"
25014case "(($ac_try" in
25015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25016 *) ac_try_echo=$ac_try;;
25017esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025019 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025020 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025021 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025022 rm -f conftest.er1
25023 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025025 (exit $ac_status); } >/dev/null && {
25026 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25027 test ! -s conftest.err
25028 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025029 have_readline=yes
25030else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025032sed 's/^/| /' conftest.$ac_ext >&5
25033
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025034 have_readline=no
25035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025036
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025037rm -f conftest.err conftest.$ac_ext
25038if test $have_readline = yes
25039then
25040 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025041/* confdefs.h. */
25042_ACEOF
25043cat confdefs.h >>conftest.$ac_ext
25044cat >>conftest.$ac_ext <<_ACEOF
25045/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025046#include <readline/readline.h>
25047
25048_ACEOF
25049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025050 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025051
25052cat >>confdefs.h <<\_ACEOF
25053#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25054_ACEOF
25055
25056fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000025057rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025058
Antoine Pitroud5131772009-10-26 19:22:14 +000025059 cat >conftest.$ac_ext <<_ACEOF
25060/* confdefs.h. */
25061_ACEOF
25062cat confdefs.h >>conftest.$ac_ext
25063cat >>conftest.$ac_ext <<_ACEOF
25064/* end confdefs.h. */
25065#include <readline/readline.h>
25066
25067_ACEOF
25068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25069 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25070
25071cat >>confdefs.h <<\_ACEOF
25072#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25073_ACEOF
25074
25075fi
25076rm -f conftest*
25077
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025078fi
25079
Martin v. Löwis0daad592001-09-30 21:09:59 +000025080# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025081{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25082echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025083if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025084 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025085else
Martin v. Löwis11437992002-04-12 09:54:03 +000025086 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025087LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025088cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025089/* confdefs.h. */
25090_ACEOF
25091cat confdefs.h >>conftest.$ac_ext
25092cat >>conftest.$ac_ext <<_ACEOF
25093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025095/* Override any GCC internal prototype to avoid an error.
25096 Use char because int might match the return type of a GCC
25097 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025098#ifdef __cplusplus
25099extern "C"
25100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025101char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025102int
25103main ()
25104{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025105return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025106 ;
25107 return 0;
25108}
25109_ACEOF
25110rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025111if { (ac_try="$ac_link"
25112case "(($ac_try" in
25113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25114 *) ac_try_echo=$ac_try;;
25115esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025117 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025119 grep -v '^ *+' conftest.er1 >conftest.err
25120 rm -f conftest.er1
25121 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025123 (exit $ac_status); } && {
25124 test -z "$ac_c_werror_flag" ||
25125 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025126 } && test -s conftest$ac_exeext &&
25127 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025128 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025129else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025131sed 's/^/| /' conftest.$ac_ext >&5
25132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025133 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025135
25136rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025137 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025138LIBS=$ac_check_lib_save_LIBS
25139fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025140{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25141echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25142if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025143
Martin v. Löwis11437992002-04-12 09:54:03 +000025144cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025145#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025146_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025147
Martin v. Löwis0daad592001-09-30 21:09:59 +000025148fi
25149
Michael W. Hudson54241132001-12-07 15:38:26 +000025150
Thomas Wouters89d996e2007-09-08 17:39:28 +000025151# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025152{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25153echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025154if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025155 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025156else
25157 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025158LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025159cat >conftest.$ac_ext <<_ACEOF
25160/* confdefs.h. */
25161_ACEOF
25162cat confdefs.h >>conftest.$ac_ext
25163cat >>conftest.$ac_ext <<_ACEOF
25164/* end confdefs.h. */
25165
25166/* Override any GCC internal prototype to avoid an error.
25167 Use char because int might match the return type of a GCC
25168 builtin and then its argument prototype would still apply. */
25169#ifdef __cplusplus
25170extern "C"
25171#endif
25172char rl_completion_display_matches_hook ();
25173int
25174main ()
25175{
25176return rl_completion_display_matches_hook ();
25177 ;
25178 return 0;
25179}
25180_ACEOF
25181rm -f conftest.$ac_objext conftest$ac_exeext
25182if { (ac_try="$ac_link"
25183case "(($ac_try" in
25184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25185 *) ac_try_echo=$ac_try;;
25186esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025188 (eval "$ac_link") 2>conftest.er1
25189 ac_status=$?
25190 grep -v '^ *+' conftest.er1 >conftest.err
25191 rm -f conftest.er1
25192 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025194 (exit $ac_status); } && {
25195 test -z "$ac_c_werror_flag" ||
25196 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025197 } && test -s conftest$ac_exeext &&
25198 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025199 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25200else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025201 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025202sed 's/^/| /' conftest.$ac_ext >&5
25203
25204 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25205fi
25206
25207rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25208 conftest$ac_exeext conftest.$ac_ext
25209LIBS=$ac_check_lib_save_LIBS
25210fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025211{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25212echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25213if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025214
25215cat >>confdefs.h <<\_ACEOF
25216#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25217_ACEOF
25218
25219fi
25220
25221
Martin v. Löwis0daad592001-09-30 21:09:59 +000025222# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025223{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25224echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025225if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025226 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025227else
Martin v. Löwis11437992002-04-12 09:54:03 +000025228 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025229LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025230cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025231/* confdefs.h. */
25232_ACEOF
25233cat confdefs.h >>conftest.$ac_ext
25234cat >>conftest.$ac_ext <<_ACEOF
25235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025237/* Override any GCC internal prototype to avoid an error.
25238 Use char because int might match the return type of a GCC
25239 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025240#ifdef __cplusplus
25241extern "C"
25242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025243char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025244int
25245main ()
25246{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025247return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025248 ;
25249 return 0;
25250}
25251_ACEOF
25252rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025253if { (ac_try="$ac_link"
25254case "(($ac_try" in
25255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25256 *) ac_try_echo=$ac_try;;
25257esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025259 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025260 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025261 grep -v '^ *+' conftest.er1 >conftest.err
25262 rm -f conftest.er1
25263 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025265 (exit $ac_status); } && {
25266 test -z "$ac_c_werror_flag" ||
25267 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025268 } && test -s conftest$ac_exeext &&
25269 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025270 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025271else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025273sed 's/^/| /' conftest.$ac_ext >&5
25274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025275 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025277
25278rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025279 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025280LIBS=$ac_check_lib_save_LIBS
25281fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025282{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25283echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25284if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025285
Martin v. Löwis11437992002-04-12 09:54:03 +000025286cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025287#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025288_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025289
Guido van Rossum353ae582001-07-10 16:45:32 +000025290fi
25291
Jack Jansendd19cf82001-12-06 22:36:17 +000025292
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025293# also in readline 4.2
25294cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025295/* confdefs.h. */
25296_ACEOF
25297cat confdefs.h >>conftest.$ac_ext
25298cat >>conftest.$ac_ext <<_ACEOF
25299/* end confdefs.h. */
25300#include <readline/readline.h>
25301_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025302if { (ac_try="$ac_cpp conftest.$ac_ext"
25303case "(($ac_try" in
25304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25305 *) ac_try_echo=$ac_try;;
25306esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025308 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025309 ac_status=$?
25310 grep -v '^ *+' conftest.er1 >conftest.err
25311 rm -f conftest.er1
25312 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025314 (exit $ac_status); } >/dev/null && {
25315 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25316 test ! -s conftest.err
25317 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025318 have_readline=yes
25319else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025320 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025321sed 's/^/| /' conftest.$ac_ext >&5
25322
25323 have_readline=no
25324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025325
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025326rm -f conftest.err conftest.$ac_ext
25327if test $have_readline = yes
25328then
25329 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025330/* confdefs.h. */
25331_ACEOF
25332cat confdefs.h >>conftest.$ac_ext
25333cat >>conftest.$ac_ext <<_ACEOF
25334/* end confdefs.h. */
25335#include <readline/readline.h>
25336
25337_ACEOF
25338if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25339 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25340
25341cat >>confdefs.h <<\_ACEOF
25342#define HAVE_RL_CATCH_SIGNAL 1
25343_ACEOF
25344
25345fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000025346rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025347
25348fi
25349
Martin v. Löwis82bca632006-02-10 20:49:30 +000025350# End of readline checks: restore LIBS
25351LIBS=$LIBS_no_readline
25352
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025353{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25354echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025355if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025356 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025357else
Martin v. Löwis11437992002-04-12 09:54:03 +000025358
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025359if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025360 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025361else
Martin v. Löwis11437992002-04-12 09:54:03 +000025362 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025363/* confdefs.h. */
25364_ACEOF
25365cat confdefs.h >>conftest.$ac_ext
25366cat >>conftest.$ac_ext <<_ACEOF
25367/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025368
25369int main()
25370{
25371 int val1 = nice(1);
25372 if (val1 != -1 && val1 == nice(2))
25373 exit(0);
25374 exit(1);
25375}
25376
Martin v. Löwis11437992002-04-12 09:54:03 +000025377_ACEOF
25378rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025379if { (ac_try="$ac_link"
25380case "(($ac_try" in
25381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25382 *) ac_try_echo=$ac_try;;
25383esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025385 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025386 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025388 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025389 { (case "(($ac_try" in
25390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25391 *) ac_try_echo=$ac_try;;
25392esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025394 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025395 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025397 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025398 ac_cv_broken_nice=yes
25399else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025400 echo "$as_me: program exited with status $ac_status" >&5
25401echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025402sed 's/^/| /' conftest.$ac_ext >&5
25403
Martin v. Löwis11437992002-04-12 09:54:03 +000025404( exit $ac_status )
25405ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025407rm -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 +000025408fi
25409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025410
25411fi
25412
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025413{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25414echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025415if test "$ac_cv_broken_nice" = yes
25416then
Martin v. Löwis11437992002-04-12 09:54:03 +000025417
25418cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025419#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025420_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025421
25422fi
25423
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025424{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25425echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025426if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025427 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025428else
25429 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025430 ac_cv_broken_poll=no
25431else
25432 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025433/* confdefs.h. */
25434_ACEOF
25435cat confdefs.h >>conftest.$ac_ext
25436cat >>conftest.$ac_ext <<_ACEOF
25437/* end confdefs.h. */
25438
25439#include <poll.h>
25440
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025441int main()
25442{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025443 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025444 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025445
25446 close (42);
25447
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025448 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025449 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025450 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025451 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025452 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025453 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025454 return 1;
25455}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025456
25457_ACEOF
25458rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025459if { (ac_try="$ac_link"
25460case "(($ac_try" in
25461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25462 *) ac_try_echo=$ac_try;;
25463esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025465 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025466 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025468 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025469 { (case "(($ac_try" in
25470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25471 *) ac_try_echo=$ac_try;;
25472esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025474 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025475 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025477 (exit $ac_status); }; }; then
25478 ac_cv_broken_poll=yes
25479else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025480 echo "$as_me: program exited with status $ac_status" >&5
25481echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025482sed 's/^/| /' conftest.$ac_ext >&5
25483
25484( exit $ac_status )
25485ac_cv_broken_poll=no
25486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025487rm -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 +000025488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025489
25490
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025491fi
25492
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025493{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25494echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025495if test "$ac_cv_broken_poll" = yes
25496then
25497
25498cat >>confdefs.h <<\_ACEOF
25499#define HAVE_BROKEN_POLL 1
25500_ACEOF
25501
25502fi
25503
Brett Cannon43802422005-02-10 20:48:03 +000025504# 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 +000025505# (which is not required by ISO C or UNIX spec) and/or if we support
25506# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025507{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25508echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025509if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025510 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025511else
25512 cat >conftest.$ac_ext <<_ACEOF
25513/* confdefs.h. */
25514_ACEOF
25515cat confdefs.h >>conftest.$ac_ext
25516cat >>conftest.$ac_ext <<_ACEOF
25517/* end confdefs.h. */
25518#include <sys/types.h>
25519#include <$ac_cv_struct_tm>
25520
25521
25522int
25523main ()
25524{
25525static struct tm ac_aggr;
25526if (ac_aggr.tm_zone)
25527return 0;
25528 ;
25529 return 0;
25530}
25531_ACEOF
25532rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025533if { (ac_try="$ac_compile"
25534case "(($ac_try" in
25535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25536 *) ac_try_echo=$ac_try;;
25537esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025539 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025540 ac_status=$?
25541 grep -v '^ *+' conftest.er1 >conftest.err
25542 rm -f conftest.er1
25543 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025545 (exit $ac_status); } && {
25546 test -z "$ac_c_werror_flag" ||
25547 test ! -s conftest.err
25548 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025549 ac_cv_member_struct_tm_tm_zone=yes
25550else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025551 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025552sed 's/^/| /' conftest.$ac_ext >&5
25553
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025554 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025555/* confdefs.h. */
25556_ACEOF
25557cat confdefs.h >>conftest.$ac_ext
25558cat >>conftest.$ac_ext <<_ACEOF
25559/* end confdefs.h. */
25560#include <sys/types.h>
25561#include <$ac_cv_struct_tm>
25562
25563
25564int
25565main ()
25566{
25567static struct tm ac_aggr;
25568if (sizeof ac_aggr.tm_zone)
25569return 0;
25570 ;
25571 return 0;
25572}
25573_ACEOF
25574rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025575if { (ac_try="$ac_compile"
25576case "(($ac_try" in
25577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25578 *) ac_try_echo=$ac_try;;
25579esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025581 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025582 ac_status=$?
25583 grep -v '^ *+' conftest.er1 >conftest.err
25584 rm -f conftest.er1
25585 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025587 (exit $ac_status); } && {
25588 test -z "$ac_c_werror_flag" ||
25589 test ! -s conftest.err
25590 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025591 ac_cv_member_struct_tm_tm_zone=yes
25592else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025593 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025594sed 's/^/| /' conftest.$ac_ext >&5
25595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025596 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025598
25599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025601
25602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025603fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025604{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25605echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25606if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025607
25608cat >>confdefs.h <<_ACEOF
25609#define HAVE_STRUCT_TM_TM_ZONE 1
25610_ACEOF
25611
25612
25613fi
25614
25615if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25616
25617cat >>confdefs.h <<\_ACEOF
25618#define HAVE_TM_ZONE 1
25619_ACEOF
25620
25621else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025622 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25623echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025624if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025625 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025626else
25627 cat >conftest.$ac_ext <<_ACEOF
25628/* confdefs.h. */
25629_ACEOF
25630cat confdefs.h >>conftest.$ac_ext
25631cat >>conftest.$ac_ext <<_ACEOF
25632/* end confdefs.h. */
25633#include <time.h>
25634
25635int
25636main ()
25637{
25638#ifndef tzname
25639 (void) tzname;
25640#endif
25641
25642 ;
25643 return 0;
25644}
25645_ACEOF
25646rm -f conftest.$ac_objext
25647if { (ac_try="$ac_compile"
25648case "(($ac_try" in
25649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25650 *) ac_try_echo=$ac_try;;
25651esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025653 (eval "$ac_compile") 2>conftest.er1
25654 ac_status=$?
25655 grep -v '^ *+' conftest.er1 >conftest.err
25656 rm -f conftest.er1
25657 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025659 (exit $ac_status); } && {
25660 test -z "$ac_c_werror_flag" ||
25661 test ! -s conftest.err
25662 } && test -s conftest.$ac_objext; then
25663 ac_cv_have_decl_tzname=yes
25664else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025665 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025666sed 's/^/| /' conftest.$ac_ext >&5
25667
25668 ac_cv_have_decl_tzname=no
25669fi
25670
25671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25672fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025673{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25674echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25675if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025676
25677cat >>confdefs.h <<_ACEOF
25678#define HAVE_DECL_TZNAME 1
25679_ACEOF
25680
25681
25682else
25683 cat >>confdefs.h <<_ACEOF
25684#define HAVE_DECL_TZNAME 0
25685_ACEOF
25686
25687
25688fi
25689
25690
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025691 { echo "$as_me:$LINENO: checking for tzname" >&5
25692echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025693if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025694 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025695else
25696 cat >conftest.$ac_ext <<_ACEOF
25697/* confdefs.h. */
25698_ACEOF
25699cat confdefs.h >>conftest.$ac_ext
25700cat >>conftest.$ac_ext <<_ACEOF
25701/* end confdefs.h. */
25702#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025703#if !HAVE_DECL_TZNAME
25704extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025705#endif
25706
25707int
25708main ()
25709{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025710return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025711 ;
25712 return 0;
25713}
25714_ACEOF
25715rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025716if { (ac_try="$ac_link"
25717case "(($ac_try" in
25718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25719 *) ac_try_echo=$ac_try;;
25720esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025722 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025723 ac_status=$?
25724 grep -v '^ *+' conftest.er1 >conftest.err
25725 rm -f conftest.er1
25726 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025728 (exit $ac_status); } && {
25729 test -z "$ac_c_werror_flag" ||
25730 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025731 } && test -s conftest$ac_exeext &&
25732 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025733 ac_cv_var_tzname=yes
25734else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025735 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025736sed 's/^/| /' conftest.$ac_ext >&5
25737
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025738 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025739fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025740
25741rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025742 conftest$ac_exeext conftest.$ac_ext
25743fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025744{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25745echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025746 if test $ac_cv_var_tzname = yes; then
25747
25748cat >>confdefs.h <<\_ACEOF
25749#define HAVE_TZNAME 1
25750_ACEOF
25751
25752 fi
25753fi
25754
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025755
Martin v. Löwis1d459062005-03-14 21:23:33 +000025756# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025757{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25758echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025759if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025760 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025761else
25762
25763if test "$cross_compiling" = yes; then
25764 ac_cv_working_tzset=no
25765else
25766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025767/* confdefs.h. */
25768_ACEOF
25769cat confdefs.h >>conftest.$ac_ext
25770cat >>conftest.$ac_ext <<_ACEOF
25771/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025772
25773#include <stdlib.h>
25774#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025775#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025776
25777#if HAVE_TZNAME
25778extern char *tzname[];
25779#endif
25780
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025781int main()
25782{
Brett Cannon18367812003-09-19 00:59:16 +000025783 /* Note that we need to ensure that not only does tzset(3)
25784 do 'something' with localtime, but it works as documented
25785 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025786 This includes making sure that tzname is set properly if
25787 tm->tm_zone does not exist since it is the alternative way
25788 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025789
25790 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025791 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025792 */
25793
Martin v. Löwis1d459062005-03-14 21:23:33 +000025794 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025795 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25796
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025797 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025798 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025799 if (localtime(&groundhogday)->tm_hour != 0)
25800 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025801#if HAVE_TZNAME
25802 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25803 if (strcmp(tzname[0], "UTC") ||
25804 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25805 exit(1);
25806#endif
Brett Cannon18367812003-09-19 00:59:16 +000025807
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025808 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025809 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025810 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025811 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025812#if HAVE_TZNAME
25813 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25814 exit(1);
25815#endif
Brett Cannon18367812003-09-19 00:59:16 +000025816
25817 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25818 tzset();
25819 if (localtime(&groundhogday)->tm_hour != 11)
25820 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025821#if HAVE_TZNAME
25822 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25823 exit(1);
25824#endif
25825
25826#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025827 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25828 exit(1);
25829 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25830 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025831#endif
Brett Cannon18367812003-09-19 00:59:16 +000025832
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025833 exit(0);
25834}
25835
25836_ACEOF
25837rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025838if { (ac_try="$ac_link"
25839case "(($ac_try" in
25840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25841 *) ac_try_echo=$ac_try;;
25842esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025844 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025845 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025847 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025848 { (case "(($ac_try" in
25849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25850 *) ac_try_echo=$ac_try;;
25851esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025853 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025854 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025856 (exit $ac_status); }; }; then
25857 ac_cv_working_tzset=yes
25858else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025859 echo "$as_me: program exited with status $ac_status" >&5
25860echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025861sed 's/^/| /' conftest.$ac_ext >&5
25862
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025863( exit $ac_status )
25864ac_cv_working_tzset=no
25865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025866rm -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 +000025867fi
25868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025869
25870fi
25871
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025872{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25873echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025874if test "$ac_cv_working_tzset" = yes
25875then
25876
25877cat >>confdefs.h <<\_ACEOF
25878#define HAVE_WORKING_TZSET 1
25879_ACEOF
25880
25881fi
25882
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025883# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025884{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25885echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025886if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025887 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025888else
25889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025890/* confdefs.h. */
25891_ACEOF
25892cat confdefs.h >>conftest.$ac_ext
25893cat >>conftest.$ac_ext <<_ACEOF
25894/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025895#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025896int
25897main ()
25898{
25899
25900struct stat st;
25901st.st_mtim.tv_nsec = 1;
25902
25903 ;
25904 return 0;
25905}
25906_ACEOF
25907rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025908if { (ac_try="$ac_compile"
25909case "(($ac_try" in
25910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25911 *) ac_try_echo=$ac_try;;
25912esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025916 grep -v '^ *+' conftest.er1 >conftest.err
25917 rm -f conftest.er1
25918 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025920 (exit $ac_status); } && {
25921 test -z "$ac_c_werror_flag" ||
25922 test ! -s conftest.err
25923 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025924 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025925else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025926 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025927sed 's/^/| /' conftest.$ac_ext >&5
25928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025929 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025930fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25933fi
25934
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025935{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25936echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025937if test "$ac_cv_stat_tv_nsec" = yes
25938then
25939
25940cat >>confdefs.h <<\_ACEOF
25941#define HAVE_STAT_TV_NSEC 1
25942_ACEOF
25943
25944fi
25945
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025946# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025947{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25948echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025949if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025950 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025951else
25952 cat >conftest.$ac_ext <<_ACEOF
25953/* confdefs.h. */
25954_ACEOF
25955cat confdefs.h >>conftest.$ac_ext
25956cat >>conftest.$ac_ext <<_ACEOF
25957/* end confdefs.h. */
25958#include <sys/stat.h>
25959int
25960main ()
25961{
25962
25963struct stat st;
25964st.st_mtimespec.tv_nsec = 1;
25965
25966 ;
25967 return 0;
25968}
25969_ACEOF
25970rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025971if { (ac_try="$ac_compile"
25972case "(($ac_try" in
25973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25974 *) ac_try_echo=$ac_try;;
25975esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025977 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025978 ac_status=$?
25979 grep -v '^ *+' conftest.er1 >conftest.err
25980 rm -f conftest.er1
25981 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025983 (exit $ac_status); } && {
25984 test -z "$ac_c_werror_flag" ||
25985 test ! -s conftest.err
25986 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025987 ac_cv_stat_tv_nsec2=yes
25988else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025989 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025990sed 's/^/| /' conftest.$ac_ext >&5
25991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025992 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025993fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25996fi
25997
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025998{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
25999echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026000if test "$ac_cv_stat_tv_nsec2" = yes
26001then
26002
26003cat >>confdefs.h <<\_ACEOF
26004#define HAVE_STAT_TV_NSEC2 1
26005_ACEOF
26006
26007fi
26008
Jack Jansen666b1e72001-10-31 12:11:48 +000026009# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026010{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26011echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026012if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026013 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026014else
Martin v. Löwis11437992002-04-12 09:54:03 +000026015 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026016/* confdefs.h. */
26017_ACEOF
26018cat confdefs.h >>conftest.$ac_ext
26019cat >>conftest.$ac_ext <<_ACEOF
26020/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026021#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026022int
26023main ()
26024{
Jack Jansen666b1e72001-10-31 12:11:48 +000026025
26026 int rtn;
26027 rtn = mvwdelch(0,0,0);
26028
Martin v. Löwis11437992002-04-12 09:54:03 +000026029 ;
26030 return 0;
26031}
26032_ACEOF
26033rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026034if { (ac_try="$ac_compile"
26035case "(($ac_try" in
26036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26037 *) ac_try_echo=$ac_try;;
26038esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026040 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026041 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026042 grep -v '^ *+' conftest.er1 >conftest.err
26043 rm -f conftest.er1
26044 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026046 (exit $ac_status); } && {
26047 test -z "$ac_c_werror_flag" ||
26048 test ! -s conftest.err
26049 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026050 ac_cv_mvwdelch_is_expression=yes
26051else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026052 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026053sed 's/^/| /' conftest.$ac_ext >&5
26054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026055 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026056fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26059fi
26060
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026061{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26062echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026063
26064if test "$ac_cv_mvwdelch_is_expression" = yes
26065then
Martin v. Löwis11437992002-04-12 09:54:03 +000026066
26067cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026068#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026069_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026070
26071fi
26072
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026073{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26074echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026075if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026076 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026077else
Martin v. Löwis11437992002-04-12 09:54:03 +000026078 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026079/* confdefs.h. */
26080_ACEOF
26081cat confdefs.h >>conftest.$ac_ext
26082cat >>conftest.$ac_ext <<_ACEOF
26083/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026084#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026085int
26086main ()
26087{
Jack Jansen666b1e72001-10-31 12:11:48 +000026088
26089 WINDOW *w;
26090 w->_flags = 0;
26091
Martin v. Löwis11437992002-04-12 09:54:03 +000026092 ;
26093 return 0;
26094}
26095_ACEOF
26096rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026097if { (ac_try="$ac_compile"
26098case "(($ac_try" in
26099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26100 *) ac_try_echo=$ac_try;;
26101esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026103 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026105 grep -v '^ *+' conftest.er1 >conftest.err
26106 rm -f conftest.er1
26107 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026109 (exit $ac_status); } && {
26110 test -z "$ac_c_werror_flag" ||
26111 test ! -s conftest.err
26112 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026113 ac_cv_window_has_flags=yes
26114else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026116sed 's/^/| /' conftest.$ac_ext >&5
26117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026118 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026119fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026120
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26122fi
26123
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026124{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26125echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026126
Jack Jansen666b1e72001-10-31 12:11:48 +000026127
26128if test "$ac_cv_window_has_flags" = yes
26129then
Martin v. Löwis11437992002-04-12 09:54:03 +000026130
26131cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026132#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026133_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026134
26135fi
26136
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026137{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26138echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026139cat >conftest.$ac_ext <<_ACEOF
26140/* confdefs.h. */
26141_ACEOF
26142cat confdefs.h >>conftest.$ac_ext
26143cat >>conftest.$ac_ext <<_ACEOF
26144/* end confdefs.h. */
26145#include <curses.h>
26146int
26147main ()
26148{
26149void *x=is_term_resized
26150 ;
26151 return 0;
26152}
26153_ACEOF
26154rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026155if { (ac_try="$ac_compile"
26156case "(($ac_try" in
26157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26158 *) ac_try_echo=$ac_try;;
26159esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026161 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026162 ac_status=$?
26163 grep -v '^ *+' conftest.er1 >conftest.err
26164 rm -f conftest.er1
26165 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026167 (exit $ac_status); } && {
26168 test -z "$ac_c_werror_flag" ||
26169 test ! -s conftest.err
26170 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026171
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026172cat >>confdefs.h <<\_ACEOF
26173#define HAVE_CURSES_IS_TERM_RESIZED 1
26174_ACEOF
26175
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026176 { echo "$as_me:$LINENO: result: yes" >&5
26177echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026178else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026179 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026180sed 's/^/| /' conftest.$ac_ext >&5
26181
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026182 { echo "$as_me:$LINENO: result: no" >&5
26183echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026184
26185fi
26186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26188
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026189{ echo "$as_me:$LINENO: checking for resize_term" >&5
26190echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026191cat >conftest.$ac_ext <<_ACEOF
26192/* confdefs.h. */
26193_ACEOF
26194cat confdefs.h >>conftest.$ac_ext
26195cat >>conftest.$ac_ext <<_ACEOF
26196/* end confdefs.h. */
26197#include <curses.h>
26198int
26199main ()
26200{
26201void *x=resize_term
26202 ;
26203 return 0;
26204}
26205_ACEOF
26206rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026207if { (ac_try="$ac_compile"
26208case "(($ac_try" in
26209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26210 *) ac_try_echo=$ac_try;;
26211esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026213 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026214 ac_status=$?
26215 grep -v '^ *+' conftest.er1 >conftest.err
26216 rm -f conftest.er1
26217 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026219 (exit $ac_status); } && {
26220 test -z "$ac_c_werror_flag" ||
26221 test ! -s conftest.err
26222 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026223
26224cat >>confdefs.h <<\_ACEOF
26225#define HAVE_CURSES_RESIZE_TERM 1
26226_ACEOF
26227
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026228 { echo "$as_me:$LINENO: result: yes" >&5
26229echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026230else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026231 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026232sed 's/^/| /' conftest.$ac_ext >&5
26233
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026234 { echo "$as_me:$LINENO: result: no" >&5
26235echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026236
26237fi
26238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26240
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026241{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26242echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026243cat >conftest.$ac_ext <<_ACEOF
26244/* confdefs.h. */
26245_ACEOF
26246cat confdefs.h >>conftest.$ac_ext
26247cat >>conftest.$ac_ext <<_ACEOF
26248/* end confdefs.h. */
26249#include <curses.h>
26250int
26251main ()
26252{
26253void *x=resizeterm
26254 ;
26255 return 0;
26256}
26257_ACEOF
26258rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026259if { (ac_try="$ac_compile"
26260case "(($ac_try" in
26261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26262 *) ac_try_echo=$ac_try;;
26263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026265 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026266 ac_status=$?
26267 grep -v '^ *+' conftest.er1 >conftest.err
26268 rm -f conftest.er1
26269 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026271 (exit $ac_status); } && {
26272 test -z "$ac_c_werror_flag" ||
26273 test ! -s conftest.err
26274 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026275
26276cat >>confdefs.h <<\_ACEOF
26277#define HAVE_CURSES_RESIZETERM 1
26278_ACEOF
26279
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026280 { echo "$as_me:$LINENO: result: yes" >&5
26281echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026282else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026283 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026284sed 's/^/| /' conftest.$ac_ext >&5
26285
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026286 { echo "$as_me:$LINENO: result: no" >&5
26287echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026288
26289fi
26290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26292
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026293{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26294echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026295
26296if test -r /dev/ptmx
26297then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026298 { echo "$as_me:$LINENO: result: yes" >&5
26299echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026300
26301cat >>confdefs.h <<\_ACEOF
26302#define HAVE_DEV_PTMX 1
26303_ACEOF
26304
Thomas Wouters89f507f2006-12-13 04:49:30 +000026305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026306 { echo "$as_me:$LINENO: result: no" >&5
26307echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026308fi
26309
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026310{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26311echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026312
26313if test -r /dev/ptc
26314then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026315 { echo "$as_me:$LINENO: result: yes" >&5
26316echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026317
26318cat >>confdefs.h <<\_ACEOF
26319#define HAVE_DEV_PTC 1
26320_ACEOF
26321
Thomas Wouters89f507f2006-12-13 04:49:30 +000026322else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026323 { echo "$as_me:$LINENO: result: no" >&5
26324echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026325fi
26326
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026327{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26328echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026329if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026330 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026331else
26332 if test "$cross_compiling" = yes; then
26333 ac_cv_have_size_t_format=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000026334else
26335 cat >conftest.$ac_ext <<_ACEOF
26336/* confdefs.h. */
26337_ACEOF
26338cat confdefs.h >>conftest.$ac_ext
26339cat >>conftest.$ac_ext <<_ACEOF
26340/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026341
Thomas Wouters477c8d52006-05-27 19:21:47 +000026342#include <stdio.h>
26343#include <stddef.h>
26344#include <string.h>
26345
Christian Heimes2c181612007-12-17 20:04:13 +000026346#ifdef HAVE_SYS_TYPES_H
26347#include <sys/types.h>
26348#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000026349
26350#ifdef HAVE_SSIZE_T
26351typedef ssize_t Py_ssize_t;
26352#elif SIZEOF_VOID_P == SIZEOF_LONG
26353typedef long Py_ssize_t;
26354#else
26355typedef int Py_ssize_t;
26356#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000026357
Christian Heimes2c181612007-12-17 20:04:13 +000026358int main()
26359{
26360 char buffer[256];
26361
Thomas Wouters477c8d52006-05-27 19:21:47 +000026362 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26363 return 1;
26364
Thomas Wouters89f507f2006-12-13 04:49:30 +000026365 if (strcmp(buffer, "123"))
26366 return 1;
26367
26368 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26369 return 1;
26370
26371 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000026372 return 1;
26373
26374 return 0;
26375}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026376
Thomas Wouters477c8d52006-05-27 19:21:47 +000026377_ACEOF
26378rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026379if { (ac_try="$ac_link"
26380case "(($ac_try" in
26381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26382 *) ac_try_echo=$ac_try;;
26383esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026385 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026386 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026388 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026389 { (case "(($ac_try" in
26390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26391 *) ac_try_echo=$ac_try;;
26392esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026394 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026395 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026397 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026398 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026399else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026400 echo "$as_me: program exited with status $ac_status" >&5
26401echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026402sed 's/^/| /' conftest.$ac_ext >&5
26403
26404( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026405ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026406fi
26407rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026408fi
26409
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026410
26411
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026412fi
26413
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026414{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26415echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026416if test $ac_cv_have_size_t_format = yes
26417then
26418
26419cat >>confdefs.h <<\_ACEOF
26420#define PY_FORMAT_SIZE_T "z"
26421_ACEOF
26422
26423fi
26424
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026425{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26426echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026427if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026428 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026429else
Martin v. Löwis11437992002-04-12 09:54:03 +000026430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026431/* confdefs.h. */
26432_ACEOF
26433cat confdefs.h >>conftest.$ac_ext
26434cat >>conftest.$ac_ext <<_ACEOF
26435/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026436
26437#ifdef HAVE_SYS_TYPES_H
26438#include <sys/types.h>
26439#endif
26440#ifdef HAVE_SYS_SOCKET_H
26441#include <sys/socket.h>
26442#endif
26443
26444
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026445typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026446int
26447main ()
26448{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026449if ((ac__type_new_ *) 0)
26450 return 0;
26451if (sizeof (ac__type_new_))
26452 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026453 ;
26454 return 0;
26455}
26456_ACEOF
26457rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026458if { (ac_try="$ac_compile"
26459case "(($ac_try" in
26460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26461 *) ac_try_echo=$ac_try;;
26462esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026464 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026466 grep -v '^ *+' conftest.er1 >conftest.err
26467 rm -f conftest.er1
26468 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026470 (exit $ac_status); } && {
26471 test -z "$ac_c_werror_flag" ||
26472 test ! -s conftest.err
26473 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026474 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026475else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026477sed 's/^/| /' conftest.$ac_ext >&5
26478
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026479 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026481
26482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026483fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026484{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26485echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26486if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026487 :
26488else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026489
Martin v. Löwis01c04012002-11-11 14:58:44 +000026490cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026491#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026492_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026493
26494fi
26495
Michael W. Hudson54241132001-12-07 15:38:26 +000026496
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026497{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
26498echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026499if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026500 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026501else
26502 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000026503 ac_cv_broken_mbstowcs=no
26504else
26505 cat >conftest.$ac_ext <<_ACEOF
26506/* confdefs.h. */
26507_ACEOF
26508cat confdefs.h >>conftest.$ac_ext
26509cat >>conftest.$ac_ext <<_ACEOF
26510/* end confdefs.h. */
26511
26512#include<stdlib.h>
26513int main() {
26514 size_t len = -1;
26515 const char *str = "text";
26516 len = mbstowcs(NULL, str, 0);
26517 return (len != 4);
26518}
26519
26520_ACEOF
26521rm -f conftest$ac_exeext
26522if { (ac_try="$ac_link"
26523case "(($ac_try" in
26524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26525 *) ac_try_echo=$ac_try;;
26526esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026528 (eval "$ac_link") 2>&5
26529 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026531 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26532 { (case "(($ac_try" in
26533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26534 *) ac_try_echo=$ac_try;;
26535esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026537 (eval "$ac_try") 2>&5
26538 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026540 (exit $ac_status); }; }; then
26541 ac_cv_broken_mbstowcs=no
26542else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026543 echo "$as_me: program exited with status $ac_status" >&5
26544echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026545sed 's/^/| /' conftest.$ac_ext >&5
26546
26547( exit $ac_status )
26548ac_cv_broken_mbstowcs=yes
26549fi
26550rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26551fi
26552
26553
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026554fi
26555
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026556{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
26557echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000026558if test "$ac_cv_broken_mbstowcs" = yes
26559then
26560
26561cat >>confdefs.h <<\_ACEOF
26562#define HAVE_BROKEN_MBSTOWCS 1
26563_ACEOF
26564
26565fi
26566
Antoine Pitroub52ec782009-01-25 16:34:23 +000026567# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026568{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
26569echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026570
26571# Check whether --with-computed-gotos was given.
26572if test "${with_computed_gotos+set}" = set; then
26573 withval=$with_computed_gotos;
26574if test "$withval" != no
26575then
26576
26577cat >>confdefs.h <<\_ACEOF
26578#define USE_COMPUTED_GOTOS 1
26579_ACEOF
26580
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026581 { echo "$as_me:$LINENO: result: yes" >&5
26582echo "${ECHO_T}yes" >&6; }
26583else { echo "$as_me:$LINENO: result: no" >&5
26584echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026585fi
26586else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026587 { echo "$as_me:$LINENO: result: no" >&5
26588echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026589fi
26590
26591
26592
Michael W. Hudson54241132001-12-07 15:38:26 +000026593
26594
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026595for h in `(cd $srcdir;echo Python/thread_*.h)`
26596do
26597 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26598done
26599
Michael W. Hudson54241132001-12-07 15:38:26 +000026600
Neal Norwitzd24499d2005-12-18 21:36:39 +000026601SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026602{ echo "$as_me:$LINENO: checking for build directories" >&5
26603echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026604for dir in $SRCDIRS; do
26605 if test ! -d $dir; then
26606 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026607 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026608done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026609{ echo "$as_me:$LINENO: result: done" >&5
26610echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026611
Guido van Rossum627b2d71993-12-24 10:39:16 +000026612# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000026613ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026614
Martin v. Löwis11437992002-04-12 09:54:03 +000026615cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026616# This file is a shell script that caches the results of configure
26617# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026618# scripts and configure runs, see configure's option --config-cache.
26619# It is not useful on other systems. If it contains results you don't
26620# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026621#
Martin v. Löwis11437992002-04-12 09:54:03 +000026622# config.status only pays attention to the cache file if you give it
26623# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026624#
Skip Montanaro6dead952003-09-25 14:50:04 +000026625# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026626# loading this file, other *unset* `ac_cv_foo' will be assigned the
26627# following values.
26628
26629_ACEOF
26630
Guido van Rossumf78abae1997-01-21 22:02:36 +000026631# The following way of writing the cache mishandles newlines in values,
26632# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026633# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026634# Ultrix sh set writes to stderr and can't be redirected directly,
26635# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026636(
26637 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26638 eval ac_val=\$$ac_var
26639 case $ac_val in #(
26640 *${as_nl}*)
26641 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026642 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26643echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026644 esac
26645 case $ac_var in #(
26646 _ | IFS | as_nl) ;; #(
26647 *) $as_unset $ac_var ;;
26648 esac ;;
26649 esac
26650 done
26651
Martin v. Löwis11437992002-04-12 09:54:03 +000026652 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026653 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26654 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026655 # `set' does not quote correctly, so add quotes (double-quote
26656 # substitution turns \\\\ into \\, and sed turns \\ into \).
26657 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026658 "s/'/'\\\\''/g;
26659 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026660 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026661 *)
26662 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026663 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026664 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026665 esac |
26666 sort
26667) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026668 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026669 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026670 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026671 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026672 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26673 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026674 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26675 :end' >>confcache
26676if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26677 if test -w "$cache_file"; then
26678 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026679 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
26680echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026681 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026682 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026683 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26684echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026685 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026686fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026687rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026688
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026689test "x$prefix" = xNONE && prefix=$ac_default_prefix
26690# Let make expand exec_prefix.
26691test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026692
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026693DEFS=-DHAVE_CONFIG_H
26694
Skip Montanaro6dead952003-09-25 14:50:04 +000026695ac_libobjs=
26696ac_ltlibobjs=
26697for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26698 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026699 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026700 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026701 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26702 # will be set to the directory where LIBOBJS objects are built.
26703 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26704 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026705done
26706LIBOBJS=$ac_libobjs
26707
26708LTLIBOBJS=$ac_ltlibobjs
26709
26710
Martin v. Löwis11437992002-04-12 09:54:03 +000026711
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026712: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000026713ac_clean_files_save=$ac_clean_files
26714ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026715{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26716echo "$as_me: creating $CONFIG_STATUS" >&6;}
26717cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026718#! $SHELL
26719# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026720# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026721# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026722# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026723
Martin v. Löwis11437992002-04-12 09:54:03 +000026724debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026725ac_cs_recheck=false
26726ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026727SHELL=\${CONFIG_SHELL-$SHELL}
26728_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026729
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026730cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026731## --------------------- ##
26732## M4sh Initialization. ##
26733## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026735# Be more Bourne compatible
26736DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026737if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26738 emulate sh
26739 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026740 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026741 # is contrary to our usage. Disable this feature.
26742 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026743 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026744else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026745 case `(set -o) 2>/dev/null` in
26746 *posix*) set -o posix ;;
26747esac
26748
Michael W. Hudson54241132001-12-07 15:38:26 +000026749fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000026750
26751
Michael W. Hudson54241132001-12-07 15:38:26 +000026752
Michael W. Hudson54241132001-12-07 15:38:26 +000026753
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026754# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026755# Avoid depending upon Character Ranges.
26756as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26757as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26758as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26759as_cr_digits='0123456789'
26760as_cr_alnum=$as_cr_Letters$as_cr_digits
26761
26762# The user is always right.
26763if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026764 echo "#! /bin/sh" >conf$$.sh
26765 echo "exit 0" >>conf$$.sh
26766 chmod +x conf$$.sh
26767 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26768 PATH_SEPARATOR=';'
26769 else
26770 PATH_SEPARATOR=:
26771 fi
26772 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026773fi
26774
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026775# Support unset when possible.
26776if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26777 as_unset=unset
26778else
26779 as_unset=false
26780fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026782
26783# IFS
26784# We need space, tab and new line, in precisely that order. Quoting is
26785# there to prevent editors from complaining about space-tab.
26786# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26787# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026788as_nl='
26789'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026790IFS=" "" $as_nl"
26791
26792# Find who we are. Look in the path if we contain no directory separator.
26793case $0 in
26794 *[\\/]* ) as_myself=$0 ;;
26795 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026796for as_dir in $PATH
26797do
26798 IFS=$as_save_IFS
26799 test -z "$as_dir" && as_dir=.
26800 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26801done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026802IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026804 ;;
26805esac
26806# We did not find ourselves, most probably we were run as `sh COMMAND'
26807# in which case we are not to be found in the path.
26808if test "x$as_myself" = x; then
26809 as_myself=$0
26810fi
26811if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026812 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026813 { (exit 1); exit 1; }
26814fi
26815
26816# Work around bugs in pre-3.0 UWIN ksh.
26817for as_var in ENV MAIL MAILPATH
26818do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26819done
26820PS1='$ '
26821PS2='> '
26822PS4='+ '
26823
26824# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026825for as_var in \
26826 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26827 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26828 LC_TELEPHONE LC_TIME
26829do
26830 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26831 eval $as_var=C; export $as_var
26832 else
26833 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26834 fi
26835done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026836
26837# Required to use basename.
26838if expr a : '\(a\)' >/dev/null 2>&1 &&
26839 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26840 as_expr=expr
26841else
26842 as_expr=false
26843fi
26844
26845if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26846 as_basename=basename
26847else
26848 as_basename=false
26849fi
26850
26851
26852# Name of the executable.
26853as_me=`$as_basename -- "$0" ||
26854$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26855 X"$0" : 'X\(//\)$' \| \
26856 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026857echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026858 sed '/^.*\/\([^/][^/]*\)\/*$/{
26859 s//\1/
26860 q
26861 }
26862 /^X\/\(\/\/\)$/{
26863 s//\1/
26864 q
26865 }
26866 /^X\/\(\/\).*/{
26867 s//\1/
26868 q
26869 }
26870 s/.*/./; q'`
26871
26872# CDPATH.
26873$as_unset CDPATH
26874
26875
26876
Martin v. Löwis11437992002-04-12 09:54:03 +000026877 as_lineno_1=$LINENO
26878 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026879 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026880 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026881
Martin v. Löwis11437992002-04-12 09:54:03 +000026882 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26883 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026884 # line-number line after each line using $LINENO; the second 'sed'
26885 # does the real work. The second script uses 'N' to pair each
26886 # line-number line with the line containing $LINENO, and appends
26887 # trailing '-' during substitution so that $LINENO is not a special
26888 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026889 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026890 # scripts with optimization help from Paolo Bonzini. Blame Lee
26891 # E. McMahon (1931-1989) for sed's syntax. :-)
26892 sed -n '
26893 p
26894 /[$]LINENO/=
26895 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000026896 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026897 s/[$]LINENO.*/&-/
26898 t lineno
26899 b
26900 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000026901 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026902 :loop
26903 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000026904 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026905 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000026906 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026907 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026908 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026909 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026910
Martin v. Löwis11437992002-04-12 09:54:03 +000026911 # Don't try to exec as it changes $[0], causing all sort of problems
26912 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026913 # original and so on. Autoconf is especially sensitive to this).
26914 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000026915 # Exit status is that of the last command.
26916 exit
26917}
26918
26919
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026920if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26921 as_dirname=dirname
26922else
26923 as_dirname=false
26924fi
26925
26926ECHO_C= ECHO_N= ECHO_T=
26927case `echo -n x` in
26928-n*)
26929 case `echo 'x\c'` in
26930 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26931 *) ECHO_C='\c';;
26932 esac;;
26933*)
26934 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000026935esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026937if expr a : '\(a\)' >/dev/null 2>&1 &&
26938 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026939 as_expr=expr
26940else
26941 as_expr=false
26942fi
26943
26944rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026945if test -d conf$$.dir; then
26946 rm -f conf$$.dir/conf$$.file
26947else
26948 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026949 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026950fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026951echo >conf$$.file
26952if ln -s conf$$.file conf$$ 2>/dev/null; then
26953 as_ln_s='ln -s'
26954 # ... but there are two gotchas:
26955 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26956 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26957 # In both cases, we have to default to `cp -p'.
26958 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026959 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026960elif ln conf$$.file conf$$ 2>/dev/null; then
26961 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000026962else
26963 as_ln_s='cp -p'
26964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026965rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26966rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000026967
Skip Montanaro6dead952003-09-25 14:50:04 +000026968if mkdir -p . 2>/dev/null; then
26969 as_mkdir_p=:
26970else
Skip Montanarof0d5f792004-08-15 14:08:23 +000026971 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000026972 as_mkdir_p=false
26973fi
26974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026975if test -x / >/dev/null 2>&1; then
26976 as_test_x='test -x'
26977else
26978 if ls -dL / >/dev/null 2>&1; then
26979 as_ls_L_option=L
26980 else
26981 as_ls_L_option=
26982 fi
26983 as_test_x='
26984 eval sh -c '\''
26985 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026986 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026987 else
26988 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026989 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026990 esac;
26991 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
26992 ???[sx]*):;;*)false;;esac;fi
26993 '\'' sh
26994 '
26995fi
26996as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000026997
26998# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026999as_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 +000027000
27001# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027002as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027003
27004
Martin v. Löwis11437992002-04-12 09:54:03 +000027005exec 6>&1
27006
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027007# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027008# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027009# values after options handling.
27010ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027011This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027012generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027013
27014 CONFIG_FILES = $CONFIG_FILES
27015 CONFIG_HEADERS = $CONFIG_HEADERS
27016 CONFIG_LINKS = $CONFIG_LINKS
27017 CONFIG_COMMANDS = $CONFIG_COMMANDS
27018 $ $0 $@
27019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027020on `(hostname || uname -n) 2>/dev/null | sed 1q`
27021"
27022
Martin v. Löwis11437992002-04-12 09:54:03 +000027023_ACEOF
27024
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027025cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027026# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027027config_files="$ac_config_files"
27028config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027030_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027031
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027032cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027033ac_cs_usage="\
27034\`$as_me' instantiates files from templates according to the
27035current configuration.
27036
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027037Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027038
27039 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027040 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027041 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027042 -d, --debug don't remove temporary files
27043 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027044 --file=FILE[:TEMPLATE]
27045 instantiate the configuration file FILE
27046 --header=FILE[:TEMPLATE]
27047 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027048
27049Configuration files:
27050$config_files
27051
27052Configuration headers:
27053$config_headers
27054
27055Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027057_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027058cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027059ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027060python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027061configured by $0, generated by GNU Autoconf 2.61,
27062 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027063
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027064Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027065This config.status script is free software; the Free Software Foundation
27066gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027067
27068ac_pwd='$ac_pwd'
27069srcdir='$srcdir'
27070INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027071_ACEOF
27072
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027073cat >>$CONFIG_STATUS <<\_ACEOF
27074# If no file are specified by the user, then we need to provide default
27075# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027076ac_need_defaults=:
27077while test $# != 0
27078do
27079 case $1 in
27080 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027081 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27082 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027083 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027084 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027085 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027086 ac_option=$1
27087 ac_optarg=$2
27088 ac_shift=shift
27089 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027090 esac
27091
Skip Montanaro6dead952003-09-25 14:50:04 +000027092 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027093 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027094 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27095 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027096 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027097 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027098 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027099 debug=: ;;
27100 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027101 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027102 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027103 ac_need_defaults=false;;
27104 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027105 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027106 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027107 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027108 --he | --h)
27109 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027110 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027111Try \`$0 --help' for more information." >&2
27112 { (exit 1); exit 1; }; };;
27113 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027114 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027115 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27116 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27117 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027118
27119 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027120 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027121Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027122 { (exit 1); exit 1; }; } ;;
27123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027124 *) ac_config_targets="$ac_config_targets $1"
27125 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027126
27127 esac
27128 shift
27129done
27130
Skip Montanaro6dead952003-09-25 14:50:04 +000027131ac_configure_extra_args=
27132
27133if $ac_cs_silent; then
27134 exec 6>/dev/null
27135 ac_configure_extra_args="$ac_configure_extra_args --silent"
27136fi
27137
27138_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027139cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027140if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027141 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27142 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027143 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027144 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027145fi
27146
Martin v. Löwis11437992002-04-12 09:54:03 +000027147_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027148cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027149exec 5>>config.log
27150{
27151 echo
27152 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27153## Running $as_me. ##
27154_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027155 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027156} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027158_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027159cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027160_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027161
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027162cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027163
27164# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027165for ac_config_target in $ac_config_targets
27166do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027167 case $ac_config_target in
27168 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27169 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27170 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027171 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27172 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027173 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27174 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027175 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027176
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027177 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27178echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027179 { (exit 1); exit 1; }; };;
27180 esac
27181done
27182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027183
Martin v. Löwis11437992002-04-12 09:54:03 +000027184# If the user did not use the arguments to specify the items to instantiate,
27185# then the envvar interface is used. Set only those that are not.
27186# We use the long form for the default assignment because of an extremely
27187# bizarre bug on SunOS 4.1.3.
27188if $ac_need_defaults; then
27189 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27190 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27191fi
27192
Skip Montanaro6dead952003-09-25 14:50:04 +000027193# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027194# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027195# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027196# Hook for its removal unless debugging.
27197# Note that there is a small window in which the directory will not be cleaned:
27198# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027199$debug ||
27200{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027201 tmp=
27202 trap 'exit_status=$?
27203 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27204' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027205 trap '{ (exit 1); exit 1; }' 1 2 13 15
27206}
Martin v. Löwis11437992002-04-12 09:54:03 +000027207# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027208
Martin v. Löwis11437992002-04-12 09:54:03 +000027209{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027210 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027211 test -n "$tmp" && test -d "$tmp"
27212} ||
27213{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027214 tmp=./conf$$-$RANDOM
27215 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027216} ||
27217{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027218 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027219 { (exit 1); exit 1; }
27220}
27221
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027222#
27223# Set up the sed scripts for CONFIG_FILES section.
27224#
27225
27226# No need to generate the scripts if there are no CONFIG_FILES.
27227# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027228if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027229
27230_ACEOF
27231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027232
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027233
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027234ac_delim='%!_!# '
27235for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027236 cat >conf$$subs.sed <<_ACEOF
27237SHELL!$SHELL$ac_delim
27238PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27239PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27240PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27241PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27242PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27243PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27244exec_prefix!$exec_prefix$ac_delim
27245prefix!$prefix$ac_delim
27246program_transform_name!$program_transform_name$ac_delim
27247bindir!$bindir$ac_delim
27248sbindir!$sbindir$ac_delim
27249libexecdir!$libexecdir$ac_delim
27250datarootdir!$datarootdir$ac_delim
27251datadir!$datadir$ac_delim
27252sysconfdir!$sysconfdir$ac_delim
27253sharedstatedir!$sharedstatedir$ac_delim
27254localstatedir!$localstatedir$ac_delim
27255includedir!$includedir$ac_delim
27256oldincludedir!$oldincludedir$ac_delim
27257docdir!$docdir$ac_delim
27258infodir!$infodir$ac_delim
27259htmldir!$htmldir$ac_delim
27260dvidir!$dvidir$ac_delim
27261pdfdir!$pdfdir$ac_delim
27262psdir!$psdir$ac_delim
27263libdir!$libdir$ac_delim
27264localedir!$localedir$ac_delim
27265mandir!$mandir$ac_delim
27266DEFS!$DEFS$ac_delim
27267ECHO_C!$ECHO_C$ac_delim
27268ECHO_N!$ECHO_N$ac_delim
27269ECHO_T!$ECHO_T$ac_delim
27270LIBS!$LIBS$ac_delim
27271build_alias!$build_alias$ac_delim
27272host_alias!$host_alias$ac_delim
27273target_alias!$target_alias$ac_delim
27274VERSION!$VERSION$ac_delim
27275SOVERSION!$SOVERSION$ac_delim
27276CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27277UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27278ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
27279PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27280PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27281PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27282PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27283PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27284FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27285FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27286FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27287FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27288FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27289MACHDEP!$MACHDEP$ac_delim
27290SGI_ABI!$SGI_ABI$ac_delim
27291CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27292EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27293CC!$CC$ac_delim
27294CFLAGS!$CFLAGS$ac_delim
27295LDFLAGS!$LDFLAGS$ac_delim
27296CPPFLAGS!$CPPFLAGS$ac_delim
27297ac_ct_CC!$ac_ct_CC$ac_delim
27298EXEEXT!$EXEEXT$ac_delim
27299OBJEXT!$OBJEXT$ac_delim
27300CXX!$CXX$ac_delim
27301MAINCC!$MAINCC$ac_delim
27302CPP!$CPP$ac_delim
27303GREP!$GREP$ac_delim
27304EGREP!$EGREP$ac_delim
27305BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27306LIBRARY!$LIBRARY$ac_delim
27307LDLIBRARY!$LDLIBRARY$ac_delim
27308DLLLIBRARY!$DLLLIBRARY$ac_delim
27309BLDLIBRARY!$BLDLIBRARY$ac_delim
27310LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27311INSTSONAME!$INSTSONAME$ac_delim
27312RUNSHARED!$RUNSHARED$ac_delim
27313LINKCC!$LINKCC$ac_delim
27314GNULD!$GNULD$ac_delim
27315RANLIB!$RANLIB$ac_delim
27316AR!$AR$ac_delim
27317ARFLAGS!$ARFLAGS$ac_delim
27318SVNVERSION!$SVNVERSION$ac_delim
27319INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27320INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27321INSTALL_DATA!$INSTALL_DATA$ac_delim
27322LN!$LN$ac_delim
27323OPT!$OPT$ac_delim
27324BASECFLAGS!$BASECFLAGS$ac_delim
27325UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27326OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27327LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27328SO!$SO$ac_delim
27329LDSHARED!$LDSHARED$ac_delim
27330BLDSHARED!$BLDSHARED$ac_delim
27331CCSHARED!$CCSHARED$ac_delim
27332LINKFORSHARED!$LINKFORSHARED$ac_delim
27333CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
27334_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027335
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027336 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027337 break
27338 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027339 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27340echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027341 { (exit 1); exit 1; }; }
27342 else
27343 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027344 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027345done
27346
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027347ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27348if test -n "$ac_eof"; then
27349 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27350 ac_eof=`expr $ac_eof + 1`
27351fi
27352
27353cat >>$CONFIG_STATUS <<_ACEOF
27354cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27355/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027356_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027357sed '
27358s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27359s/^/s,@/; s/!/@,|#_!!_#|/
27360:n
27361t n
27362s/'"$ac_delim"'$/,g/; t
27363s/$/\\/; p
27364N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27365' >>$CONFIG_STATUS <conf$$subs.sed
27366rm -f conf$$subs.sed
27367cat >>$CONFIG_STATUS <<_ACEOF
27368CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027369_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027370
27371
27372ac_delim='%!_!# '
27373for ac_last_try in false false false false false :; do
27374 cat >conf$$subs.sed <<_ACEOF
27375SHLIBS!$SHLIBS$ac_delim
27376USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27377SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27378USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27379LDLAST!$LDLAST$ac_delim
27380THREADOBJ!$THREADOBJ$ac_delim
27381DLINCLDIR!$DLINCLDIR$ac_delim
27382DYNLOADFILE!$DYNLOADFILE$ac_delim
27383MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27384TRUE!$TRUE$ac_delim
27385LIBOBJS!$LIBOBJS$ac_delim
27386HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27387HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27388HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27389HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27390HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27391LIBM!$LIBM$ac_delim
27392LIBC!$LIBC$ac_delim
27393THREADHEADERS!$THREADHEADERS$ac_delim
27394SRCDIRS!$SRCDIRS$ac_delim
27395LTLIBOBJS!$LTLIBOBJS$ac_delim
27396_ACEOF
27397
27398 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
27399 break
27400 elif $ac_last_try; then
27401 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27402echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027403 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027404 else
27405 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27406 fi
27407done
27408
27409ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27410if test -n "$ac_eof"; then
27411 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27412 ac_eof=`expr $ac_eof + 1`
27413fi
27414
27415cat >>$CONFIG_STATUS <<_ACEOF
27416cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27417/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027418_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027419sed '
27420s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27421s/^/s,@/; s/!/@,|#_!!_#|/
27422:n
27423t n
27424s/'"$ac_delim"'$/,g/; t
27425s/$/\\/; p
27426N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27427' >>$CONFIG_STATUS <conf$$subs.sed
27428rm -f conf$$subs.sed
27429cat >>$CONFIG_STATUS <<_ACEOF
27430:end
27431s/|#_!!_#|//g
27432CEOF$ac_eof
27433_ACEOF
27434
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027435
27436# VPATH may cause trouble with some makes, so we remove $(srcdir),
27437# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27438# trailing colons and then remove the whole line if VPATH becomes empty
27439# (actually we leave an empty line to preserve line numbers).
27440if test "x$srcdir" = x.; then
27441 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27442s/:*\$(srcdir):*/:/
27443s/:*\${srcdir}:*/:/
27444s/:*@srcdir@:*/:/
27445s/^\([^=]*=[ ]*\):*/\1/
27446s/:*$//
27447s/^[^=]*=[ ]*$//
27448}'
27449fi
27450
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027451cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027452fi # test -n "$CONFIG_FILES"
27453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027454
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027455for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027456do
27457 case $ac_tag in
27458 :[FHLC]) ac_mode=$ac_tag; continue;;
27459 esac
27460 case $ac_mode$ac_tag in
27461 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027462 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27463echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027464 { (exit 1); exit 1; }; };;
27465 :[FH]-) ac_tag=-:-;;
27466 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27467 esac
27468 ac_save_IFS=$IFS
27469 IFS=:
27470 set x $ac_tag
27471 IFS=$ac_save_IFS
27472 shift
27473 ac_file=$1
27474 shift
27475
27476 case $ac_mode in
27477 :L) ac_source=$1;;
27478 :[FH])
27479 ac_file_inputs=
27480 for ac_f
27481 do
27482 case $ac_f in
27483 -) ac_f="$tmp/stdin";;
27484 *) # Look for the file first in the build tree, then in the source tree
27485 # (if the path is not absolute). The absolute path cannot be DOS-style,
27486 # because $ac_f cannot contain `:'.
27487 test -f "$ac_f" ||
27488 case $ac_f in
27489 [\\/$]*) false;;
27490 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27491 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027492 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27493echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027494 { (exit 1); exit 1; }; };;
27495 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027496 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027497 done
27498
27499 # Let's still pretend it is `configure' which instantiates (i.e., don't
27500 # use $as_me), people would be surprised to read:
27501 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027502 configure_input="Generated from "`IFS=:
27503 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027504 if test x"$ac_file" != x-; then
27505 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027506 { echo "$as_me:$LINENO: creating $ac_file" >&5
27507echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027508 fi
27509
27510 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027511 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027512 esac
27513 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027514 esac
27515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027516 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027517$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027518 X"$ac_file" : 'X\(//\)[^/]' \| \
27519 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027520 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027521echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027522 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27523 s//\1/
27524 q
27525 }
27526 /^X\(\/\/\)[^/].*/{
27527 s//\1/
27528 q
27529 }
27530 /^X\(\/\/\)$/{
27531 s//\1/
27532 q
27533 }
27534 /^X\(\/\).*/{
27535 s//\1/
27536 q
27537 }
27538 s/.*/./; q'`
27539 { as_dir="$ac_dir"
27540 case $as_dir in #(
27541 -*) as_dir=./$as_dir;;
27542 esac
27543 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027544 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027545 while :; do
27546 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027547 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027548 *) as_qdir=$as_dir;;
27549 esac
27550 as_dirs="'$as_qdir' $as_dirs"
27551 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027552$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027553 X"$as_dir" : 'X\(//\)[^/]' \| \
27554 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027555 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027556echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027557 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27558 s//\1/
27559 q
27560 }
27561 /^X\(\/\/\)[^/].*/{
27562 s//\1/
27563 q
27564 }
27565 /^X\(\/\/\)$/{
27566 s//\1/
27567 q
27568 }
27569 /^X\(\/\).*/{
27570 s//\1/
27571 q
27572 }
27573 s/.*/./; q'`
27574 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027575 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027576 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027577 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27578echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027579 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027580 ac_builddir=.
27581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027582case "$ac_dir" in
27583.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27584*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027585 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027586 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027587 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027588 case $ac_top_builddir_sub in
27589 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27590 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27591 esac ;;
27592esac
27593ac_abs_top_builddir=$ac_pwd
27594ac_abs_builddir=$ac_pwd$ac_dir_suffix
27595# for backward compatibility:
27596ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027597
27598case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027599 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027600 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027601 ac_top_srcdir=$ac_top_builddir_sub
27602 ac_abs_top_srcdir=$ac_pwd ;;
27603 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027604 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027605 ac_top_srcdir=$srcdir
27606 ac_abs_top_srcdir=$srcdir ;;
27607 *) # Relative name.
27608 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27609 ac_top_srcdir=$ac_top_build_prefix$srcdir
27610 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027611esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027612ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027613
Martin v. Löwis11437992002-04-12 09:54:03 +000027614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027615 case $ac_mode in
27616 :F)
27617 #
27618 # CONFIG_FILE
27619 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027620
27621 case $INSTALL in
27622 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027623 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027624 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000027625_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027626
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027627cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027628# If the template does not know about datarootdir, expand it.
27629# FIXME: This hack should be removed a few years after 2.60.
27630ac_datarootdir_hack=; ac_datarootdir_seen=
27631
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027632case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027633 p
27634 q
27635}
27636/@datadir@/p
27637/@docdir@/p
27638/@infodir@/p
27639/@localedir@/p
27640/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027641' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027642*datarootdir*) ac_datarootdir_seen=yes;;
27643*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027644 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27645echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027646_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027647cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027648 ac_datarootdir_hack='
27649 s&@datadir@&$datadir&g
27650 s&@docdir@&$docdir&g
27651 s&@infodir@&$infodir&g
27652 s&@localedir@&$localedir&g
27653 s&@mandir@&$mandir&g
27654 s&\\\${datarootdir}&$datarootdir&g' ;;
27655esac
27656_ACEOF
27657
27658# Neutralize VPATH when `$srcdir' = `.'.
27659# Shell code in configure.ac might set extrasub.
27660# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027661cat >>$CONFIG_STATUS <<_ACEOF
27662 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000027663$extrasub
27664_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027665cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027666:t
27667/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027668s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027669s&@top_builddir@&$ac_top_builddir_sub&;t t
27670s&@srcdir@&$ac_srcdir&;t t
27671s&@abs_srcdir@&$ac_abs_srcdir&;t t
27672s&@top_srcdir@&$ac_top_srcdir&;t t
27673s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27674s&@builddir@&$ac_builddir&;t t
27675s&@abs_builddir@&$ac_abs_builddir&;t t
27676s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27677s&@INSTALL@&$ac_INSTALL&;t t
27678$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027679" $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 +000027680
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027681test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27682 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27683 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027684 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027685which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027686echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027687which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027688
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027689 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027690 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027691 -) cat "$tmp/out"; rm -f "$tmp/out";;
27692 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
27693 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027694 ;;
27695 :H)
27696 #
27697 # CONFIG_HEADER
27698 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027699_ACEOF
27700
27701# Transform confdefs.h into a sed script `conftest.defines', that
27702# substitutes the proper values into config.h.in to produce config.h.
27703rm -f conftest.defines conftest.tail
27704# First, append a space to every undef/define line, to ease matching.
27705echo 's/$/ /' >conftest.defines
27706# Then, protect against being on the right side of a sed subst, or in
27707# an unquoted here document, in config.status. If some macros were
27708# called several times there might be several #defines for the same
27709# symbol, which is useless. But do not sort them, since the last
27710# AC_DEFINE must be honored.
27711ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27712# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
27713# NAME is the cpp macro being defined, VALUE is the value it is being given.
27714# PARAMS is the parameter list in the macro definition--in most cases, it's
27715# just an empty string.
27716ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
27717ac_dB='\\)[ (].*,\\1define\\2'
27718ac_dC=' '
27719ac_dD=' ,'
27720
27721uniq confdefs.h |
27722 sed -n '
27723 t rset
27724 :rset
27725 s/^[ ]*#[ ]*define[ ][ ]*//
27726 t ok
27727 d
27728 :ok
27729 s/[\\&,]/\\&/g
27730 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27731 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27732 ' >>conftest.defines
27733
27734# Remove the space that was appended to ease matching.
27735# Then replace #undef with comments. This is necessary, for
27736# example, in the case of _POSIX_SOURCE, which is predefined and required
27737# on some systems where configure will not decide to define it.
27738# (The regexp can be short, since the line contains either #define or #undef.)
27739echo 's/ $//
27740s,^[ #]*u.*,/* & */,' >>conftest.defines
27741
27742# Break up conftest.defines:
27743ac_max_sed_lines=50
27744
27745# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27746# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27747# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27748# et cetera.
27749ac_in='$ac_file_inputs'
27750ac_out='"$tmp/out1"'
27751ac_nxt='"$tmp/out2"'
27752
27753while :
27754do
27755 # Write a here document:
27756 cat >>$CONFIG_STATUS <<_ACEOF
27757 # First, check the format of the line:
27758 cat >"\$tmp/defines.sed" <<\\CEOF
27759/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27760/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
27761b
27762:def
27763_ACEOF
27764 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27765 echo 'CEOF
27766 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27767 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27768 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27769 grep . conftest.tail >/dev/null || break
27770 rm -f conftest.defines
27771 mv conftest.tail conftest.defines
27772done
27773rm -f conftest.defines conftest.tail
27774
27775echo "ac_result=$ac_in" >>$CONFIG_STATUS
27776cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027777 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027778 echo "/* $configure_input */" >"$tmp/config.h"
27779 cat "$ac_result" >>"$tmp/config.h"
27780 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27781 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27782echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027783 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027784 rm -f $ac_file
27785 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027786 fi
27787 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027788 echo "/* $configure_input */"
27789 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027790 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027791 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027792 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027794
27795 esac
27796
27797done # for ac_tag
27798
Guido van Rossum627b2d71993-12-24 10:39:16 +000027799
Martin v. Löwis11437992002-04-12 09:54:03 +000027800{ (exit 0); exit 0; }
27801_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027802chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027803ac_clean_files=$ac_clean_files_save
27804
27805
27806# configure is writing to config.log, and then calls config.status.
27807# config.status does its own redirection, appending to config.log.
27808# Unfortunately, on DOS this fails, as config.log is still kept open
27809# by configure, so config.status won't be able to write to it; its
27810# output is simply discarded. So we exec the FD to /dev/null,
27811# effectively closing config.log, so it can be properly (re)opened and
27812# appended to by config.status. When coming back to configure, we
27813# need to make the FD available again.
27814if test "$no_create" != yes; then
27815 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027816 ac_config_status_args=
27817 test "$silent" = yes &&
27818 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027819 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027820 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027821 exec 5>>config.log
27822 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27823 # would make configure fail if this is the last instruction.
27824 $ac_cs_success || { (exit 1); exit 1; }
27825fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027826
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027827
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027828echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027829if test ! -f Modules/Setup
27830then
27831 cp $srcdir/Modules/Setup.dist Modules/Setup
27832fi
27833
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027834echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027835if test ! -f Modules/Setup.local
27836then
27837 echo "# Edit this file for local setup changes" >Modules/Setup.local
27838fi
27839
27840echo "creating Makefile"
27841$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27842 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027843 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027844mv config.c Modules