blob: 3b830ba05a1c2ea4254cd419e0a82557ce07141f [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klosec80c93f2010-04-24 17:04:35 +00002# From configure.in Revision: 80276 .
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
Ronald Oussoren6f6c5622009-12-24 14:03:19 +0000661LIPO_32BIT_FLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000662PYTHONFRAMEWORK
663PYTHONFRAMEWORKIDENTIFIER
664PYTHONFRAMEWORKDIR
665PYTHONFRAMEWORKPREFIX
666PYTHONFRAMEWORKINSTALLDIR
667FRAMEWORKINSTALLFIRST
668FRAMEWORKINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKALTINSTALLLAST
671FRAMEWORKUNIXTOOLSPREFIX
672MACHDEP
673SGI_ABI
674CONFIGURE_MACOSX_DEPLOYMENT_TARGET
675EXPORT_MACOSX_DEPLOYMENT_TARGET
676CC
677CFLAGS
678LDFLAGS
679CPPFLAGS
680ac_ct_CC
681EXEEXT
682OBJEXT
683CXX
684MAINCC
685CPP
686GREP
687EGREP
688BUILDEXEEXT
689LIBRARY
690LDLIBRARY
691DLLLIBRARY
692BLDLIBRARY
693LDLIBRARYDIR
694INSTSONAME
695RUNSHARED
696LINKCC
697GNULD
698RANLIB
699AR
700ARFLAGS
701SVNVERSION
702INSTALL_PROGRAM
703INSTALL_SCRIPT
704INSTALL_DATA
705LN
706OPT
707BASECFLAGS
708UNIVERSAL_ARCH_FLAGS
709OTHER_LIBTOOL_OPT
710LIBTOOL_CRUFT
711SO
712LDSHARED
Benjamin Peterson99f03762010-04-11 22:15:28 +0000713LDCXXSHARED
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000714BLDSHARED
715CCSHARED
716LINKFORSHARED
717CFLAGSFORSHARED
718SHLIBS
Benjamin Petersond78735d2010-01-01 16:04:23 +0000719PKG_CONFIG
720LIBFFI_INCLUDEDIR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000721USE_SIGNAL_MODULE
722SIGNAL_OBJS
723USE_THREAD_MODULE
724LDLAST
725THREADOBJ
726DLINCLDIR
727DYNLOADFILE
728MACHDEP_OBJS
729TRUE
730LIBOBJS
731HAVE_GETHOSTBYNAME_R_6_ARG
732HAVE_GETHOSTBYNAME_R_5_ARG
733HAVE_GETHOSTBYNAME_R_3_ARG
734HAVE_GETHOSTBYNAME_R
735HAVE_GETHOSTBYNAME
736LIBM
737LIBC
738THREADHEADERS
739SRCDIRS
740LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000741ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000742 ac_precious_vars='build_alias
743host_alias
744target_alias
745CC
746CFLAGS
747LDFLAGS
748LIBS
749CPPFLAGS
750CPP'
751
Guido van Rossum627b2d71993-12-24 10:39:16 +0000752
Guido van Rossum7f43da71994-08-01 12:15:30 +0000753# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000754ac_init_help=
755ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756# The variables have the same names as the options, with
757# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000758cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000759exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000760no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000761no_recursion=
762prefix=NONE
763program_prefix=NONE
764program_suffix=NONE
765program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000767site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000769verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000770x_includes=NONE
771x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000772
773# Installation directory options.
774# These are left unexpanded so users can "make install exec_prefix=/foo"
775# and all the variables that are supposed to be based on exec_prefix
776# by default will actually change.
777# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000778# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000779bindir='${exec_prefix}/bin'
780sbindir='${exec_prefix}/sbin'
781libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000782datarootdir='${prefix}/share'
783datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000784sysconfdir='${prefix}/etc'
785sharedstatedir='${prefix}/com'
786localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000787includedir='${prefix}/include'
788oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000789docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
790infodir='${datarootdir}/info'
791htmldir='${docdir}'
792dvidir='${docdir}'
793pdfdir='${docdir}'
794psdir='${docdir}'
795libdir='${exec_prefix}/lib'
796localedir='${datarootdir}/locale'
797mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000798
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000800ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000802do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803 # If the previous option needs an argument, assign it.
804 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000805 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806 ac_prev=
807 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000808 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000810 case $ac_option in
811 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
812 *) ac_optarg=yes ;;
813 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815 # Accept the important Cygnus configure options, so we can diagnose typos.
816
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000817 case $ac_dashdash$ac_option in
818 --)
819 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821 -bindir | --bindir | --bindi | --bind | --bin | --bi)
822 ac_prev=bindir ;;
823 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000824 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825
826 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000827 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000828 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000829 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831 -cache-file | --cache-file | --cache-fil | --cache-fi \
832 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
833 ac_prev=cache_file ;;
834 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
835 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000836 cache_file=$ac_optarg ;;
837
838 --config-cache | -C)
839 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000844 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
847 | --dataroo | --dataro | --datar)
848 ac_prev=datarootdir ;;
849 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
850 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
851 datarootdir=$ac_optarg ;;
852
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853 -disable-* | --disable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000854 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000856 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
857 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000858 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000859 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
860 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861
862 -docdir | --docdir | --docdi | --doc | --do)
863 ac_prev=docdir ;;
864 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
865 docdir=$ac_optarg ;;
866
867 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
868 ac_prev=dvidir ;;
869 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
870 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871
872 -enable-* | --enable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000873 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000875 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
876 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000877 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000878 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
879 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
882 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
883 | --exec | --exe | --ex)
884 ac_prev=exec_prefix ;;
885 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
886 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
887 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000888 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
890 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000891 # Obsolete; use --with-gas.
892 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
Martin v. Löwis11437992002-04-12 09:54:03 +0000894 -help | --help | --hel | --he | -h)
895 ac_init_help=long ;;
896 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
897 ac_init_help=recursive ;;
898 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
899 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
901 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000902 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000904 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
907 ac_prev=htmldir ;;
908 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
909 | --ht=*)
910 htmldir=$ac_optarg ;;
911
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912 -includedir | --includedir | --includedi | --included | --include \
913 | --includ | --inclu | --incl | --inc)
914 ac_prev=includedir ;;
915 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
916 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918
919 -infodir | --infodir | --infodi | --infod | --info | --inf)
920 ac_prev=infodir ;;
921 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000923
924 -libdir | --libdir | --libdi | --libd)
925 ac_prev=libdir ;;
926 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928
929 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
930 | --libexe | --libex | --libe)
931 ac_prev=libexecdir ;;
932 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
933 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000936 -localedir | --localedir | --localedi | --localed | --locale)
937 ac_prev=localedir ;;
938 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
939 localedir=$ac_optarg ;;
940
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000942 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 ac_prev=localstatedir ;;
944 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947
948 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
949 ac_prev=mandir ;;
950 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954 # Obsolete; use --without-fp.
955 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956
957 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959 no_create=yes ;;
960
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
962 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
963 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000965 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
966 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
967 | --oldin | --oldi | --old | --ol | --o)
968 ac_prev=oldincludedir ;;
969 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
970 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
971 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000973
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
975 ac_prev=prefix ;;
976 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978
979 -program-prefix | --program-prefix | --program-prefi | --program-pref \
980 | --program-pre | --program-pr | --program-p)
981 ac_prev=program_prefix ;;
982 -program-prefix=* | --program-prefix=* | --program-prefi=* \
983 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000984 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985
986 -program-suffix | --program-suffix | --program-suffi | --program-suff \
987 | --program-suf | --program-su | --program-s)
988 ac_prev=program_suffix ;;
989 -program-suffix=* | --program-suffix=* | --program-suffi=* \
990 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -program-transform-name | --program-transform-name \
994 | --program-transform-nam | --program-transform-na \
995 | --program-transform-n | --program-transform- \
996 | --program-transform | --program-transfor \
997 | --program-transfo | --program-transf \
998 | --program-trans | --program-tran \
999 | --progr-tra | --program-tr | --program-t)
1000 ac_prev=program_transform_name ;;
1001 -program-transform-name=* | --program-transform-name=* \
1002 | --program-transform-nam=* | --program-transform-na=* \
1003 | --program-transform-n=* | --program-transform-=* \
1004 | --program-transform=* | --program-transfor=* \
1005 | --program-transfo=* | --program-transf=* \
1006 | --program-trans=* | --program-tran=* \
1007 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001010 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1011 ac_prev=pdfdir ;;
1012 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1013 pdfdir=$ac_optarg ;;
1014
1015 -psdir | --psdir | --psdi | --psd | --ps)
1016 ac_prev=psdir ;;
1017 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1018 psdir=$ac_optarg ;;
1019
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1021 | -silent | --silent | --silen | --sile | --sil)
1022 silent=yes ;;
1023
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1025 ac_prev=sbindir ;;
1026 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1027 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029
1030 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1031 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1032 | --sharedst | --shareds | --shared | --share | --shar \
1033 | --sha | --sh)
1034 ac_prev=sharedstatedir ;;
1035 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1036 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1037 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1038 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041 -site | --site | --sit)
1042 ac_prev=site ;;
1043 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001045
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1047 ac_prev=srcdir ;;
1048 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1052 | --syscon | --sysco | --sysc | --sys | --sy)
1053 ac_prev=sysconfdir ;;
1054 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1055 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1064 verbose=yes ;;
1065
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 -version | --version | --versio | --versi | --vers | -V)
1067 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068
1069 -with-* | --with-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001070 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001072 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1073 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001075 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1076 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
1078 -without-* | --without-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001079 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001081 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1082 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001084 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1085 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001087 --x)
1088 # Obsolete; use --with-x.
1089 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
1091 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1092 | --x-incl | --x-inc | --x-in | --x-i)
1093 ac_prev=x_includes ;;
1094 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1095 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1099 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1100 ac_prev=x_libraries ;;
1101 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1102 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001105 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001106Try \`$0 --help' for more information." >&2
1107 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108 ;;
1109
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 *=*)
1111 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1112 # Reject names that are not valid shell variable names.
1113 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001114 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001116 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 export $ac_envvar ;;
1118
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001119 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001121 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001123 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125 ;;
1126
1127 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001128done
1129
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001132 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134fi
1135
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001136# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001137for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1138 datadir sysconfdir sharedstatedir localstatedir includedir \
1139 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1140 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001141do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001142 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001144 [\\/$]* | ?:[\\/]* ) continue;;
1145 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001147 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001148 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001149done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001150
Martin v. Löwis11437992002-04-12 09:54:03 +00001151# There might be people who depend on the old broken behavior: `$host'
1152# used to hold the argument of --host etc.
1153# FIXME: To remove some day.
1154build=$build_alias
1155host=$host_alias
1156target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001157
Martin v. Löwis11437992002-04-12 09:54:03 +00001158# FIXME: To remove some day.
1159if test "x$host_alias" != x; then
1160 if test "x$build_alias" = x; then
1161 cross_compiling=maybe
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001162 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 +00001163 If a cross compiler is detected then cross compile mode will be used." >&2
1164 elif test "x$build_alias" != "x$host_alias"; then
1165 cross_compiling=yes
1166 fi
1167fi
1168
1169ac_tool_prefix=
1170test -n "$host_alias" && ac_tool_prefix=$host_alias-
1171
1172test "$silent" = yes && exec 6>/dev/null
1173
Guido van Rossum627b2d71993-12-24 10:39:16 +00001174
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001175ac_pwd=`pwd` && test -n "$ac_pwd" &&
1176ac_ls_di=`ls -di .` &&
1177ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001178 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001179 { (exit 1); exit 1; }; }
1180test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001181 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001182 { (exit 1); exit 1; }; }
1183
1184
Guido van Rossum627b2d71993-12-24 10:39:16 +00001185# Find the source files, if location was not specified.
1186if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001188 # Try the directory containing this script, then the parent directory.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001189 ac_confdir=`$as_dirname -- "$0" ||
1190$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1191 X"$0" : 'X\(//\)[^/]' \| \
1192 X"$0" : 'X\(//\)$' \| \
1193 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1194echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001195 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1196 s//\1/
1197 q
1198 }
1199 /^X\(\/\/\)[^/].*/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\/\)$/{
1204 s//\1/
1205 q
1206 }
1207 /^X\(\/\).*/{
1208 s//\1/
1209 q
1210 }
1211 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001213 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214 srcdir=..
1215 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001216else
1217 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001219if test ! -r "$srcdir/$ac_unique_file"; then
1220 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001221 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001224ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1225ac_abs_confdir=`(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001226 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001227 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001228 pwd)`
1229# When building in place, set srcdir=.
1230if test "$ac_abs_confdir" = "$ac_pwd"; then
1231 srcdir=.
1232fi
1233# Remove unnecessary trailing slashes from srcdir.
1234# Double slashes in file names in object file debugging info
1235# mess up M-x gdb in Emacs.
1236case $srcdir in
1237*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1238esac
1239for ac_var in $ac_precious_vars; do
1240 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1241 eval ac_env_${ac_var}_value=\$${ac_var}
1242 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1243 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1244done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001245
Martin v. Löwis11437992002-04-12 09:54:03 +00001246#
1247# Report the --help message.
1248#
1249if test "$ac_init_help" = "long"; then
1250 # Omit some internal or obsolete options to make the list less imposing.
1251 # This message is too long to be a string in the A/UX 3.1 sh.
1252 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001253\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001254
1255Usage: $0 [OPTION]... [VAR=VALUE]...
1256
1257To assign environment variables (e.g., CC, CFLAGS...), specify them as
1258VAR=VALUE. See below for descriptions of some of the useful variables.
1259
1260Defaults for the options are specified in brackets.
1261
1262Configuration:
1263 -h, --help display this help and exit
1264 --help=short display options specific to this package
1265 --help=recursive display the short help of all the included packages
1266 -V, --version display version information and exit
1267 -q, --quiet, --silent do not print \`checking...' messages
1268 --cache-file=FILE cache test results in FILE [disabled]
1269 -C, --config-cache alias for \`--cache-file=config.cache'
1270 -n, --no-create do not create output files
1271 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1272
Martin v. Löwis11437992002-04-12 09:54:03 +00001273Installation directories:
1274 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001275 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001276 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001277 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001278
1279By default, \`make install' will install all the files in
1280\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1281an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1282for instance \`--prefix=\$HOME'.
1283
1284For better control, use the options below.
1285
1286Fine tuning of the installation directories:
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001287 --bindir=DIR user executables [EPREFIX/bin]
1288 --sbindir=DIR system admin executables [EPREFIX/sbin]
1289 --libexecdir=DIR program executables [EPREFIX/libexec]
1290 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1291 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1292 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1293 --libdir=DIR object code libraries [EPREFIX/lib]
1294 --includedir=DIR C header files [PREFIX/include]
1295 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1296 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1297 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1298 --infodir=DIR info documentation [DATAROOTDIR/info]
1299 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1300 --mandir=DIR man documentation [DATAROOTDIR/man]
1301 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1302 --htmldir=DIR html documentation [DOCDIR]
1303 --dvidir=DIR dvi documentation [DOCDIR]
1304 --pdfdir=DIR pdf documentation [DOCDIR]
1305 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001306_ACEOF
1307
1308 cat <<\_ACEOF
1309_ACEOF
1310fi
1311
1312if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001313 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001314 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001315 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001316 cat <<\_ACEOF
1317
1318Optional Features:
1319 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1320 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001321 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001322 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001323 --enable-framework[=INSTALLDIR]
1324 Build (MacOSX|Darwin) framework
1325 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001326 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001327 --enable-ipv6 Enable ipv6 (with ipv4) support
1328 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001329 --enable-big-digits[=BITS]
1330 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001331
1332Optional Packages:
1333 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1334 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001335 --with-universal-archs=ARCH
1336 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001337 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001338 --with-framework-name=FRAMEWORK
1339 specify an alternate name of the framework built
1340 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001341 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001342 --with-cxx-main=<compiler>
1343 compile main() and link python executable with C++
1344 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001345 --with-suffix=.exe set executable suffix
1346 --with-pydebug build with Py_DEBUG defined
1347 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001348 --with-system-expat build pyexpat module using an installed expat
1349 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001350 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001351 --with-dbmliborder=db1:db2:...
1352 order to check db backends for dbm. Valid value is a
1353 colon separated string with the backend names
1354 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001355 --with-signal-module disable/enable signal module
1356 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1357 --with(out)-threads[=DIRECTORY]
1358 disable/enable thread support
1359 --with(out)-thread[=DIRECTORY]
1360 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001361 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001362 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001363 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001364 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001365 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001366 --with-fpectl enable SIGFPE catching
1367 --with-libm=STRING math library
1368 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001369 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001370 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1371 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001372
1373Some influential environment variables:
1374 CC C compiler command
1375 CFLAGS C compiler flags
1376 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1377 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378 LIBS libraries to pass to the linker, e.g. -l<library>
1379 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1380 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001381 CPP C preprocessor
1382
1383Use these variables to override the choices made by `configure' or to help
1384it to find libraries and programs with nonstandard names/locations.
1385
Georg Brandle2e15612009-05-20 18:25:10 +00001386Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001387_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001388ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001389fi
1390
1391if test "$ac_init_help" = "recursive"; then
1392 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001393 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001394 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001395 ac_builddir=.
1396
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001397case "$ac_dir" in
1398.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1399*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001400 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001401 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001402 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001403 case $ac_top_builddir_sub in
1404 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1405 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1406 esac ;;
1407esac
1408ac_abs_top_builddir=$ac_pwd
1409ac_abs_builddir=$ac_pwd$ac_dir_suffix
1410# for backward compatibility:
1411ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001412
1413case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001414 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001415 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001416 ac_top_srcdir=$ac_top_builddir_sub
1417 ac_abs_top_srcdir=$ac_pwd ;;
1418 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001419 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001420 ac_top_srcdir=$srcdir
1421 ac_abs_top_srcdir=$srcdir ;;
1422 *) # Relative name.
1423 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1424 ac_top_srcdir=$ac_top_build_prefix$srcdir
1425 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001426esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001427ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001428
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001429 cd "$ac_dir" || { ac_status=$?; continue; }
1430 # Check for guested configure.
1431 if test -f "$ac_srcdir/configure.gnu"; then
1432 echo &&
1433 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1434 elif test -f "$ac_srcdir/configure"; then
1435 echo &&
1436 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001437 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001438 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001439 fi || ac_status=$?
1440 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001441 done
1442fi
1443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001444test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001445if $ac_init_version; then
1446 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001447python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001448generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001449
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001450Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014512002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001452This configure script is free software; the Free Software Foundation
1453gives unlimited permission to copy, distribute and modify it.
1454_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001455 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001457cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001458This file contains any messages produced by compilers while
1459running configure, to aid debugging if configure makes a mistake.
1460
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001461It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001462generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001463
1464 $ $0 $@
1465
1466_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001467exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001468{
1469cat <<_ASUNAME
1470## --------- ##
1471## Platform. ##
1472## --------- ##
1473
1474hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1475uname -m = `(uname -m) 2>/dev/null || echo unknown`
1476uname -r = `(uname -r) 2>/dev/null || echo unknown`
1477uname -s = `(uname -s) 2>/dev/null || echo unknown`
1478uname -v = `(uname -v) 2>/dev/null || echo unknown`
1479
1480/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1481/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1482
1483/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1484/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1485/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001486/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001487/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1488/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1489/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1490
1491_ASUNAME
1492
1493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1494for as_dir in $PATH
1495do
1496 IFS=$as_save_IFS
1497 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001498 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001499done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001500IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001501
1502} >&5
1503
1504cat >&5 <<_ACEOF
1505
1506
1507## ----------- ##
1508## Core tests. ##
1509## ----------- ##
1510
1511_ACEOF
1512
1513
1514# Keep a trace of the command line.
1515# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001516# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001517# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001518# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001519ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001520ac_configure_args0=
1521ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001522ac_must_keep_next=false
1523for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001524do
Skip Montanaro6dead952003-09-25 14:50:04 +00001525 for ac_arg
1526 do
1527 case $ac_arg in
1528 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1529 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1530 | -silent | --silent | --silen | --sile | --sil)
1531 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001532 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001533 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001534 esac
1535 case $ac_pass in
1536 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1537 2)
1538 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1539 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001540 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001541 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001542 case $ac_arg in
1543 *=* | --config-cache | -C | -disable-* | --disable-* \
1544 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1545 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1546 | -with-* | --with-* | -without-* | --without-* | --x)
1547 case "$ac_configure_args0 " in
1548 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1549 esac
1550 ;;
1551 -* ) ac_must_keep_next=true ;;
1552 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001553 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001554 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001555 ;;
1556 esac
1557 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001558done
Skip Montanaro6dead952003-09-25 14:50:04 +00001559$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1560$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 +00001561
1562# When interrupted or exit'd, cleanup temporary files, and complete
1563# config.log. We remove comments because anyway the quotes in there
1564# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001565# WARNING: Use '\'' to represent an apostrophe within the trap.
1566# 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 +00001567trap 'exit_status=$?
1568 # Save into config.log some information that might help in debugging.
1569 {
1570 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001571
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 cat <<\_ASBOX
1573## ---------------- ##
1574## Cache variables. ##
1575## ---------------- ##
1576_ASBOX
1577 echo
1578 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579(
1580 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1581 eval ac_val=\$$ac_var
1582 case $ac_val in #(
1583 *${as_nl}*)
1584 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001585 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1586echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001587 esac
1588 case $ac_var in #(
1589 _ | IFS | as_nl) ;; #(
1590 *) $as_unset $ac_var ;;
1591 esac ;;
1592 esac
1593 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1596 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001597 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 "s/'\''/'\''\\\\'\'''\''/g;
1599 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1600 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001601 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001603 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 esac |
1605 sort
1606)
Martin v. Löwis11437992002-04-12 09:54:03 +00001607 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001608
1609 cat <<\_ASBOX
1610## ----------------- ##
1611## Output variables. ##
1612## ----------------- ##
1613_ASBOX
1614 echo
1615 for ac_var in $ac_subst_vars
1616 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001617 eval ac_val=\$$ac_var
1618 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001619 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001620 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001621 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001622 done | sort
1623 echo
1624
1625 if test -n "$ac_subst_files"; then
1626 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627## ------------------- ##
1628## File substitutions. ##
1629## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001630_ASBOX
1631 echo
1632 for ac_var in $ac_subst_files
1633 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001634 eval ac_val=\$$ac_var
1635 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001636 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001637 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001638 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001639 done | sort
1640 echo
1641 fi
1642
Martin v. Löwis11437992002-04-12 09:54:03 +00001643 if test -s confdefs.h; then
1644 cat <<\_ASBOX
1645## ----------- ##
1646## confdefs.h. ##
1647## ----------- ##
1648_ASBOX
1649 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001650 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001651 echo
1652 fi
1653 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001654 echo "$as_me: caught signal $ac_signal"
1655 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001656 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001657 rm -f core *.core core.conftest.* &&
1658 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001659 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001660' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001661for ac_signal in 1 2 13 15; do
1662 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1663done
1664ac_signal=0
1665
1666# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001667rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001668
1669# Predefined preprocessor variables.
1670
1671cat >>confdefs.h <<_ACEOF
1672#define PACKAGE_NAME "$PACKAGE_NAME"
1673_ACEOF
1674
1675
1676cat >>confdefs.h <<_ACEOF
1677#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1678_ACEOF
1679
1680
1681cat >>confdefs.h <<_ACEOF
1682#define PACKAGE_VERSION "$PACKAGE_VERSION"
1683_ACEOF
1684
1685
1686cat >>confdefs.h <<_ACEOF
1687#define PACKAGE_STRING "$PACKAGE_STRING"
1688_ACEOF
1689
1690
1691cat >>confdefs.h <<_ACEOF
1692#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1693_ACEOF
1694
1695
1696# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001697# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001698if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001699 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001700elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001701 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001702else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001703 set x "$ac_default_prefix/share/config.site" \
1704 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001705fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001706shift
1707for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001708do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001709 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001710 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1711echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001712 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001713 . "$ac_site_file"
1714 fi
1715done
1716
1717if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001718 # Some versions of bash will fail to source /dev/null (special
1719 # files actually), so we avoid doing that.
1720 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001721 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1722echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001723 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001724 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1725 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001726 esac
1727 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001728else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001729 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1730echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001731 >$cache_file
1732fi
1733
1734# Check that the precious variables saved in the cache have kept the same
1735# value.
1736ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001737for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001738 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1739 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001740 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1741 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001742 case $ac_old_set,$ac_new_set in
1743 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001744 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1745echo "$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 +00001746 ac_cache_corrupted=: ;;
1747 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001748 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1749echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001750 ac_cache_corrupted=: ;;
1751 ,);;
1752 *)
1753 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001754 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1755echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1756 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1757echo "$as_me: former value: $ac_old_val" >&2;}
1758 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1759echo "$as_me: current value: $ac_new_val" >&2;}
1760 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001761 fi;;
1762 esac
1763 # Pass precious variables to config.status.
1764 if test "$ac_new_set" = set; then
1765 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001766 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001767 *) ac_arg=$ac_var=$ac_new_val ;;
1768 esac
1769 case " $ac_configure_args " in
1770 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1771 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1772 esac
1773 fi
1774done
1775if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001776 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1777echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1778 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1779echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001780 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001781fi
1782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
Guido van Rossum7f43da71994-08-01 12:15:30 +00001807ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001808ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001809ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1810ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1811ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001812
Guido van Rossum627b2d71993-12-24 10:39:16 +00001813
Michael W. Hudson54241132001-12-07 15:38:26 +00001814
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001815ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001816
1817
Martin v. Löwis11437992002-04-12 09:54:03 +00001818
Benjamin Petersond23f8222009-04-05 19:13:16 +00001819if test "$prefix" != "/"; then
1820 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1821fi
1822
1823
Martin v. Löwis11437992002-04-12 09:54:03 +00001824
1825
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001826
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001827
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001828# We don't use PACKAGE_ variables, and they cause conflicts
1829# with other autoconf-based packages that include Python.h
1830grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1831rm confdefs.h
1832mv confdefs.h.new confdefs.h
1833
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001834
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001835VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001836
Martin v. Löwis1142de32002-03-29 16:28:31 +00001837
1838SOVERSION=1.0
1839
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001840# The later defininition of _XOPEN_SOURCE disables certain features
1841# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1842
1843cat >>confdefs.h <<\_ACEOF
1844#define _GNU_SOURCE 1
1845_ACEOF
1846
1847
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001848# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1849# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1850# them.
1851
1852cat >>confdefs.h <<\_ACEOF
1853#define _NETBSD_SOURCE 1
1854_ACEOF
1855
1856
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001857# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1858# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1859# them.
1860
1861cat >>confdefs.h <<\_ACEOF
1862#define __BSD_VISIBLE 1
1863_ACEOF
1864
1865
Martin v. Löwisd6320502004-08-12 13:45:08 +00001866# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1867# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1868
1869cat >>confdefs.h <<\_ACEOF
1870#define _BSD_TYPES 1
1871_ACEOF
1872
1873
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001874# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1875# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1876# them.
1877
1878cat >>confdefs.h <<\_ACEOF
1879#define _DARWIN_C_SOURCE 1
1880_ACEOF
1881
1882
1883
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001884define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001885
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001886# Arguments passed to configure.
1887
1888CONFIG_ARGS="$ac_configure_args"
1889
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001890{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1891echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001892# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001893if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001894 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001895 case $enableval in
1896 yes)
1897 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001898 if test ! -d "${enableval}"
1899 then
1900 enableval=/
1901 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001902 ;;
1903 esac
1904 case $enableval in
1905 no)
1906 UNIVERSALSDK=
1907 enable_universalsdk=
1908 ;;
1909 *)
1910 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001911 if test ! -d "${UNIVERSALSDK}"
1912 then
1913 { { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
1914echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
1915 { (exit 1); exit 1; }; }
1916 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001917 ;;
1918 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001919
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001920
Thomas Wouters477c8d52006-05-27 19:21:47 +00001921else
1922
1923 UNIVERSALSDK=
1924 enable_universalsdk=
1925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001926fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001927
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001928if test -n "${UNIVERSALSDK}"
1929then
1930 { echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
1931echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
1932else
1933 { echo "$as_me:$LINENO: result: no" >&5
1934echo "${ECHO_T}no" >&6; }
1935fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001937
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001938
1939
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001940UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00001941
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001942{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1943echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001944
1945# Check whether --with-universal-archs was given.
1946if test "${with_universal_archs+set}" = set; then
1947 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001948 { echo "$as_me:$LINENO: result: $withval" >&5
1949echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001950 UNIVERSAL_ARCHS="$withval"
1951
1952else
1953
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001954 { echo "$as_me:$LINENO: result: 32-bit" >&5
1955echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001956
1957fi
1958
1959
1960
1961
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001962
1963# Check whether --with-framework-name was given.
1964if test "${with_framework_name+set}" = set; then
1965 withval=$with_framework_name;
1966 PYTHONFRAMEWORK=${withval}
1967 PYTHONFRAMEWORKDIR=${withval}.framework
1968 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1969
1970else
1971
1972 PYTHONFRAMEWORK=Python
1973 PYTHONFRAMEWORKDIR=Python.framework
1974 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1975
1976fi
1977
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001978# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001979if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001980 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001981 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001982 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001983 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001984 esac
1985 case $enableval in
1986 no)
1987 PYTHONFRAMEWORK=
1988 PYTHONFRAMEWORKDIR=no-framework
1989 PYTHONFRAMEWORKPREFIX=
1990 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001991 FRAMEWORKINSTALLFIRST=
1992 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001993 FRAMEWORKALTINSTALLFIRST=
1994 FRAMEWORKALTINSTALLLAST=
1995 if test "x${prefix}" = "xNONE"; then
1996 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1997 else
1998 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1999 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002000 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002001 ;;
2002 *)
2003 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002004 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002005 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002006 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002007 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2008 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002009
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002010 if test "x${prefix}" = "xNONE" ; then
2011 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2012 else
2013 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2014 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002015 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002016
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002017 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002018 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002019 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002021 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002022
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002023 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2024
2025 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2026
Jack Jansene578a632001-08-15 01:27:14 +00002027 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002028
Guido van Rossum563e7081996-09-10 18:20:48 +00002029else
Martin v. Löwis11437992002-04-12 09:54:03 +00002030
Jack Jansene578a632001-08-15 01:27:14 +00002031 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002032 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002033 PYTHONFRAMEWORKPREFIX=
2034 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002035 FRAMEWORKINSTALLFIRST=
2036 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002037 FRAMEWORKALTINSTALLFIRST=
2038 FRAMEWORKALTINSTALLLAST=
2039 if test "x${prefix}" = "xNONE" ; then
2040 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2041 else
2042 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2043 fi
Jack Jansene578a632001-08-15 01:27:14 +00002044 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002045
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002047fi
2048
Thomas Wouters477c8d52006-05-27 19:21:47 +00002049
2050
Michael W. Hudson54241132001-12-07 15:38:26 +00002051
2052
2053
2054
Jack Jansene578a632001-08-15 01:27:14 +00002055
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002056
2057
2058
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002059
Jack Jansene578a632001-08-15 01:27:14 +00002060##AC_ARG_WITH(dyld,
Matthias Klosec80c93f2010-04-24 17:04:35 +00002061## AC_HELP_STRING([--with-dyld],
2062## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002063##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002064# Set name for machine-dependent library files
2065
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002066{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2067echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002068if test -z "$MACHDEP"
2069then
Guido van Rossum563e7081996-09-10 18:20:48 +00002070 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002071 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002072 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002073 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002074 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002075 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002076 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002077 ac_md_system=`echo $ac_sys_system |
2078 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2079 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002080 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002081 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002082
Guido van Rossum07397971997-04-29 21:49:50 +00002083 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002084 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002085 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002086 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002087 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002088 esac
2089fi
Guido van Rossum91922671997-10-09 20:24:13 +00002090
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002091# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2092# disable features if it is defined, without any means to access these
2093# features as extensions. For these systems, we skip the definition of
2094# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2095# some feature, make sure there is no alternative way to access this
2096# feature. Also, when using wildcards, make sure you have verified the
2097# need for not defining _XOPEN_SOURCE on all systems matching the
2098# wildcard, and that the wildcard does not include future systems
2099# (which may remove their limitations).
2100case $ac_sys_system/$ac_sys_release in
2101 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2102 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002103 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002104 # In addition, Stefan Krah confirms that issue #1244610 exists through
2105 # OpenBSD 4.6, but is fixed in 4.7.
2106 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002107 define_xopen_source=no
2108 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2109 # also defined. This can be overridden by defining _BSD_SOURCE
2110 # As this has a different meaning on Linux, only define it on OpenBSD
2111
2112cat >>confdefs.h <<\_ACEOF
2113#define _BSD_SOURCE 1
2114_ACEOF
2115
2116 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002117 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00002118 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2119 # also defined. This can be overridden by defining _BSD_SOURCE
2120 # As this has a different meaning on Linux, only define it on OpenBSD
2121
2122cat >>confdefs.h <<\_ACEOF
2123#define _BSD_SOURCE 1
2124_ACEOF
2125
2126 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002127 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2128 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2129 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002130 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 +00002131 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002132 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2133 # of union __?sigval. Reported by Stuart Bishop.
2134 SunOS/5.6)
2135 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002136 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2137 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002138 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002139 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002140 define_xopen_source=no;;
2141 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002142 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002143 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002144 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002145 # On FreeBSD 4, the math functions C89 does not cover are never defined
2146 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2147 FreeBSD/4.*)
2148 define_xopen_source=no;;
2149 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2150 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2151 # identifies itself as Darwin/7.*
2152 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2153 # disables platform specific features beyond repair.
2154 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2155 # has no effect, don't bother defining them
2156 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002157 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00002158 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00002159 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002160 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2161 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2162 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002163 AIX/4)
2164 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002165 AIX/5)
2166 if test `uname -r` -eq 1; then
2167 define_xopen_source=no
2168 fi
2169 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002170 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2171 # defining NI_NUMERICHOST.
2172 QNX/6.3.2)
2173 define_xopen_source=no
2174 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002175
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002176esac
2177
2178if test $define_xopen_source = yes
2179then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002180 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2181 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002182 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2183 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002184 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002185 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002186
2187cat >>confdefs.h <<\_ACEOF
2188#define _XOPEN_SOURCE 500
2189_ACEOF
2190
2191 ;;
2192 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002193
2194cat >>confdefs.h <<\_ACEOF
2195#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002196_ACEOF
2197
Skip Montanarof0d5f792004-08-15 14:08:23 +00002198 ;;
2199 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002200
2201 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2202 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2203 # several APIs are not declared. Since this is also needed in some
2204 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002205 # except for Solaris 10, where it must not be defined,
2206 # as it implies XPG4.2
2207 case $ac_sys_system/$ac_sys_release in
2208 SunOS/5.10)
2209 ;;
2210 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002211
2212cat >>confdefs.h <<\_ACEOF
2213#define _XOPEN_SOURCE_EXTENDED 1
2214_ACEOF
2215
Martin v. Löwis7dece662005-11-26 11:38:24 +00002216 ;;
2217 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002218
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002219
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002220cat >>confdefs.h <<\_ACEOF
2221#define _POSIX_C_SOURCE 200112L
2222_ACEOF
2223
2224
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002225fi
2226
Guido van Rossum91922671997-10-09 20:24:13 +00002227#
2228# SGI compilers allow the specification of the both the ABI and the
2229# ISA on the command line. Depending on the values of these switches,
2230# different and often incompatable code will be generated.
2231#
2232# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2233# thus supply support for various ABI/ISA combinations. The MACHDEP
2234# variable is also adjusted.
2235#
2236
2237if test ! -z "$SGI_ABI"
2238then
2239 CC="cc $SGI_ABI"
2240 LDFLAGS="$SGI_ABI $LDFLAGS"
2241 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2242fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002243{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2244echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002245
Jack Jansen6b08a402004-06-03 12:41:45 +00002246# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2247# it may influence the way we can build extensions, so distutils
2248# needs to check it
2249
Thomas Wouters477c8d52006-05-27 19:21:47 +00002250
Jack Jansen6b08a402004-06-03 12:41:45 +00002251CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002252EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002253
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002254{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2255echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002256ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002257{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2258echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002259
Guido van Rossum627b2d71993-12-24 10:39:16 +00002260# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002261
2262# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2263# for debug/optimization stuff. BASECFLAGS is for flags that are required
2264# just to get things to compile and link. Users are free to override OPT
2265# when running configure or make. The build should not break if they do.
2266# BASECFLAGS should generally not be messed with, however.
2267
2268# XXX shouldn't some/most/all of this code be merged with the stuff later
2269# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002270{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2271echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002272
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002273# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002274if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002275 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002276 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002277 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002278 without_gcc=yes;;
2279 yes) CC=gcc
2280 without_gcc=no;;
2281 *) CC=$withval
2282 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002283 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002284else
Martin v. Löwis11437992002-04-12 09:54:03 +00002285
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002286 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002287 AIX*) CC=cc_r
2288 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002289 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002290 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002291fi
2292
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002293{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2294echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002295
Guido van Rossum8b131c51995-03-09 14:10:13 +00002296# If the user switches compilers, we can't believe the cache
2297if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2298then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002299 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002300(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002301echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002302(it is also a good idea to do 'make clean' before compiling)" >&2;}
2303 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002304fi
2305
Victor Stinner00d6a1d2010-03-25 01:02:29 +00002306save_CFLAGS=$CFLAGS
Martin v. Löwis11437992002-04-12 09:54:03 +00002307ac_ext=c
2308ac_cpp='$CPP $CPPFLAGS'
2309ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2310ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2311ac_compiler_gnu=$ac_cv_c_compiler_gnu
2312if test -n "$ac_tool_prefix"; then
2313 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2314set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002315{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2316echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002317if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002318 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002319else
2320 if test -n "$CC"; then
2321 ac_cv_prog_CC="$CC" # Let the user override the test.
2322else
Martin v. Löwis11437992002-04-12 09:54:03 +00002323as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2324for as_dir in $PATH
2325do
2326 IFS=$as_save_IFS
2327 test -z "$as_dir" && as_dir=.
2328 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002329 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 +00002330 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002331 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002332 break 2
2333 fi
2334done
2335done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002336IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002337
Jack Jansendd19cf82001-12-06 22:36:17 +00002338fi
2339fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002340CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002341if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002342 { echo "$as_me:$LINENO: result: $CC" >&5
2343echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002344else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002345 { echo "$as_me:$LINENO: result: no" >&5
2346echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002347fi
2348
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349
Martin v. Löwis11437992002-04-12 09:54:03 +00002350fi
2351if test -z "$ac_cv_prog_CC"; then
2352 ac_ct_CC=$CC
2353 # Extract the first word of "gcc", so it can be a program name with args.
2354set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002355{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2356echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002357if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002358 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002359else
2360 if test -n "$ac_ct_CC"; then
2361 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2362else
2363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2364for as_dir in $PATH
2365do
2366 IFS=$as_save_IFS
2367 test -z "$as_dir" && as_dir=.
2368 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369 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 +00002370 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002371 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002372 break 2
2373 fi
2374done
2375done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002376IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002377
2378fi
2379fi
2380ac_ct_CC=$ac_cv_prog_ac_ct_CC
2381if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002382 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2383echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002384else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002385 { echo "$as_me:$LINENO: result: no" >&5
2386echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002387fi
2388
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002389 if test "x$ac_ct_CC" = x; then
2390 CC=""
2391 else
2392 case $cross_compiling:$ac_tool_warned in
2393yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002394{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2395whose name does not start with the host triplet. If you think this
2396configuration is useful to you, please write to autoconf@gnu.org." >&5
2397echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2398whose name does not start with the host triplet. If you think this
2399configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002400ac_tool_warned=yes ;;
2401esac
2402 CC=$ac_ct_CC
2403 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002404else
2405 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002406fi
2407
Jack Jansendd19cf82001-12-06 22:36:17 +00002408if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002409 if test -n "$ac_tool_prefix"; then
2410 # 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 +00002411set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002412{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2413echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002414if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002415 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002416else
2417 if test -n "$CC"; then
2418 ac_cv_prog_CC="$CC" # Let the user override the test.
2419else
Martin v. Löwis11437992002-04-12 09:54:03 +00002420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2421for as_dir in $PATH
2422do
2423 IFS=$as_save_IFS
2424 test -z "$as_dir" && as_dir=.
2425 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002426 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 +00002427 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002428 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002429 break 2
2430 fi
2431done
2432done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002433IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002434
2435fi
2436fi
2437CC=$ac_cv_prog_CC
2438if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002439 { echo "$as_me:$LINENO: result: $CC" >&5
2440echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002441else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002442 { echo "$as_me:$LINENO: result: no" >&5
2443echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002444fi
2445
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002446
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002448fi
2449if test -z "$CC"; then
2450 # Extract the first word of "cc", so it can be a program name with args.
2451set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002452{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2453echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002454if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002455 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002456else
2457 if test -n "$CC"; then
2458 ac_cv_prog_CC="$CC" # Let the user override the test.
2459else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002460 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002461as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2462for as_dir in $PATH
2463do
2464 IFS=$as_save_IFS
2465 test -z "$as_dir" && as_dir=.
2466 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 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 +00002468 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2469 ac_prog_rejected=yes
2470 continue
2471 fi
2472 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002473 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 break 2
2475 fi
2476done
2477done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002479
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002480if test $ac_prog_rejected = yes; then
2481 # We found a bogon in the path, so make sure we never use it.
2482 set dummy $ac_cv_prog_CC
2483 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002485 # We chose a different compiler from the bogus one.
2486 # However, it has the same basename, so the bogon will be chosen
2487 # first if we set CC to just the basename; use the full file name.
2488 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002489 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002490 fi
2491fi
2492fi
2493fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002494CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002495if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002496 { echo "$as_me:$LINENO: result: $CC" >&5
2497echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002498else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002499 { echo "$as_me:$LINENO: result: no" >&5
2500echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002501fi
2502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503
Martin v. Löwis11437992002-04-12 09:54:03 +00002504fi
2505if test -z "$CC"; then
2506 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002508 do
2509 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2510set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002511{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2512echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002513if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002514 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002515else
2516 if test -n "$CC"; then
2517 ac_cv_prog_CC="$CC" # Let the user override the test.
2518else
Martin v. Löwis11437992002-04-12 09:54:03 +00002519as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2520for as_dir in $PATH
2521do
2522 IFS=$as_save_IFS
2523 test -z "$as_dir" && as_dir=.
2524 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 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 +00002526 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002527 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002529 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002530done
2531done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002533
2534fi
2535fi
2536CC=$ac_cv_prog_CC
2537if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002538 { echo "$as_me:$LINENO: result: $CC" >&5
2539echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002540else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002541 { echo "$as_me:$LINENO: result: no" >&5
2542echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002543fi
2544
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 test -n "$CC" && break
2547 done
2548fi
2549if test -z "$CC"; then
2550 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002552do
2553 # Extract the first word of "$ac_prog", so it can be a program name with args.
2554set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002555{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2556echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002557if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002558 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002559else
2560 if test -n "$ac_ct_CC"; then
2561 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2562else
2563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2564for as_dir in $PATH
2565do
2566 IFS=$as_save_IFS
2567 test -z "$as_dir" && as_dir=.
2568 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569 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 +00002570 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002571 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 break 2
2573 fi
2574done
2575done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002577
Martin v. Löwis11437992002-04-12 09:54:03 +00002578fi
2579fi
2580ac_ct_CC=$ac_cv_prog_ac_ct_CC
2581if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002582 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2583echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002584else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002585 { echo "$as_me:$LINENO: result: no" >&5
2586echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002587fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589
Martin v. Löwis11437992002-04-12 09:54:03 +00002590 test -n "$ac_ct_CC" && break
2591done
Michael W. Hudson54241132001-12-07 15:38:26 +00002592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593 if test "x$ac_ct_CC" = x; then
2594 CC=""
2595 else
2596 case $cross_compiling:$ac_tool_warned in
2597yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002598{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2599whose name does not start with the host triplet. If you think this
2600configuration is useful to you, please write to autoconf@gnu.org." >&5
2601echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2602whose name does not start with the host triplet. If you think this
2603configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604ac_tool_warned=yes ;;
2605esac
2606 CC=$ac_ct_CC
2607 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002608fi
2609
2610fi
2611
2612
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002613test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002614See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002615echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002616See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002617 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002618
2619# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002620echo "$as_me:$LINENO: checking for C compiler version" >&5
2621ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622{ (ac_try="$ac_compiler --version >&5"
2623case "(($ac_try" in
2624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2625 *) ac_try_echo=$ac_try;;
2626esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632{ (ac_try="$ac_compiler -v >&5"
2633case "(($ac_try" in
2634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2635 *) ac_try_echo=$ac_try;;
2636esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002642{ (ac_try="$ac_compiler -V >&5"
2643case "(($ac_try" in
2644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2645 *) ac_try_echo=$ac_try;;
2646esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002648 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 (exit $ac_status); }
2652
2653cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002654/* confdefs.h. */
2655_ACEOF
2656cat confdefs.h >>conftest.$ac_ext
2657cat >>conftest.$ac_ext <<_ACEOF
2658/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002659
Martin v. Löwis11437992002-04-12 09:54:03 +00002660int
2661main ()
2662{
2663
2664 ;
2665 return 0;
2666}
2667_ACEOF
2668ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002669ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002670# Try to create an executable without -o first, disregard a.out.
2671# It will help us diagnose broken compilers, and finding out an intuition
2672# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002673{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2674echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2675ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2676#
2677# List of possible output files, starting from the most likely.
2678# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2679# only as a last resort. b.out is created by i960 compilers.
2680ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2681#
2682# The IRIX 6 linker writes into existing files which may not be
2683# executable, retaining their permissions. Remove them first so a
2684# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002685ac_rmfiles=
2686for ac_file in $ac_files
2687do
2688 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002689 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002690 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2691 esac
2692done
2693rm -f $ac_rmfiles
2694
2695if { (ac_try="$ac_link_default"
2696case "(($ac_try" in
2697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2698 *) ac_try_echo=$ac_try;;
2699esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002701 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002705 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2706# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2707# in a Makefile. We should not override ac_cv_exeext if it was cached,
2708# so that the user can short-circuit this test for compilers unknown to
2709# Autoconf.
2710for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002711do
2712 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002713 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002714 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002715 ;;
2716 [ab].out )
2717 # We found the default executable, but exeext='' is most
2718 # certainly right.
2719 break;;
2720 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002721 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2722 then :; else
2723 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2724 fi
2725 # We set ac_cv_exeext here because the later test for it is not
2726 # safe: cross compilers may not add the suffix if given an `-o'
2727 # argument, so we may need to know it at that point already.
2728 # Even if this section looks crufty: it has the advantage of
2729 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002730 break;;
2731 * )
2732 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 esac
2734done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002735test "$ac_cv_exeext" = no && ac_cv_exeext=
2736
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002737else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002738 ac_file=''
2739fi
2740
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002741{ echo "$as_me:$LINENO: result: $ac_file" >&5
2742echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002743if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002745sed 's/^/| /' conftest.$ac_ext >&5
2746
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002747{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002748See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002749echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002750See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002751 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002752fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002753
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002754ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002756# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002757# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002758{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2759echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002760# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2761# If not cross compiling, check that we can run a simple program.
2762if test "$cross_compiling" != yes; then
2763 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002764 { (case "(($ac_try" in
2765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2766 *) ac_try_echo=$ac_try;;
2767esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002769 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002770 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002772 (exit $ac_status); }; }; then
2773 cross_compiling=no
2774 else
2775 if test "$cross_compiling" = maybe; then
2776 cross_compiling=yes
2777 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002778 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002779If you meant to cross compile, use \`--host'.
2780See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002781echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002782If you meant to cross compile, use \`--host'.
2783See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002784 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002785 fi
2786 fi
2787fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002788{ echo "$as_me:$LINENO: result: yes" >&5
2789echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002790
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002791rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002792ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002793# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002794# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002795{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2796echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2797{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2798echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002799
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002800{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2801echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002802if { (ac_try="$ac_link"
2803case "(($ac_try" in
2804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2805 *) ac_try_echo=$ac_try;;
2806esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002808 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002809 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002811 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002812 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2813# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2814# work properly (i.e., refer to `conftest.exe'), while it won't with
2815# `rm'.
2816for ac_file in conftest.exe conftest conftest.*; do
2817 test -f "$ac_file" || continue
2818 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002819 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002820 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2821 break;;
2822 * ) break;;
2823 esac
2824done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002825else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002826 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002827See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002828echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002829See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002830 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002831fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002832
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002833rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002834{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2835echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002836
2837rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002838EXEEXT=$ac_cv_exeext
2839ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002840{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2841echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002842if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002843 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002844else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002845 cat >conftest.$ac_ext <<_ACEOF
2846/* confdefs.h. */
2847_ACEOF
2848cat confdefs.h >>conftest.$ac_ext
2849cat >>conftest.$ac_ext <<_ACEOF
2850/* end confdefs.h. */
2851
2852int
2853main ()
2854{
2855
2856 ;
2857 return 0;
2858}
2859_ACEOF
2860rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002861if { (ac_try="$ac_compile"
2862case "(($ac_try" in
2863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2864 *) ac_try_echo=$ac_try;;
2865esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002867 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002868 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002870 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002871 for ac_file in conftest.o conftest.obj conftest.*; do
2872 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002873 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002874 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002875 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2876 break;;
2877 esac
2878done
2879else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002881sed 's/^/| /' conftest.$ac_ext >&5
2882
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002883{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002884See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002885echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002886See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002887 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002888fi
2889
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002890rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002891fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002892{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2893echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002894OBJEXT=$ac_cv_objext
2895ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002896{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2897echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002898if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002899 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002900else
2901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002902/* confdefs.h. */
2903_ACEOF
2904cat confdefs.h >>conftest.$ac_ext
2905cat >>conftest.$ac_ext <<_ACEOF
2906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002907
Martin v. Löwis11437992002-04-12 09:54:03 +00002908int
2909main ()
2910{
2911#ifndef __GNUC__
2912 choke me
2913#endif
2914
2915 ;
2916 return 0;
2917}
2918_ACEOF
2919rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002920if { (ac_try="$ac_compile"
2921case "(($ac_try" in
2922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2923 *) ac_try_echo=$ac_try;;
2924esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002926 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002927 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002928 grep -v '^ *+' conftest.er1 >conftest.err
2929 rm -f conftest.er1
2930 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002932 (exit $ac_status); } && {
2933 test -z "$ac_c_werror_flag" ||
2934 test ! -s conftest.err
2935 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002936 ac_compiler_gnu=yes
2937else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002939sed 's/^/| /' conftest.$ac_ext >&5
2940
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002941 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002943
2944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002945ac_cv_c_compiler_gnu=$ac_compiler_gnu
2946
2947fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002948{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2949echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2950GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002951ac_test_CFLAGS=${CFLAGS+set}
2952ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002953{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2954echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002955if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002956 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002957else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002958 ac_save_c_werror_flag=$ac_c_werror_flag
2959 ac_c_werror_flag=yes
2960 ac_cv_prog_cc_g=no
2961 CFLAGS="-g"
2962 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002963/* confdefs.h. */
2964_ACEOF
2965cat confdefs.h >>conftest.$ac_ext
2966cat >>conftest.$ac_ext <<_ACEOF
2967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002968
Martin v. Löwis11437992002-04-12 09:54:03 +00002969int
2970main ()
2971{
2972
2973 ;
2974 return 0;
2975}
2976_ACEOF
2977rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002978if { (ac_try="$ac_compile"
2979case "(($ac_try" in
2980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2981 *) ac_try_echo=$ac_try;;
2982esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002984 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002986 grep -v '^ *+' conftest.er1 >conftest.err
2987 rm -f conftest.er1
2988 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002990 (exit $ac_status); } && {
2991 test -z "$ac_c_werror_flag" ||
2992 test ! -s conftest.err
2993 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002994 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002995else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002997sed 's/^/| /' conftest.$ac_ext >&5
2998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002999 CFLAGS=""
3000 cat >conftest.$ac_ext <<_ACEOF
3001/* confdefs.h. */
3002_ACEOF
3003cat confdefs.h >>conftest.$ac_ext
3004cat >>conftest.$ac_ext <<_ACEOF
3005/* end confdefs.h. */
3006
3007int
3008main ()
3009{
3010
3011 ;
3012 return 0;
3013}
3014_ACEOF
3015rm -f conftest.$ac_objext
3016if { (ac_try="$ac_compile"
3017case "(($ac_try" in
3018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3019 *) ac_try_echo=$ac_try;;
3020esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003022 (eval "$ac_compile") 2>conftest.er1
3023 ac_status=$?
3024 grep -v '^ *+' conftest.er1 >conftest.err
3025 rm -f conftest.er1
3026 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003028 (exit $ac_status); } && {
3029 test -z "$ac_c_werror_flag" ||
3030 test ! -s conftest.err
3031 } && test -s conftest.$ac_objext; then
3032 :
3033else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003034 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003035sed 's/^/| /' conftest.$ac_ext >&5
3036
3037 ac_c_werror_flag=$ac_save_c_werror_flag
3038 CFLAGS="-g"
3039 cat >conftest.$ac_ext <<_ACEOF
3040/* confdefs.h. */
3041_ACEOF
3042cat confdefs.h >>conftest.$ac_ext
3043cat >>conftest.$ac_ext <<_ACEOF
3044/* end confdefs.h. */
3045
3046int
3047main ()
3048{
3049
3050 ;
3051 return 0;
3052}
3053_ACEOF
3054rm -f conftest.$ac_objext
3055if { (ac_try="$ac_compile"
3056case "(($ac_try" in
3057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3058 *) ac_try_echo=$ac_try;;
3059esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003061 (eval "$ac_compile") 2>conftest.er1
3062 ac_status=$?
3063 grep -v '^ *+' conftest.er1 >conftest.err
3064 rm -f conftest.er1
3065 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003067 (exit $ac_status); } && {
3068 test -z "$ac_c_werror_flag" ||
3069 test ! -s conftest.err
3070 } && test -s conftest.$ac_objext; then
3071 ac_cv_prog_cc_g=yes
3072else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003073 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003074sed 's/^/| /' conftest.$ac_ext >&5
3075
3076
Guido van Rossum627b2d71993-12-24 10:39:16 +00003077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003078
3079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003081
3082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3083fi
3084
3085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3086 ac_c_werror_flag=$ac_save_c_werror_flag
3087fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003088{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3089echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003090if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003091 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003092elif test $ac_cv_prog_cc_g = yes; then
3093 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003094 CFLAGS="-g -O2"
3095 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003096 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003097 fi
3098else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003099 if test "$GCC" = yes; then
3100 CFLAGS="-O2"
3101 else
3102 CFLAGS=
3103 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003104fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003105{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3106echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003107if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003108 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003109else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003111ac_save_CC=$CC
3112cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003113/* confdefs.h. */
3114_ACEOF
3115cat confdefs.h >>conftest.$ac_ext
3116cat >>conftest.$ac_ext <<_ACEOF
3117/* end confdefs.h. */
3118#include <stdarg.h>
3119#include <stdio.h>
3120#include <sys/types.h>
3121#include <sys/stat.h>
3122/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3123struct buf { int x; };
3124FILE * (*rcsopen) (struct buf *, struct stat *, int);
3125static char *e (p, i)
3126 char **p;
3127 int i;
3128{
3129 return p[i];
3130}
3131static char *f (char * (*g) (char **, int), char **p, ...)
3132{
3133 char *s;
3134 va_list v;
3135 va_start (v,p);
3136 s = g (p, va_arg (v,int));
3137 va_end (v);
3138 return s;
3139}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003140
3141/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3142 function prototypes and stuff, but not '\xHH' hex character constants.
3143 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003144 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003145 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3146 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003147 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003148int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3149
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003150/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3151 inside strings and character constants. */
3152#define FOO(x) 'x'
3153int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3154
Skip Montanaro6dead952003-09-25 14:50:04 +00003155int test (int i, double x);
3156struct s1 {int (*f) (int a);};
3157struct s2 {int (*f) (double a);};
3158int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3159int argc;
3160char **argv;
3161int
3162main ()
3163{
3164return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3165 ;
3166 return 0;
3167}
3168_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003169for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3170 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003171do
3172 CC="$ac_save_CC $ac_arg"
3173 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003174if { (ac_try="$ac_compile"
3175case "(($ac_try" in
3176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3177 *) ac_try_echo=$ac_try;;
3178esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003180 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003182 grep -v '^ *+' conftest.er1 >conftest.err
3183 rm -f conftest.er1
3184 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003186 (exit $ac_status); } && {
3187 test -z "$ac_c_werror_flag" ||
3188 test ! -s conftest.err
3189 } && test -s conftest.$ac_objext; then
3190 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003191else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003192 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003193sed 's/^/| /' conftest.$ac_ext >&5
3194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003195
Skip Montanaro6dead952003-09-25 14:50:04 +00003196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197
3198rm -f core conftest.err conftest.$ac_objext
3199 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003200done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003202CC=$ac_save_CC
3203
3204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003205# AC_CACHE_VAL
3206case "x$ac_cv_prog_cc_c89" in
3207 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003208 { echo "$as_me:$LINENO: result: none needed" >&5
3209echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003210 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003211 { echo "$as_me:$LINENO: result: unsupported" >&5
3212echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003213 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003214 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003215 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3216echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003217esac
3218
Skip Montanaro6dead952003-09-25 14:50:04 +00003219
Martin v. Löwis11437992002-04-12 09:54:03 +00003220ac_ext=c
3221ac_cpp='$CPP $CPPFLAGS'
3222ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3223ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3224ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003225
Victor Stinner00d6a1d2010-03-25 01:02:29 +00003226CFLAGS=$save_CFLAGS
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003227
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003228
3229
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003230{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3231echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003233# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003234if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003235 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003236
3237 case $withval in
3238 no) with_cxx_main=no
3239 MAINCC='$(CC)';;
3240 yes) with_cxx_main=yes
3241 MAINCC='$(CXX)';;
3242 *) with_cxx_main=yes
3243 MAINCC=$withval
3244 if test -z "$CXX"
3245 then
3246 CXX=$withval
3247 fi;;
3248 esac
3249else
3250
3251 with_cxx_main=no
3252 MAINCC='$(CC)'
3253
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003254fi
3255
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003256{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3257echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003258
3259preset_cxx="$CXX"
3260if test -z "$CXX"
3261then
3262 case "$CC" in
3263 gcc) # Extract the first word of "g++", so it can be a program name with args.
3264set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003265{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3266echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003267if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003268 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003269else
3270 case $CXX in
3271 [\\/]* | ?:[\\/]*)
3272 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3273 ;;
3274 *)
3275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3276for as_dir in notfound
3277do
3278 IFS=$as_save_IFS
3279 test -z "$as_dir" && as_dir=.
3280 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003281 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 +00003282 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003283 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003284 break 2
3285 fi
3286done
3287done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003288IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003289
3290 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3291 ;;
3292esac
3293fi
3294CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003295if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003296 { echo "$as_me:$LINENO: result: $CXX" >&5
3297echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003298else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003299 { echo "$as_me:$LINENO: result: no" >&5
3300echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003302
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003303 ;;
3304 cc) # Extract the first word of "c++", so it can be a program name with args.
3305set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003306{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3307echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003308if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003309 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003310else
3311 case $CXX in
3312 [\\/]* | ?:[\\/]*)
3313 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3314 ;;
3315 *)
3316 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3317for as_dir in notfound
3318do
3319 IFS=$as_save_IFS
3320 test -z "$as_dir" && as_dir=.
3321 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003322 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 +00003323 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003324 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003325 break 2
3326 fi
3327done
3328done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003329IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003330
3331 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3332 ;;
3333esac
3334fi
3335CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003336if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003337 { echo "$as_me:$LINENO: result: $CXX" >&5
3338echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003339else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003340 { echo "$as_me:$LINENO: result: no" >&5
3341echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003343
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003344 ;;
3345 esac
3346 if test "$CXX" = "notfound"
3347 then
3348 CXX=""
3349 fi
3350fi
3351if test -z "$CXX"
3352then
3353 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3354do
3355 # Extract the first word of "$ac_prog", so it can be a program name with args.
3356set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003357{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3358echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003359if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003360 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003361else
3362 if test -n "$CXX"; then
3363 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3364else
3365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3366for as_dir in $PATH
3367do
3368 IFS=$as_save_IFS
3369 test -z "$as_dir" && as_dir=.
3370 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003371 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 +00003372 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003373 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003374 break 2
3375 fi
3376done
3377done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003378IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003379
3380fi
3381fi
3382CXX=$ac_cv_prog_CXX
3383if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003384 { echo "$as_me:$LINENO: result: $CXX" >&5
3385echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003386else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003387 { echo "$as_me:$LINENO: result: no" >&5
3388echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003389fi
3390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003391
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003392 test -n "$CXX" && break
3393done
3394test -n "$CXX" || CXX="notfound"
3395
3396 if test "$CXX" = "notfound"
3397 then
3398 CXX=""
3399 fi
3400fi
3401if test "$preset_cxx" != "$CXX"
3402then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003403 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003404
3405 By default, distutils will build C++ extension modules with \"$CXX\".
3406 If this is not intended, then set CXX on the configure command line.
3407 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003408echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003409
3410 By default, distutils will build C++ extension modules with \"$CXX\".
3411 If this is not intended, then set CXX on the configure command line.
3412 " >&2;}
3413fi
3414
3415
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003416# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003417
3418ac_ext=c
3419ac_cpp='$CPP $CPPFLAGS'
3420ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3421ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3422ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003423{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3424echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003425# On Suns, sometimes $CPP names a directory.
3426if test -n "$CPP" && test -d "$CPP"; then
3427 CPP=
3428fi
3429if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003430 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003431 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003432else
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 # Double quotes because CPP needs to be expanded
3434 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3435 do
3436 ac_preproc_ok=false
3437for ac_c_preproc_warn_flag in '' yes
3438do
3439 # Use a header file that comes with gcc, so configuring glibc
3440 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003441 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3442 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003443 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003444 # not just through cpp. "Syntax error" is here to catch this case.
3445 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003446/* confdefs.h. */
3447_ACEOF
3448cat confdefs.h >>conftest.$ac_ext
3449cat >>conftest.$ac_ext <<_ACEOF
3450/* end confdefs.h. */
3451#ifdef __STDC__
3452# include <limits.h>
3453#else
3454# include <assert.h>
3455#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003456 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003457_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458if { (ac_try="$ac_cpp conftest.$ac_ext"
3459case "(($ac_try" in
3460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3461 *) ac_try_echo=$ac_try;;
3462esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003465 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003466 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003467 rm -f conftest.er1
3468 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003470 (exit $ac_status); } >/dev/null && {
3471 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3472 test ! -s conftest.err
3473 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003474 :
3475else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003477sed 's/^/| /' conftest.$ac_ext >&5
3478
Martin v. Löwis11437992002-04-12 09:54:03 +00003479 # Broken: fails on valid input.
3480continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003482
Martin v. Löwis11437992002-04-12 09:54:03 +00003483rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003485 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003486 # can be detected and how.
3487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003488/* confdefs.h. */
3489_ACEOF
3490cat confdefs.h >>conftest.$ac_ext
3491cat >>conftest.$ac_ext <<_ACEOF
3492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003493#include <ac_nonexistent.h>
3494_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003495if { (ac_try="$ac_cpp conftest.$ac_ext"
3496case "(($ac_try" in
3497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3498 *) ac_try_echo=$ac_try;;
3499esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003501 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003502 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003503 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003504 rm -f conftest.er1
3505 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003507 (exit $ac_status); } >/dev/null && {
3508 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3509 test ! -s conftest.err
3510 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003511 # Broken: success on invalid input.
3512continue
3513else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003514 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003515sed 's/^/| /' conftest.$ac_ext >&5
3516
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 # Passes both tests.
3518ac_preproc_ok=:
3519break
3520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003521
Martin v. Löwis11437992002-04-12 09:54:03 +00003522rm -f conftest.err conftest.$ac_ext
3523
3524done
3525# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3526rm -f conftest.err conftest.$ac_ext
3527if $ac_preproc_ok; then
3528 break
3529fi
3530
3531 done
3532 ac_cv_prog_CPP=$CPP
3533
3534fi
3535 CPP=$ac_cv_prog_CPP
3536else
3537 ac_cv_prog_CPP=$CPP
3538fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003539{ echo "$as_me:$LINENO: result: $CPP" >&5
3540echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003541ac_preproc_ok=false
3542for ac_c_preproc_warn_flag in '' yes
3543do
3544 # Use a header file that comes with gcc, so configuring glibc
3545 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003546 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3547 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 # On the NeXT, cc -E runs the code through the compiler's parser,
3549 # not just through cpp. "Syntax error" is here to catch this case.
3550 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003551/* confdefs.h. */
3552_ACEOF
3553cat confdefs.h >>conftest.$ac_ext
3554cat >>conftest.$ac_ext <<_ACEOF
3555/* end confdefs.h. */
3556#ifdef __STDC__
3557# include <limits.h>
3558#else
3559# include <assert.h>
3560#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003561 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003562_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003563if { (ac_try="$ac_cpp conftest.$ac_ext"
3564case "(($ac_try" in
3565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3566 *) ac_try_echo=$ac_try;;
3567esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003569 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003570 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003571 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003572 rm -f conftest.er1
3573 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003575 (exit $ac_status); } >/dev/null && {
3576 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3577 test ! -s conftest.err
3578 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 :
3580else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003582sed 's/^/| /' conftest.$ac_ext >&5
3583
Martin v. Löwis11437992002-04-12 09:54:03 +00003584 # Broken: fails on valid input.
3585continue
3586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003587
Martin v. Löwis11437992002-04-12 09:54:03 +00003588rm -f conftest.err conftest.$ac_ext
3589
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003590 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003591 # can be detected and how.
3592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003593/* confdefs.h. */
3594_ACEOF
3595cat confdefs.h >>conftest.$ac_ext
3596cat >>conftest.$ac_ext <<_ACEOF
3597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003598#include <ac_nonexistent.h>
3599_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003600if { (ac_try="$ac_cpp conftest.$ac_ext"
3601case "(($ac_try" in
3602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3603 *) ac_try_echo=$ac_try;;
3604esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003606 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003607 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003608 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 rm -f conftest.er1
3610 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003612 (exit $ac_status); } >/dev/null && {
3613 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3614 test ! -s conftest.err
3615 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003616 # Broken: success on invalid input.
3617continue
3618else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003619 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003620sed 's/^/| /' conftest.$ac_ext >&5
3621
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 # Passes both tests.
3623ac_preproc_ok=:
3624break
3625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626
Martin v. Löwis11437992002-04-12 09:54:03 +00003627rm -f conftest.err conftest.$ac_ext
3628
3629done
3630# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3631rm -f conftest.err conftest.$ac_ext
3632if $ac_preproc_ok; then
3633 :
3634else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003635 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003636See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003637echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003638See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003639 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003640fi
3641
3642ac_ext=c
3643ac_cpp='$CPP $CPPFLAGS'
3644ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3645ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3646ac_compiler_gnu=$ac_cv_c_compiler_gnu
3647
3648
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003649{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3650echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003652 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003653else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003654 # Extract the first word of "grep ggrep" to use in msg output
3655if test -z "$GREP"; then
3656set dummy grep ggrep; ac_prog_name=$2
3657if test "${ac_cv_path_GREP+set}" = set; then
3658 echo $ECHO_N "(cached) $ECHO_C" >&6
3659else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003660 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003661# Loop through the user's path and test for each of PROGNAME-LIST
3662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3664do
3665 IFS=$as_save_IFS
3666 test -z "$as_dir" && as_dir=.
3667 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003668 for ac_exec_ext in '' $ac_executable_extensions; do
3669 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3670 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3671 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672 # Check for GNU $ac_path_GREP
3673case `"$ac_path_GREP" --version 2>&1` in
3674*GNU*)
3675 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3676*)
3677 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003678 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003679 while :
3680 do
3681 cat "conftest.in" "conftest.in" >"conftest.tmp"
3682 mv "conftest.tmp" "conftest.in"
3683 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003684 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3686 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3687 ac_count=`expr $ac_count + 1`
3688 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3689 # Best one so far, save it but keep looking for a better one
3690 ac_cv_path_GREP="$ac_path_GREP"
3691 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003692 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693 # 10*(2^10) chars as input seems more than enough
3694 test $ac_count -gt 10 && break
3695 done
3696 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3697esac
3698
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003699
3700 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 done
3702done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003703
3704done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003705IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003706
3707
3708fi
3709
3710GREP="$ac_cv_path_GREP"
3711if test -z "$GREP"; then
3712 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3713echo "$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 +00003714 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003715fi
3716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003717else
3718 ac_cv_path_GREP=$GREP
3719fi
3720
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003722fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003723{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3724echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725 GREP="$ac_cv_path_GREP"
3726
3727
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003728{ echo "$as_me:$LINENO: checking for egrep" >&5
3729echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003730if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003731 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003732else
3733 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3734 then ac_cv_path_EGREP="$GREP -E"
3735 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003736 # Extract the first word of "egrep" to use in msg output
3737if test -z "$EGREP"; then
3738set dummy egrep; ac_prog_name=$2
3739if test "${ac_cv_path_EGREP+set}" = set; then
3740 echo $ECHO_N "(cached) $ECHO_C" >&6
3741else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003742 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003743# Loop through the user's path and test for each of PROGNAME-LIST
3744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003745for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3746do
3747 IFS=$as_save_IFS
3748 test -z "$as_dir" && as_dir=.
3749 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003750 for ac_exec_ext in '' $ac_executable_extensions; do
3751 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3752 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3753 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754 # Check for GNU $ac_path_EGREP
3755case `"$ac_path_EGREP" --version 2>&1` in
3756*GNU*)
3757 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3758*)
3759 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003760 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003761 while :
3762 do
3763 cat "conftest.in" "conftest.in" >"conftest.tmp"
3764 mv "conftest.tmp" "conftest.in"
3765 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003766 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3768 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3769 ac_count=`expr $ac_count + 1`
3770 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3771 # Best one so far, save it but keep looking for a better one
3772 ac_cv_path_EGREP="$ac_path_EGREP"
3773 ac_path_EGREP_max=$ac_count
3774 fi
3775 # 10*(2^10) chars as input seems more than enough
3776 test $ac_count -gt 10 && break
3777 done
3778 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3779esac
3780
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003781
3782 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003783 done
3784done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003785
3786done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003787IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003788
3789
3790fi
3791
3792EGREP="$ac_cv_path_EGREP"
3793if test -z "$EGREP"; then
3794 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3795echo "$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 +00003796 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003797fi
3798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799else
3800 ac_cv_path_EGREP=$EGREP
3801fi
3802
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003803
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003804 fi
3805fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003806{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3807echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003808 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003809
3810
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003811
3812{ echo "$as_me:$LINENO: checking for AIX" >&5
3813echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3814cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003815/* confdefs.h. */
3816_ACEOF
3817cat confdefs.h >>conftest.$ac_ext
3818cat >>conftest.$ac_ext <<_ACEOF
3819/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003820#ifdef _AIX
3821 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003822#endif
3823
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003824_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003825if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3826 $EGREP "yes" >/dev/null 2>&1; then
3827 { echo "$as_me:$LINENO: result: yes" >&5
3828echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003829cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003830#define _ALL_SOURCE 1
3831_ACEOF
3832
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003833else
3834 { echo "$as_me:$LINENO: result: no" >&5
3835echo "${ECHO_T}no" >&6; }
3836fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00003837rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003838
3839
3840
3841# Check for unsupported systems
3842case $ac_sys_system/$ac_sys_release in
3843atheos*|Linux*/1*)
3844 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3845 echo See README for details.
3846 exit 1;;
3847esac
3848
3849
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003850{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3851echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003852
3853# Check whether --with-suffix was given.
3854if test "${with_suffix+set}" = set; then
3855 withval=$with_suffix;
3856 case $withval in
3857 no) EXEEXT=;;
3858 yes) EXEEXT=.exe;;
3859 *) EXEEXT=$withval;;
3860 esac
3861fi
3862
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003863{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3864echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003865
3866# Test whether we're running on a non-case-sensitive system, in which
3867# case we give a warning if no ext is given
3868
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003869{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3870echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003871if test ! -d CaseSensitiveTestDir; then
3872mkdir CaseSensitiveTestDir
3873fi
3874
3875if test -d casesensitivetestdir
3876then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003877 { echo "$as_me:$LINENO: result: yes" >&5
3878echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003879 BUILDEXEEXT=.exe
3880else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003881 { echo "$as_me:$LINENO: result: no" >&5
3882echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003883 BUILDEXEEXT=$EXEEXT
3884fi
3885rmdir CaseSensitiveTestDir
3886
3887case $MACHDEP in
3888bsdos*)
3889 case $CC in
3890 gcc) CC="$CC -D_HAVE_BSDI";;
3891 esac;;
3892esac
3893
3894case $ac_sys_system in
3895hp*|HP*)
3896 case $CC in
3897 cc|*/cc) CC="$CC -Ae";;
3898 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003899SunOS*)
3900 # Some functions have a prototype only with that define, e.g. confstr
3901
3902cat >>confdefs.h <<\_ACEOF
3903#define __EXTENSIONS__ 1
3904_ACEOF
3905
3906 ;;
3907esac
3908
3909
3910
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003911{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3912echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003913if test -z "$LIBRARY"
3914then
3915 LIBRARY='libpython$(VERSION).a'
3916fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003917{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3918echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003919
3920# LDLIBRARY is the name of the library to link against (as opposed to the
3921# name of the library into which to insert object files). BLDLIBRARY is also
3922# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3923# is blank as the main program is not linked directly against LDLIBRARY.
3924# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3925# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3926# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3927# DLLLIBRARY is the shared (i.e., DLL) library.
3928#
3929# RUNSHARED is used to run shared python without installed libraries
3930#
3931# INSTSONAME is the name of the shared library that will be use to install
3932# on the system - some systems like version suffix, others don't
3933
3934
3935
3936
3937
3938
3939LDLIBRARY="$LIBRARY"
3940BLDLIBRARY='$(LDLIBRARY)'
3941INSTSONAME='$(LDLIBRARY)'
3942DLLLIBRARY=''
3943LDLIBRARYDIR=''
3944RUNSHARED=''
3945
3946# LINKCC is the command that links the python executable -- default is $(CC).
3947# If CXX is set, and if it is needed to link a main function that was
3948# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3949# python might then depend on the C++ runtime
3950# This is altered for AIX in order to build the export list before
3951# linking.
3952
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003953{ echo "$as_me:$LINENO: checking LINKCC" >&5
3954echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003955if test -z "$LINKCC"
3956then
3957 LINKCC='$(PURIFY) $(MAINCC)'
3958 case $ac_sys_system in
3959 AIX*)
3960 exp_extra="\"\""
3961 if test $ac_sys_release -ge 5 -o \
3962 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3963 exp_extra="."
3964 fi
3965 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003966 QNX*)
3967 # qcc must be used because the other compilers do not
3968 # support -N.
3969 LINKCC=qcc;;
3970 esac
3971fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003972{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3973echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003974
3975# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3976# make sure we default having it set to "no": this is used by
3977# distutils.unixccompiler to know if it should add --enable-new-dtags
3978# to linker command lines, and failing to detect GNU ld simply results
3979# in the same bahaviour as before.
3980
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003981{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3982echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003983ac_prog=ld
3984if test "$GCC" = yes; then
3985 ac_prog=`$CC -print-prog-name=ld`
3986fi
3987case `"$ac_prog" -V 2>&1 < /dev/null` in
3988 *GNU*)
3989 GNULD=yes;;
3990 *)
3991 GNULD=no;;
3992esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003993{ echo "$as_me:$LINENO: result: $GNULD" >&5
3994echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003995
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003996{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3997echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003998# Check whether --enable-shared was given.
3999if test "${enable_shared+set}" = set; then
4000 enableval=$enable_shared;
4001fi
4002
4003
4004if test -z "$enable_shared"
4005then
4006 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004007 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004008 enable_shared="yes";;
4009 *)
4010 enable_shared="no";;
4011 esac
4012fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004013{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4014echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004015
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004016{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4017echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004018# Check whether --enable-profiling was given.
4019if test "${enable_profiling+set}" = set; then
4020 enableval=$enable_profiling; ac_save_cc="$CC"
4021 CC="$CC -pg"
4022 if test "$cross_compiling" = yes; then
4023 ac_enable_profiling="no"
4024else
4025 cat >conftest.$ac_ext <<_ACEOF
4026/* confdefs.h. */
4027_ACEOF
4028cat confdefs.h >>conftest.$ac_ext
4029cat >>conftest.$ac_ext <<_ACEOF
4030/* end confdefs.h. */
4031int main() { return 0; }
4032_ACEOF
4033rm -f conftest$ac_exeext
4034if { (ac_try="$ac_link"
4035case "(($ac_try" in
4036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037 *) ac_try_echo=$ac_try;;
4038esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004040 (eval "$ac_link") 2>&5
4041 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4044 { (case "(($ac_try" in
4045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4046 *) ac_try_echo=$ac_try;;
4047esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004049 (eval "$ac_try") 2>&5
4050 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004052 (exit $ac_status); }; }; then
4053 ac_enable_profiling="yes"
4054else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004055 echo "$as_me: program exited with status $ac_status" >&5
4056echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004057sed 's/^/| /' conftest.$ac_ext >&5
4058
4059( exit $ac_status )
4060ac_enable_profiling="no"
4061fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4063fi
4064
4065
4066 CC="$ac_save_cc"
4067fi
4068
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004069{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4070echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004071
4072case "$ac_enable_profiling" in
4073 "yes")
4074 BASECFLAGS="-pg $BASECFLAGS"
4075 LDFLAGS="-pg $LDFLAGS"
4076 ;;
4077esac
4078
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004079{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4080echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004081
4082# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4083# library that we build, but we do not want to link against it (we
4084# will find it with a -framework option). For this reason there is an
4085# extra variable BLDLIBRARY against which Python and the extension
4086# modules are linked, BLDLIBRARY. This is normally the same as
4087# LDLIBRARY, but empty for MacOSX framework builds.
4088if test "$enable_framework"
4089then
4090 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4091 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4092 BLDLIBRARY=''
4093else
4094 BLDLIBRARY='$(LDLIBRARY)'
4095fi
4096
4097# Other platforms follow
4098if test $enable_shared = "yes"; then
4099
4100cat >>confdefs.h <<\_ACEOF
4101#define Py_ENABLE_SHARED 1
4102_ACEOF
4103
4104 case $ac_sys_system in
4105 CYGWIN*)
4106 LDLIBRARY='libpython$(VERSION).dll.a'
4107 DLLLIBRARY='libpython$(VERSION).dll'
4108 ;;
4109 SunOS*)
4110 LDLIBRARY='libpython$(VERSION).so'
4111 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4112 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4113 INSTSONAME="$LDLIBRARY".$SOVERSION
4114 ;;
4115 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4116 LDLIBRARY='libpython$(VERSION).so'
4117 BLDLIBRARY='-L. -lpython$(VERSION)'
4118 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4119 case $ac_sys_system in
4120 FreeBSD*)
4121 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4122 ;;
4123 esac
4124 INSTSONAME="$LDLIBRARY".$SOVERSION
4125 ;;
4126 hp*|HP*)
4127 case `uname -m` in
4128 ia64)
4129 LDLIBRARY='libpython$(VERSION).so'
4130 ;;
4131 *)
4132 LDLIBRARY='libpython$(VERSION).sl'
4133 ;;
4134 esac
4135 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4136 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4137 ;;
4138 OSF*)
4139 LDLIBRARY='libpython$(VERSION).so'
4140 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4141 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4142 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004143 Darwin*)
4144 LDLIBRARY='libpython$(VERSION).dylib'
4145 BLDLIBRARY='-L. -lpython$(VERSION)'
4146 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4147 ;;
4148
4149 esac
4150else # shared is disabled
4151 case $ac_sys_system in
4152 CYGWIN*)
4153 BLDLIBRARY='$(LIBRARY)'
4154 LDLIBRARY='libpython$(VERSION).dll.a'
4155 ;;
4156 esac
4157fi
4158
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004159{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4160echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004161
4162if test -n "$ac_tool_prefix"; then
4163 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4164set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004165{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4166echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004167if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004168 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004169else
4170 if test -n "$RANLIB"; then
4171 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4172else
4173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4174for as_dir in $PATH
4175do
4176 IFS=$as_save_IFS
4177 test -z "$as_dir" && as_dir=.
4178 for ac_exec_ext in '' $ac_executable_extensions; do
4179 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4180 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004181 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004182 break 2
4183 fi
4184done
4185done
4186IFS=$as_save_IFS
4187
4188fi
4189fi
4190RANLIB=$ac_cv_prog_RANLIB
4191if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004192 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4193echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004194else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004195 { echo "$as_me:$LINENO: result: no" >&5
4196echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004197fi
4198
4199
4200fi
4201if test -z "$ac_cv_prog_RANLIB"; then
4202 ac_ct_RANLIB=$RANLIB
4203 # Extract the first word of "ranlib", so it can be a program name with args.
4204set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004205{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4206echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004207if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004208 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004209else
4210 if test -n "$ac_ct_RANLIB"; then
4211 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4212else
4213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4214for as_dir in $PATH
4215do
4216 IFS=$as_save_IFS
4217 test -z "$as_dir" && as_dir=.
4218 for ac_exec_ext in '' $ac_executable_extensions; do
4219 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4220 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004221 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004222 break 2
4223 fi
4224done
4225done
4226IFS=$as_save_IFS
4227
4228fi
4229fi
4230ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4231if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004232 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4233echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004234else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004235 { echo "$as_me:$LINENO: result: no" >&5
4236echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004237fi
4238
4239 if test "x$ac_ct_RANLIB" = x; then
4240 RANLIB=":"
4241 else
4242 case $cross_compiling:$ac_tool_warned in
4243yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004244{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4245whose name does not start with the host triplet. If you think this
4246configuration is useful to you, please write to autoconf@gnu.org." >&5
4247echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4248whose name does not start with the host triplet. If you think this
4249configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004250ac_tool_warned=yes ;;
4251esac
4252 RANLIB=$ac_ct_RANLIB
4253 fi
4254else
4255 RANLIB="$ac_cv_prog_RANLIB"
4256fi
4257
4258
4259for ac_prog in ar aal
4260do
4261 # Extract the first word of "$ac_prog", so it can be a program name with args.
4262set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004263{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4264echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004265if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004266 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004267else
4268 if test -n "$AR"; then
4269 ac_cv_prog_AR="$AR" # Let the user override the test.
4270else
4271as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4272for as_dir in $PATH
4273do
4274 IFS=$as_save_IFS
4275 test -z "$as_dir" && as_dir=.
4276 for ac_exec_ext in '' $ac_executable_extensions; do
4277 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4278 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004279 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004280 break 2
4281 fi
4282done
4283done
4284IFS=$as_save_IFS
4285
4286fi
4287fi
4288AR=$ac_cv_prog_AR
4289if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004290 { echo "$as_me:$LINENO: result: $AR" >&5
4291echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004292else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004293 { echo "$as_me:$LINENO: result: no" >&5
4294echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004295fi
4296
4297
4298 test -n "$AR" && break
4299done
4300test -n "$AR" || AR="ar"
4301
4302
4303# tweak ARFLAGS only if the user didn't set it on the command line
4304
4305if test -z "$ARFLAGS"
4306then
4307 ARFLAGS="rc"
4308fi
4309
4310
4311# Extract the first word of "svnversion", so it can be a program name with args.
4312set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004313{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4314echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004315if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004316 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004317else
4318 if test -n "$SVNVERSION"; then
4319 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4320else
4321as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4322for as_dir in $PATH
4323do
4324 IFS=$as_save_IFS
4325 test -z "$as_dir" && as_dir=.
4326 for ac_exec_ext in '' $ac_executable_extensions; do
4327 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4328 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004329 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004330 break 2
4331 fi
4332done
4333done
4334IFS=$as_save_IFS
4335
4336 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4337fi
4338fi
4339SVNVERSION=$ac_cv_prog_SVNVERSION
4340if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004341 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4342echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004343else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004344 { echo "$as_me:$LINENO: result: no" >&5
4345echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004346fi
4347
4348
4349if test $SVNVERSION = found
4350then
4351 SVNVERSION="svnversion \$(srcdir)"
4352else
4353 SVNVERSION="echo Unversioned directory"
4354fi
4355
4356case $MACHDEP in
4357bsdos*|hp*|HP*)
4358 # install -d does not work on BSDI or HP-UX
4359 if test -z "$INSTALL"
4360 then
4361 INSTALL="${srcdir}/install-sh -c"
4362 fi
4363esac
4364ac_aux_dir=
4365for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4366 if test -f "$ac_dir/install-sh"; then
4367 ac_aux_dir=$ac_dir
4368 ac_install_sh="$ac_aux_dir/install-sh -c"
4369 break
4370 elif test -f "$ac_dir/install.sh"; then
4371 ac_aux_dir=$ac_dir
4372 ac_install_sh="$ac_aux_dir/install.sh -c"
4373 break
4374 elif test -f "$ac_dir/shtool"; then
4375 ac_aux_dir=$ac_dir
4376 ac_install_sh="$ac_aux_dir/shtool install -c"
4377 break
4378 fi
4379done
4380if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004381 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4382echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004383 { (exit 1); exit 1; }; }
4384fi
4385
4386# These three variables are undocumented and unsupported,
4387# and are intended to be withdrawn in a future Autoconf release.
4388# They can cause serious problems if a builder's source tree is in a directory
4389# whose full name contains unusual characters.
4390ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4391ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4392ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4393
4394
4395# Find a good install program. We prefer a C program (faster),
4396# so one script is as good as another. But avoid the broken or
4397# incompatible versions:
4398# SysV /etc/install, /usr/sbin/install
4399# SunOS /usr/etc/install
4400# IRIX /sbin/install
4401# AIX /bin/install
4402# AmigaOS /C/install, which installs bootblocks on floppy discs
4403# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4404# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4405# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4406# OS/2's system install, which has a completely different semantic
4407# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004408{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4409echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004410if test -z "$INSTALL"; then
4411if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004412 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004413else
4414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4415for as_dir in $PATH
4416do
4417 IFS=$as_save_IFS
4418 test -z "$as_dir" && as_dir=.
4419 # Account for people who put trailing slashes in PATH elements.
4420case $as_dir/ in
4421 ./ | .// | /cC/* | \
4422 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4423 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4424 /usr/ucb/* ) ;;
4425 *)
4426 # OSF1 and SCO ODT 3.0 have their own names for install.
4427 # Don't use installbsd from OSF since it installs stuff as root
4428 # by default.
4429 for ac_prog in ginstall scoinst install; do
4430 for ac_exec_ext in '' $ac_executable_extensions; do
4431 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4432 if test $ac_prog = install &&
4433 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4434 # AIX install. It has an incompatible calling convention.
4435 :
4436 elif test $ac_prog = install &&
4437 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4438 # program-specific install script used by HP pwplus--don't use.
4439 :
4440 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004441 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4442 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004443 fi
4444 fi
4445 done
4446 done
4447 ;;
4448esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004449done
4450IFS=$as_save_IFS
4451
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004452
4453fi
4454 if test "${ac_cv_path_install+set}" = set; then
4455 INSTALL=$ac_cv_path_install
4456 else
4457 # As a last resort, use the slow shell script. Don't cache a
4458 # value for INSTALL within a source directory, because that will
4459 # break other packages using the cache if that directory is
4460 # removed, or if the value is a relative name.
4461 INSTALL=$ac_install_sh
4462 fi
4463fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004464{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4465echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004466
4467# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4468# It thinks the first close brace ends the variable substitution.
4469test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4470
4471test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4472
4473test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4474
4475
4476# Not every filesystem supports hard links
4477
4478if test -z "$LN" ; then
4479 case $ac_sys_system in
4480 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004481 *) LN=ln;;
4482 esac
4483fi
4484
4485# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004486{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4487echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004488
4489# Check whether --with-pydebug was given.
4490if test "${with_pydebug+set}" = set; then
4491 withval=$with_pydebug;
4492if test "$withval" != no
4493then
4494
4495cat >>confdefs.h <<\_ACEOF
4496#define Py_DEBUG 1
4497_ACEOF
4498
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004499 { echo "$as_me:$LINENO: result: yes" >&5
4500echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004501 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004502else { echo "$as_me:$LINENO: result: no" >&5
4503echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004504fi
4505else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004506 { echo "$as_me:$LINENO: result: no" >&5
4507echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004508fi
4509
4510
4511# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4512# merged with this chunk of code?
4513
4514# Optimizer/debugger flags
4515# ------------------------
4516# (The following bit of code is complicated enough - please keep things
4517# indented properly. Just pretend you're editing Python code. ;-)
4518
4519# There are two parallel sets of case statements below, one that checks to
4520# see if OPT was set and one that does BASECFLAGS setting based upon
4521# compiler and platform. BASECFLAGS tweaks need to be made even if the
4522# user set OPT.
4523
4524# tweak OPT based on compiler and platform, only if the user didn't set
4525# it on the command line
4526
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00004527if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004528then
4529 case $GCC in
4530 yes)
4531 if test "$CC" != 'g++' ; then
4532 STRICT_PROTO="-Wstrict-prototypes"
4533 fi
4534 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4535 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4536 WRAP="-fwrapv"
4537 fi
4538 case $ac_cv_prog_cc_g in
4539 yes)
4540 if test "$Py_DEBUG" = 'true' ; then
4541 # Optimization messes up debuggers, so turn it off for
4542 # debug builds.
4543 OPT="-g -Wall $STRICT_PROTO"
4544 else
4545 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4546 fi
4547 ;;
4548 *)
4549 OPT="-O3 -Wall $STRICT_PROTO"
4550 ;;
4551 esac
4552 case $ac_sys_system in
4553 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4554 ;;
4555 esac
4556 ;;
4557
4558 *)
4559 OPT="-O"
4560 ;;
4561 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004562fi
4563
4564
4565
4566# The -arch flags for universal builds on OSX
4567UNIVERSAL_ARCH_FLAGS=
4568
4569
4570# tweak BASECFLAGS based on compiler and platform
4571case $GCC in
4572yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00004573 # Python doesn't violate C99 aliasing rules, but older versions of
4574 # GCC produce warnings for legal Python code. Enable
4575 # -fno-strict-aliasing on versions of GCC that support but produce
4576 # warnings. See Issue3326
4577 { echo "$as_me:$LINENO: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
4578echo $ECHO_N "checking whether $CC accepts and needs -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004579 ac_save_cc="$CC"
4580 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00004581 save_CFLAGS="$CFLAGS"
4582 if test "${ac_cv_no_strict_aliasing+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004583 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004584else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004585 cat >conftest.$ac_ext <<_ACEOF
4586/* confdefs.h. */
4587_ACEOF
4588cat confdefs.h >>conftest.$ac_ext
4589cat >>conftest.$ac_ext <<_ACEOF
4590/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004591
4592int
4593main ()
4594{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004595int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004596 ;
4597 return 0;
4598}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004599_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004600rm -f conftest.$ac_objext
4601if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004602case "(($ac_try" in
4603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4604 *) ac_try_echo=$ac_try;;
4605esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004607 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004608 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004609 grep -v '^ *+' conftest.er1 >conftest.err
4610 rm -f conftest.er1
4611 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004613 (exit $ac_status); } && {
4614 test -z "$ac_c_werror_flag" ||
4615 test ! -s conftest.err
4616 } && test -s conftest.$ac_objext; then
Benjamin Petersone6c9d242010-03-30 17:34:47 +00004617 CC="$ac_save_cc -fstrict-aliasing"
4618 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
4619 cat >conftest.$ac_ext <<_ACEOF
4620/* confdefs.h. */
4621_ACEOF
4622cat confdefs.h >>conftest.$ac_ext
4623cat >>conftest.$ac_ext <<_ACEOF
4624/* end confdefs.h. */
4625
4626int
4627main ()
4628{
4629void f(int **x) {} int main() { double *x; f((int **) &x); return 0; }
4630 ;
4631 return 0;
4632}
4633_ACEOF
4634rm -f conftest.$ac_objext
4635if { (ac_try="$ac_compile"
4636case "(($ac_try" in
4637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4638 *) ac_try_echo=$ac_try;;
4639esac
4640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4641 (eval "$ac_compile") 2>conftest.er1
4642 ac_status=$?
4643 grep -v '^ *+' conftest.er1 >conftest.err
4644 rm -f conftest.er1
4645 cat conftest.err >&5
4646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4647 (exit $ac_status); } && {
4648 test -z "$ac_c_werror_flag" ||
4649 test ! -s conftest.err
4650 } && test -s conftest.$ac_objext; then
4651 ac_cv_no_strict_aliasing=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004652else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004653 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004654sed 's/^/| /' conftest.$ac_ext >&5
4655
Benjamin Petersone6c9d242010-03-30 17:34:47 +00004656 ac_cv_no_strict_aliasing=yes
4657fi
4658
4659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4660else
4661 echo "$as_me: failed program was:" >&5
4662sed 's/^/| /' conftest.$ac_ext >&5
4663
4664 ac_cv_no_strict_aliasing=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004665fi
4666
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004668fi
4669
Benjamin Petersone6c9d242010-03-30 17:34:47 +00004670 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004671 CC="$ac_save_cc"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00004672 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing" >&5
4673echo "${ECHO_T}$ac_cv_no_strict_aliasing" >&6; }
4674 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004675 then
4676 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4677 fi
4678
4679 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4680 # support. Without this, treatment of subnormals doesn't follow
4681 # the standard.
4682 case $ac_sys_machine in
4683 alpha*)
4684 BASECFLAGS="$BASECFLAGS -mieee"
4685 ;;
4686 esac
4687
4688 case $ac_sys_system in
4689 SCO_SV*)
4690 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4691 ;;
4692 # is there any other compiler on Darwin besides gcc?
4693 Darwin*)
4694 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4695 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00004696 if test "${CC}" = gcc
4697 then
4698 { echo "$as_me:$LINENO: checking which compiler should be used" >&5
4699echo $ECHO_N "checking which compiler should be used... $ECHO_C" >&6; }
4700 case "${UNIVERSALSDK}" in
4701 */MacOSX10.4u.sdk)
4702 # Build using 10.4 SDK, force usage of gcc when the
4703 # compiler is gcc, otherwise the user will get very
4704 # confusing error messages when building on OSX 10.6
4705 CC=gcc-4.0
4706 CPP=cpp-4.0
4707 ;;
4708 esac
4709 { echo "$as_me:$LINENO: result: $CC" >&5
4710echo "${ECHO_T}$CC" >&6; }
4711 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004712
4713
4714 if test "${enable_universalsdk}"; then
4715 UNIVERSAL_ARCH_FLAGS=""
4716 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4717 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4718 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00004719 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004720 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4721 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004722 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004723 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004724
4725 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4726 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004727 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004728 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004729
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004730 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4731 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004732 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004733 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004734
4735 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4736 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004737 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004738 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004739
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004740 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004741 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4742echo "$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 +00004743 { (exit 1); exit 1; }; }
4744
4745 fi
4746
4747
Ronald Oussoren666028b2010-04-18 19:07:43 +00004748 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4749 if test "${UNIVERSALSDK}" != "/"
4750 then
4751 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
4752 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00004753 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004754 fi
4755 fi
4756
4757 # Calculate the right deployment target for this build.
4758 #
4759 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4760 if test ${cur_target} '>' 10.2; then
4761 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004762 if test ${enable_universalsdk}; then
4763 if test "${UNIVERSAL_ARCHS}" = "all"; then
4764 # Ensure that the default platform for a
4765 # 4-way universal build is OSX 10.5,
4766 # that's the first OS release where
4767 # 4-way builds make sense.
4768 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004769
4770 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4771 cur_target='10.5'
4772
4773 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4774 cur_target='10.5'
4775
4776 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4777 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004778 fi
4779 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00004780 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004781 # On Intel macs default to a deployment
4782 # target of 10.4, that's the first OSX
4783 # release with Intel support.
4784 cur_target="10.4"
4785 fi
4786 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004787 fi
4788 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4789
4790 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4791 # environment with a value that is the same as what we'll use
4792 # in the Makefile to ensure that we'll get the same compiler
4793 # environment during configure and build time.
4794 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4795 export MACOSX_DEPLOYMENT_TARGET
4796 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4797
4798 ;;
4799 OSF*)
4800 BASECFLAGS="$BASECFLAGS -mieee"
4801 ;;
4802 esac
4803 ;;
4804
4805*)
4806 case $ac_sys_system in
4807 OpenUNIX*|UnixWare*)
4808 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4809 ;;
4810 OSF*)
4811 BASECFLAGS="$BASECFLAGS -ieee -std"
4812 ;;
4813 SCO_SV*)
4814 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4815 ;;
4816 esac
4817 ;;
4818esac
4819
4820if test "$Py_DEBUG" = 'true'; then
4821 :
4822else
4823 OPT="-DNDEBUG $OPT"
4824fi
4825
4826if test "$ac_arch_flags"
4827then
4828 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4829fi
4830
4831# disable check for icc since it seems to pass, but generates a warning
4832if test "$CC" = icc
4833then
4834 ac_cv_opt_olimit_ok=no
4835fi
4836
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004837{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4838echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004839if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004840 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004841else
4842 ac_save_cc="$CC"
4843CC="$CC -OPT:Olimit=0"
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004844cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845/* confdefs.h. */
4846_ACEOF
4847cat confdefs.h >>conftest.$ac_ext
4848cat >>conftest.$ac_ext <<_ACEOF
4849/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004850
4851int
4852main ()
4853{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004854int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004855 ;
4856 return 0;
4857}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004858_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004859rm -f conftest.$ac_objext
4860if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004861case "(($ac_try" in
4862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4863 *) ac_try_echo=$ac_try;;
4864esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004866 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004867 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004868 grep -v '^ *+' conftest.er1 >conftest.err
4869 rm -f conftest.er1
4870 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004872 (exit $ac_status); } && {
4873 test -z "$ac_c_werror_flag" ||
4874 test ! -s conftest.err
4875 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004876 ac_cv_opt_olimit_ok=yes
4877else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004878 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004879sed 's/^/| /' conftest.$ac_ext >&5
4880
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004881 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004882fi
4883
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004885CC="$ac_save_cc"
4886fi
4887
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004888{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4889echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004890if test $ac_cv_opt_olimit_ok = yes; then
4891 case $ac_sys_system in
4892 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4893 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4894 # environment?
4895 Darwin*)
4896 ;;
4897 *)
4898 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4899 ;;
4900 esac
4901else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004902 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4903echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004904 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004905 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004906else
4907 ac_save_cc="$CC"
4908 CC="$CC -Olimit 1500"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004909 cat >conftest.$ac_ext <<_ACEOF
4910/* confdefs.h. */
4911_ACEOF
4912cat confdefs.h >>conftest.$ac_ext
4913cat >>conftest.$ac_ext <<_ACEOF
4914/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004915
4916int
4917main ()
4918{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004919int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004920 ;
4921 return 0;
4922}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004923_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004924rm -f conftest.$ac_objext
4925if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004926case "(($ac_try" in
4927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4928 *) ac_try_echo=$ac_try;;
4929esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004931 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004932 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004933 grep -v '^ *+' conftest.er1 >conftest.err
4934 rm -f conftest.er1
4935 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004937 (exit $ac_status); } && {
4938 test -z "$ac_c_werror_flag" ||
4939 test ! -s conftest.err
4940 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004941 ac_cv_olimit_ok=yes
4942else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004943 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004944sed 's/^/| /' conftest.$ac_ext >&5
4945
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004946 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947fi
4948
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004950 CC="$ac_save_cc"
4951fi
4952
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004953 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4954echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004955 if test $ac_cv_olimit_ok = yes; then
4956 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4957 fi
4958fi
4959
4960# Check whether GCC supports PyArg_ParseTuple format
4961if test "$GCC" = "yes"
4962then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004963 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4964echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965 save_CFLAGS=$CFLAGS
4966 CFLAGS="$CFLAGS -Werror"
4967 cat >conftest.$ac_ext <<_ACEOF
4968/* confdefs.h. */
4969_ACEOF
4970cat confdefs.h >>conftest.$ac_ext
4971cat >>conftest.$ac_ext <<_ACEOF
4972/* end confdefs.h. */
4973
4974 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4975
4976int
4977main ()
4978{
4979
4980 ;
4981 return 0;
4982}
4983_ACEOF
4984rm -f conftest.$ac_objext
4985if { (ac_try="$ac_compile"
4986case "(($ac_try" in
4987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4988 *) ac_try_echo=$ac_try;;
4989esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004991 (eval "$ac_compile") 2>conftest.er1
4992 ac_status=$?
4993 grep -v '^ *+' conftest.er1 >conftest.err
4994 rm -f conftest.er1
4995 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004997 (exit $ac_status); } && {
4998 test -z "$ac_c_werror_flag" ||
4999 test ! -s conftest.err
5000 } && test -s conftest.$ac_objext; then
5001
5002cat >>confdefs.h <<\_ACEOF
5003#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
5004_ACEOF
5005
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005006 { echo "$as_me:$LINENO: result: yes" >&5
5007echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005008else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005009 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005010sed 's/^/| /' conftest.$ac_ext >&5
5011
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005012 { echo "$as_me:$LINENO: result: no" >&5
5013echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005014
5015fi
5016
5017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5018 CFLAGS=$save_CFLAGS
5019fi
5020
5021# On some compilers, pthreads are available without further options
5022# (e.g. MacOS X). On some of these systems, the compiler will not
5023# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5024# So we have to see first whether pthreads are available without
5025# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005026{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5027echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005028if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005029 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030else
5031 if test "$cross_compiling" = yes; then
5032 ac_cv_pthread_is_default=no
5033else
5034 cat >conftest.$ac_ext <<_ACEOF
5035/* confdefs.h. */
5036_ACEOF
5037cat confdefs.h >>conftest.$ac_ext
5038cat >>conftest.$ac_ext <<_ACEOF
5039/* end confdefs.h. */
5040
5041#include <pthread.h>
5042
5043void* routine(void* p){return NULL;}
5044
5045int main(){
5046 pthread_t p;
5047 if(pthread_create(&p,NULL,routine,NULL)!=0)
5048 return 1;
5049 (void)pthread_detach(p);
5050 return 0;
5051}
5052
5053_ACEOF
5054rm -f conftest$ac_exeext
5055if { (ac_try="$ac_link"
5056case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
5065 { (case "(($ac_try" in
5066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5067 *) ac_try_echo=$ac_try;;
5068esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005070 (eval "$ac_try") 2>&5
5071 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005073 (exit $ac_status); }; }; then
5074
5075 ac_cv_pthread_is_default=yes
5076 ac_cv_kthread=no
5077 ac_cv_pthread=no
5078
5079else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005080 echo "$as_me: program exited with status $ac_status" >&5
5081echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005082sed 's/^/| /' conftest.$ac_ext >&5
5083
5084( exit $ac_status )
5085ac_cv_pthread_is_default=no
5086fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005087rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5088fi
5089
5090
5091
5092fi
5093
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005094{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5095echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005096
5097
5098if test $ac_cv_pthread_is_default = yes
5099then
5100 ac_cv_kpthread=no
5101else
5102# -Kpthread, if available, provides the right #defines
5103# and linker options to make pthread_create available
5104# Some compilers won't report that they do not support -Kpthread,
5105# so we need to run a program to see whether it really made the
5106# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005107{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5108echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005110 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005111else
5112 ac_save_cc="$CC"
5113CC="$CC -Kpthread"
5114if test "$cross_compiling" = yes; then
5115 ac_cv_kpthread=no
5116else
5117 cat >conftest.$ac_ext <<_ACEOF
5118/* confdefs.h. */
5119_ACEOF
5120cat confdefs.h >>conftest.$ac_ext
5121cat >>conftest.$ac_ext <<_ACEOF
5122/* end confdefs.h. */
5123
5124#include <pthread.h>
5125
5126void* routine(void* p){return NULL;}
5127
5128int main(){
5129 pthread_t p;
5130 if(pthread_create(&p,NULL,routine,NULL)!=0)
5131 return 1;
5132 (void)pthread_detach(p);
5133 return 0;
5134}
5135
5136_ACEOF
5137rm -f conftest$ac_exeext
5138if { (ac_try="$ac_link"
5139case "(($ac_try" in
5140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5141 *) ac_try_echo=$ac_try;;
5142esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005144 (eval "$ac_link") 2>&5
5145 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005147 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5148 { (case "(($ac_try" in
5149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5150 *) ac_try_echo=$ac_try;;
5151esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005153 (eval "$ac_try") 2>&5
5154 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005156 (exit $ac_status); }; }; then
5157 ac_cv_kpthread=yes
5158else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005159 echo "$as_me: program exited with status $ac_status" >&5
5160echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005161sed 's/^/| /' conftest.$ac_ext >&5
5162
5163( exit $ac_status )
5164ac_cv_kpthread=no
5165fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5167fi
5168
5169
5170CC="$ac_save_cc"
5171fi
5172
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005173{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5174echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005175fi
5176
5177if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5178then
5179# -Kthread, if available, provides the right #defines
5180# and linker options to make pthread_create available
5181# Some compilers won't report that they do not support -Kthread,
5182# so we need to run a program to see whether it really made the
5183# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005184{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5185echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005186if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005187 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005188else
5189 ac_save_cc="$CC"
5190CC="$CC -Kthread"
5191if test "$cross_compiling" = yes; then
5192 ac_cv_kthread=no
5193else
5194 cat >conftest.$ac_ext <<_ACEOF
5195/* confdefs.h. */
5196_ACEOF
5197cat confdefs.h >>conftest.$ac_ext
5198cat >>conftest.$ac_ext <<_ACEOF
5199/* end confdefs.h. */
5200
5201#include <pthread.h>
5202
5203void* routine(void* p){return NULL;}
5204
5205int main(){
5206 pthread_t p;
5207 if(pthread_create(&p,NULL,routine,NULL)!=0)
5208 return 1;
5209 (void)pthread_detach(p);
5210 return 0;
5211}
5212
5213_ACEOF
5214rm -f conftest$ac_exeext
5215if { (ac_try="$ac_link"
5216case "(($ac_try" in
5217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5218 *) ac_try_echo=$ac_try;;
5219esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005221 (eval "$ac_link") 2>&5
5222 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005224 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5225 { (case "(($ac_try" in
5226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5227 *) ac_try_echo=$ac_try;;
5228esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005230 (eval "$ac_try") 2>&5
5231 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005233 (exit $ac_status); }; }; then
5234 ac_cv_kthread=yes
5235else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005236 echo "$as_me: program exited with status $ac_status" >&5
5237echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005238sed 's/^/| /' conftest.$ac_ext >&5
5239
5240( exit $ac_status )
5241ac_cv_kthread=no
5242fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5244fi
5245
5246
5247CC="$ac_save_cc"
5248fi
5249
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005250{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5251echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005252fi
5253
5254if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5255then
5256# -pthread, if available, provides the right #defines
5257# and linker options to make pthread_create available
5258# Some compilers won't report that they do not support -pthread,
5259# so we need to run a program to see whether it really made the
5260# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005261{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5262echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005263if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005264 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005265else
5266 ac_save_cc="$CC"
5267CC="$CC -pthread"
5268if test "$cross_compiling" = yes; then
5269 ac_cv_pthread=no
5270else
5271 cat >conftest.$ac_ext <<_ACEOF
5272/* confdefs.h. */
5273_ACEOF
5274cat confdefs.h >>conftest.$ac_ext
5275cat >>conftest.$ac_ext <<_ACEOF
5276/* end confdefs.h. */
5277
5278#include <pthread.h>
5279
5280void* routine(void* p){return NULL;}
5281
5282int main(){
5283 pthread_t p;
5284 if(pthread_create(&p,NULL,routine,NULL)!=0)
5285 return 1;
5286 (void)pthread_detach(p);
5287 return 0;
5288}
5289
5290_ACEOF
5291rm -f conftest$ac_exeext
5292if { (ac_try="$ac_link"
5293case "(($ac_try" in
5294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5295 *) ac_try_echo=$ac_try;;
5296esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005298 (eval "$ac_link") 2>&5
5299 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005301 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5302 { (case "(($ac_try" in
5303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5304 *) ac_try_echo=$ac_try;;
5305esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005307 (eval "$ac_try") 2>&5
5308 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310 (exit $ac_status); }; }; then
5311 ac_cv_pthread=yes
5312else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005313 echo "$as_me: program exited with status $ac_status" >&5
5314echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005315sed 's/^/| /' conftest.$ac_ext >&5
5316
5317( exit $ac_status )
5318ac_cv_pthread=no
5319fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005320rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5321fi
5322
5323
5324CC="$ac_save_cc"
5325fi
5326
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005327{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5328echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005329fi
5330
5331# If we have set a CC compiler flag for thread support then
5332# check if it works for CXX, too.
5333ac_cv_cxx_thread=no
5334if test ! -z "$CXX"
5335then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005336{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5337echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005338ac_save_cxx="$CXX"
5339
5340if test "$ac_cv_kpthread" = "yes"
5341then
5342 CXX="$CXX -Kpthread"
5343 ac_cv_cxx_thread=yes
5344elif test "$ac_cv_kthread" = "yes"
5345then
5346 CXX="$CXX -Kthread"
5347 ac_cv_cxx_thread=yes
5348elif test "$ac_cv_pthread" = "yes"
5349then
5350 CXX="$CXX -pthread"
5351 ac_cv_cxx_thread=yes
5352fi
5353
5354if test $ac_cv_cxx_thread = yes
5355then
5356 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5357 $CXX -c conftest.$ac_ext 2>&5
5358 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5359 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5360 then
5361 ac_cv_cxx_thread=yes
5362 else
5363 ac_cv_cxx_thread=no
5364 fi
5365 rm -fr conftest*
5366fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005367{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5368echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369fi
5370CXX="$ac_save_cxx"
5371
5372
5373# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005374{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5375echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005376if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005377 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005378else
5379 cat >conftest.$ac_ext <<_ACEOF
5380/* confdefs.h. */
5381_ACEOF
5382cat confdefs.h >>conftest.$ac_ext
5383cat >>conftest.$ac_ext <<_ACEOF
5384/* end confdefs.h. */
5385#include <stdlib.h>
5386#include <stdarg.h>
5387#include <string.h>
5388#include <float.h>
5389
5390int
5391main ()
5392{
5393
5394 ;
5395 return 0;
5396}
5397_ACEOF
5398rm -f conftest.$ac_objext
5399if { (ac_try="$ac_compile"
5400case "(($ac_try" in
5401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5402 *) ac_try_echo=$ac_try;;
5403esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005405 (eval "$ac_compile") 2>conftest.er1
5406 ac_status=$?
5407 grep -v '^ *+' conftest.er1 >conftest.err
5408 rm -f conftest.er1
5409 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005411 (exit $ac_status); } && {
5412 test -z "$ac_c_werror_flag" ||
5413 test ! -s conftest.err
5414 } && test -s conftest.$ac_objext; then
5415 ac_cv_header_stdc=yes
5416else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005417 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418sed 's/^/| /' conftest.$ac_ext >&5
5419
5420 ac_cv_header_stdc=no
5421fi
5422
5423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5424
5425if test $ac_cv_header_stdc = yes; then
5426 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5427 cat >conftest.$ac_ext <<_ACEOF
5428/* confdefs.h. */
5429_ACEOF
5430cat confdefs.h >>conftest.$ac_ext
5431cat >>conftest.$ac_ext <<_ACEOF
5432/* end confdefs.h. */
5433#include <string.h>
5434
5435_ACEOF
5436if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5437 $EGREP "memchr" >/dev/null 2>&1; then
5438 :
5439else
5440 ac_cv_header_stdc=no
5441fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005442rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443
5444fi
5445
5446if test $ac_cv_header_stdc = yes; then
5447 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5448 cat >conftest.$ac_ext <<_ACEOF
5449/* confdefs.h. */
5450_ACEOF
5451cat confdefs.h >>conftest.$ac_ext
5452cat >>conftest.$ac_ext <<_ACEOF
5453/* end confdefs.h. */
5454#include <stdlib.h>
5455
5456_ACEOF
5457if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5458 $EGREP "free" >/dev/null 2>&1; then
5459 :
5460else
5461 ac_cv_header_stdc=no
5462fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005463rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005464
5465fi
5466
5467if test $ac_cv_header_stdc = yes; then
5468 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5469 if test "$cross_compiling" = yes; then
5470 :
5471else
5472 cat >conftest.$ac_ext <<_ACEOF
5473/* confdefs.h. */
5474_ACEOF
5475cat confdefs.h >>conftest.$ac_ext
5476cat >>conftest.$ac_ext <<_ACEOF
5477/* end confdefs.h. */
5478#include <ctype.h>
5479#include <stdlib.h>
5480#if ((' ' & 0x0FF) == 0x020)
5481# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5482# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5483#else
5484# define ISLOWER(c) \
5485 (('a' <= (c) && (c) <= 'i') \
5486 || ('j' <= (c) && (c) <= 'r') \
5487 || ('s' <= (c) && (c) <= 'z'))
5488# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5489#endif
5490
5491#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5492int
5493main ()
5494{
5495 int i;
5496 for (i = 0; i < 256; i++)
5497 if (XOR (islower (i), ISLOWER (i))
5498 || toupper (i) != TOUPPER (i))
5499 return 2;
5500 return 0;
5501}
5502_ACEOF
5503rm -f conftest$ac_exeext
5504if { (ac_try="$ac_link"
5505case "(($ac_try" in
5506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5507 *) ac_try_echo=$ac_try;;
5508esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005510 (eval "$ac_link") 2>&5
5511 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005513 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5514 { (case "(($ac_try" in
5515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5516 *) ac_try_echo=$ac_try;;
5517esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005519 (eval "$ac_try") 2>&5
5520 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005522 (exit $ac_status); }; }; then
5523 :
5524else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005525 echo "$as_me: program exited with status $ac_status" >&5
5526echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005527sed 's/^/| /' conftest.$ac_ext >&5
5528
5529( exit $ac_status )
5530ac_cv_header_stdc=no
5531fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005532rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5533fi
5534
5535
5536fi
5537fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005538{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5539echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005540if test $ac_cv_header_stdc = yes; then
5541
5542cat >>confdefs.h <<\_ACEOF
5543#define STDC_HEADERS 1
5544_ACEOF
5545
5546fi
5547
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005548# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5559 inttypes.h stdint.h unistd.h
5560do
5561as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5562{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5563echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5564if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5565 echo $ECHO_N "(cached) $ECHO_C" >&6
5566else
5567 cat >conftest.$ac_ext <<_ACEOF
5568/* confdefs.h. */
5569_ACEOF
5570cat confdefs.h >>conftest.$ac_ext
5571cat >>conftest.$ac_ext <<_ACEOF
5572/* end confdefs.h. */
5573$ac_includes_default
5574
5575#include <$ac_header>
5576_ACEOF
5577rm -f conftest.$ac_objext
5578if { (ac_try="$ac_compile"
5579case "(($ac_try" in
5580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5581 *) ac_try_echo=$ac_try;;
5582esac
5583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5584 (eval "$ac_compile") 2>conftest.er1
5585 ac_status=$?
5586 grep -v '^ *+' conftest.er1 >conftest.err
5587 rm -f conftest.er1
5588 cat conftest.err >&5
5589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5590 (exit $ac_status); } && {
5591 test -z "$ac_c_werror_flag" ||
5592 test ! -s conftest.err
5593 } && test -s conftest.$ac_objext; then
5594 eval "$as_ac_Header=yes"
5595else
5596 echo "$as_me: failed program was:" >&5
5597sed 's/^/| /' conftest.$ac_ext >&5
5598
5599 eval "$as_ac_Header=no"
5600fi
5601
5602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5603fi
5604ac_res=`eval echo '${'$as_ac_Header'}'`
5605 { echo "$as_me:$LINENO: result: $ac_res" >&5
5606echo "${ECHO_T}$ac_res" >&6; }
5607if test `eval echo '${'$as_ac_Header'}'` = yes; then
5608 cat >>confdefs.h <<_ACEOF
5609#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5610_ACEOF
5611
5612fi
5613
5614done
5615
5616
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005617
Martin v. Löwis11437992002-04-12 09:54:03 +00005618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
Anthony Baxter8a560de2004-10-13 15:30:56 +00005653
Martin v. Löwisc3001752005-01-23 09:27:24 +00005654
Martin v. Löwis11017b12006-01-14 18:12:57 +00005655
Thomas Wouters477c8d52006-05-27 19:21:47 +00005656
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005657
5658
5659
5660
5661
5662
5663
5664
Thomas Wouters89f507f2006-12-13 04:49:30 +00005665
Christian Heimes043d6f62008-01-07 17:19:16 +00005666
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005667
5668
Christian Heimesbbe741d2008-03-28 10:53:29 +00005669
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005670
Ronald Oussoren755740f2010-02-07 19:56:39 +00005671
5672
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005673for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5674fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005675ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005676shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005677unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005678sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5679sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005680sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005681sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005682sys/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 +00005683sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00005684bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005685do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005686as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005687if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005688 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5689echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005690if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005691 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005692fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005693ac_res=`eval echo '${'$as_ac_Header'}'`
5694 { echo "$as_me:$LINENO: result: $ac_res" >&5
5695echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005696else
Martin v. Löwis11437992002-04-12 09:54:03 +00005697 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005698{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5699echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005700cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005701/* confdefs.h. */
5702_ACEOF
5703cat confdefs.h >>conftest.$ac_ext
5704cat >>conftest.$ac_ext <<_ACEOF
5705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005706$ac_includes_default
5707#include <$ac_header>
5708_ACEOF
5709rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005710if { (ac_try="$ac_compile"
5711case "(($ac_try" in
5712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5713 *) ac_try_echo=$ac_try;;
5714esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005716 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005717 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005718 grep -v '^ *+' conftest.er1 >conftest.err
5719 rm -f conftest.er1
5720 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005722 (exit $ac_status); } && {
5723 test -z "$ac_c_werror_flag" ||
5724 test ! -s conftest.err
5725 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005726 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005727else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005729sed 's/^/| /' conftest.$ac_ext >&5
5730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005731 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005732fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005733
5734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005735{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5736echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005737
5738# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005739{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5740echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005741cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005742/* confdefs.h. */
5743_ACEOF
5744cat confdefs.h >>conftest.$ac_ext
5745cat >>conftest.$ac_ext <<_ACEOF
5746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005747#include <$ac_header>
5748_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005749if { (ac_try="$ac_cpp conftest.$ac_ext"
5750case "(($ac_try" in
5751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5752 *) ac_try_echo=$ac_try;;
5753esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005755 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005756 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005757 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005758 rm -f conftest.er1
5759 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005761 (exit $ac_status); } >/dev/null && {
5762 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5763 test ! -s conftest.err
5764 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005765 ac_header_preproc=yes
5766else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005768sed 's/^/| /' conftest.$ac_ext >&5
5769
Martin v. Löwis11437992002-04-12 09:54:03 +00005770 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005772
Martin v. Löwis11437992002-04-12 09:54:03 +00005773rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005774{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5775echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005776
5777# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005778case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5779 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005780 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5781echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5782 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5783echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005784 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005785 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005786 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005787 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5788echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5789 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5790echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5791 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5792echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5793 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5794echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5795 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5796echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5797 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5798echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005799 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005800## -------------------------------------- ##
5801## Report this to http://bugs.python.org/ ##
5802## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005803_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005804 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005805 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005806esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005807{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5808echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005809if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005810 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005811else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005812 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005813fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005814ac_res=`eval echo '${'$as_ac_Header'}'`
5815 { echo "$as_me:$LINENO: result: $ac_res" >&5
5816echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005817
5818fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005819if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005820 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005821#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005822_ACEOF
5823
5824fi
5825
Guido van Rossum627b2d71993-12-24 10:39:16 +00005826done
5827
Martin v. Löwis11437992002-04-12 09:54:03 +00005828
5829
5830
5831
5832
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005833ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005834for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005835 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5836{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5837echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005838if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005839 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005840else
Martin v. Löwis11437992002-04-12 09:54:03 +00005841 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005842/* confdefs.h. */
5843_ACEOF
5844cat confdefs.h >>conftest.$ac_ext
5845cat >>conftest.$ac_ext <<_ACEOF
5846/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005847#include <sys/types.h>
5848#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005849
Martin v. Löwis11437992002-04-12 09:54:03 +00005850int
5851main ()
5852{
5853if ((DIR *) 0)
5854return 0;
5855 ;
5856 return 0;
5857}
5858_ACEOF
5859rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005860if { (ac_try="$ac_compile"
5861case "(($ac_try" in
5862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5863 *) ac_try_echo=$ac_try;;
5864esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005866 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005867 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005868 grep -v '^ *+' conftest.er1 >conftest.err
5869 rm -f conftest.er1
5870 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005872 (exit $ac_status); } && {
5873 test -z "$ac_c_werror_flag" ||
5874 test ! -s conftest.err
5875 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005876 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005877else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005879sed 's/^/| /' conftest.$ac_ext >&5
5880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005881 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005883
5884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005885fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005886ac_res=`eval echo '${'$as_ac_Header'}'`
5887 { echo "$as_me:$LINENO: result: $ac_res" >&5
5888echo "${ECHO_T}$ac_res" >&6; }
5889if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005890 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005891#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005892_ACEOF
5893
5894ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005895fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005896
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005897done
5898# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5899if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005900 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5901echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005902if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005903 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005904else
Martin v. Löwis11437992002-04-12 09:54:03 +00005905 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005906cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005907/* confdefs.h. */
5908_ACEOF
5909cat confdefs.h >>conftest.$ac_ext
5910cat >>conftest.$ac_ext <<_ACEOF
5911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005913/* Override any GCC internal prototype to avoid an error.
5914 Use char because int might match the return type of a GCC
5915 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005916#ifdef __cplusplus
5917extern "C"
5918#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005919char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005920int
5921main ()
5922{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005923return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005924 ;
5925 return 0;
5926}
5927_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005928for ac_lib in '' dir; do
5929 if test -z "$ac_lib"; then
5930 ac_res="none required"
5931 else
5932 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005933 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005934 fi
5935 rm -f conftest.$ac_objext conftest$ac_exeext
5936if { (ac_try="$ac_link"
5937case "(($ac_try" in
5938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5939 *) ac_try_echo=$ac_try;;
5940esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005942 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005943 ac_status=$?
5944 grep -v '^ *+' conftest.er1 >conftest.err
5945 rm -f conftest.er1
5946 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005948 (exit $ac_status); } && {
5949 test -z "$ac_c_werror_flag" ||
5950 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005951 } && test -s conftest$ac_exeext &&
5952 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005953 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005954else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005955 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005956sed 's/^/| /' conftest.$ac_ext >&5
5957
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005958
Thomas Wouters477c8d52006-05-27 19:21:47 +00005959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005960
5961rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5962 conftest$ac_exeext
5963 if test "${ac_cv_search_opendir+set}" = set; then
5964 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005966done
5967if test "${ac_cv_search_opendir+set}" = set; then
5968 :
5969else
5970 ac_cv_search_opendir=no
5971fi
5972rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005973LIBS=$ac_func_search_save_LIBS
5974fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005975{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5976echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005977ac_res=$ac_cv_search_opendir
5978if test "$ac_res" != no; then
5979 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005980
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005981fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005982
Michael W. Hudson54241132001-12-07 15:38:26 +00005983else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005984 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5985echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005986if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005987 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005988else
5989 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005990cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005991/* confdefs.h. */
5992_ACEOF
5993cat confdefs.h >>conftest.$ac_ext
5994cat >>conftest.$ac_ext <<_ACEOF
5995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005997/* Override any GCC internal prototype to avoid an error.
5998 Use char because int might match the return type of a GCC
5999 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006000#ifdef __cplusplus
6001extern "C"
6002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006003char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006004int
6005main ()
6006{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006007return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006008 ;
6009 return 0;
6010}
6011_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006012for ac_lib in '' x; do
6013 if test -z "$ac_lib"; then
6014 ac_res="none required"
6015 else
6016 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006017 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006018 fi
6019 rm -f conftest.$ac_objext conftest$ac_exeext
6020if { (ac_try="$ac_link"
6021case "(($ac_try" in
6022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6023 *) ac_try_echo=$ac_try;;
6024esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006026 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006027 ac_status=$?
6028 grep -v '^ *+' conftest.er1 >conftest.err
6029 rm -f conftest.er1
6030 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006032 (exit $ac_status); } && {
6033 test -z "$ac_c_werror_flag" ||
6034 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006035 } && test -s conftest$ac_exeext &&
6036 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006037 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006038else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006039 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006040sed 's/^/| /' conftest.$ac_ext >&5
6041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006042
Thomas Wouters477c8d52006-05-27 19:21:47 +00006043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006044
6045rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6046 conftest$ac_exeext
6047 if test "${ac_cv_search_opendir+set}" = set; then
6048 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006050done
6051if test "${ac_cv_search_opendir+set}" = set; then
6052 :
6053else
6054 ac_cv_search_opendir=no
6055fi
6056rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006057LIBS=$ac_func_search_save_LIBS
6058fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006059{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6060echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006061ac_res=$ac_cv_search_opendir
6062if test "$ac_res" != no; then
6063 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006064
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006065fi
6066
6067fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006068
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006069{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6070echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006071if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006072 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006073else
6074 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006075/* confdefs.h. */
6076_ACEOF
6077cat confdefs.h >>conftest.$ac_ext
6078cat >>conftest.$ac_ext <<_ACEOF
6079/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006080#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006081int
6082main ()
6083{
6084return makedev(0, 0);
6085 ;
6086 return 0;
6087}
6088_ACEOF
6089rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006090if { (ac_try="$ac_link"
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_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006097 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006098 grep -v '^ *+' conftest.er1 >conftest.err
6099 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); } && {
6103 test -z "$ac_c_werror_flag" ||
6104 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006105 } && test -s conftest$ac_exeext &&
6106 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006107 ac_cv_header_sys_types_h_makedev=yes
6108else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006110sed 's/^/| /' conftest.$ac_ext >&5
6111
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006112 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006114
6115rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006116 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006117
6118fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006119{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6120echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006121
6122if test $ac_cv_header_sys_types_h_makedev = no; then
6123if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006124 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6125echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006126if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006127 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006128fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006129{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6130echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006131else
6132 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006133{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6134echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006135cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006136/* confdefs.h. */
6137_ACEOF
6138cat confdefs.h >>conftest.$ac_ext
6139cat >>conftest.$ac_ext <<_ACEOF
6140/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006141$ac_includes_default
6142#include <sys/mkdev.h>
6143_ACEOF
6144rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006145if { (ac_try="$ac_compile"
6146case "(($ac_try" in
6147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6148 *) ac_try_echo=$ac_try;;
6149esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006151 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006152 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006153 grep -v '^ *+' conftest.er1 >conftest.err
6154 rm -f conftest.er1
6155 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006157 (exit $ac_status); } && {
6158 test -z "$ac_c_werror_flag" ||
6159 test ! -s conftest.err
6160 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006161 ac_header_compiler=yes
6162else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006164sed 's/^/| /' conftest.$ac_ext >&5
6165
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006166 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006168
6169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006170{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6171echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172
6173# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006174{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6175echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006176cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006177/* confdefs.h. */
6178_ACEOF
6179cat confdefs.h >>conftest.$ac_ext
6180cat >>conftest.$ac_ext <<_ACEOF
6181/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182#include <sys/mkdev.h>
6183_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006184if { (ac_try="$ac_cpp conftest.$ac_ext"
6185case "(($ac_try" in
6186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6187 *) ac_try_echo=$ac_try;;
6188esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006190 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006192 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006193 rm -f conftest.er1
6194 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006196 (exit $ac_status); } >/dev/null && {
6197 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6198 test ! -s conftest.err
6199 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006200 ac_header_preproc=yes
6201else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006203sed 's/^/| /' conftest.$ac_ext >&5
6204
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006205 ac_header_preproc=no
6206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006207
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006208rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006209{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6210echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211
6212# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006213case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6214 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006215 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6216echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6217 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6218echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006219 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006220 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006221 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006222 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6223echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6224 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6225echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6226 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6227echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6228 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6229echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6230 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6231echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6232 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6233echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006234 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006235## -------------------------------------- ##
6236## Report this to http://bugs.python.org/ ##
6237## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006238_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006239 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006240 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006241esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006242{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6243echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006244if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006245 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006246else
6247 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6248fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006249{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6250echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006251
6252fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006253if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006254
6255cat >>confdefs.h <<\_ACEOF
6256#define MAJOR_IN_MKDEV 1
6257_ACEOF
6258
6259fi
6260
6261
6262
6263 if test $ac_cv_header_sys_mkdev_h = no; then
6264 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006265 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6266echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006267if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006268 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006269fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006270{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6271echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006272else
6273 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006274{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6275echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006277/* confdefs.h. */
6278_ACEOF
6279cat confdefs.h >>conftest.$ac_ext
6280cat >>conftest.$ac_ext <<_ACEOF
6281/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282$ac_includes_default
6283#include <sys/sysmacros.h>
6284_ACEOF
6285rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006286if { (ac_try="$ac_compile"
6287case "(($ac_try" in
6288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6289 *) ac_try_echo=$ac_try;;
6290esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006292 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006294 grep -v '^ *+' conftest.er1 >conftest.err
6295 rm -f conftest.er1
6296 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006298 (exit $ac_status); } && {
6299 test -z "$ac_c_werror_flag" ||
6300 test ! -s conftest.err
6301 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006302 ac_header_compiler=yes
6303else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006305sed 's/^/| /' conftest.$ac_ext >&5
6306
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006307 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006309
6310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006311{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6312echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006313
6314# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006315{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6316echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006317cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006318/* confdefs.h. */
6319_ACEOF
6320cat confdefs.h >>conftest.$ac_ext
6321cat >>conftest.$ac_ext <<_ACEOF
6322/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006323#include <sys/sysmacros.h>
6324_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006325if { (ac_try="$ac_cpp conftest.$ac_ext"
6326case "(($ac_try" in
6327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6328 *) ac_try_echo=$ac_try;;
6329esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006331 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006332 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006333 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006334 rm -f conftest.er1
6335 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006337 (exit $ac_status); } >/dev/null && {
6338 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6339 test ! -s conftest.err
6340 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006341 ac_header_preproc=yes
6342else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006343 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006344sed 's/^/| /' conftest.$ac_ext >&5
6345
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006346 ac_header_preproc=no
6347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006348
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006349rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006350{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6351echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006352
6353# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006354case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6355 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006356 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6357echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6358 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6359echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006360 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006361 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006362 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006363 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6364echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6365 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6366echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6367 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6368echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6369 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6370echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6371 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6372echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6373 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6374echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006375 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006376## -------------------------------------- ##
6377## Report this to http://bugs.python.org/ ##
6378## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006379_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006380 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006381 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006382esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006383{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6384echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006385if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006386 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006387else
6388 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6389fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006390{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6391echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006392
6393fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006394if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006395
6396cat >>confdefs.h <<\_ACEOF
6397#define MAJOR_IN_SYSMACROS 1
6398_ACEOF
6399
6400fi
6401
6402
6403 fi
6404fi
6405
Michael W. Hudson54241132001-12-07 15:38:26 +00006406
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006407# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006408
6409for ac_header in term.h
6410do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006411as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6412{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6413echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006414if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006415 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006416else
6417 cat >conftest.$ac_ext <<_ACEOF
6418/* confdefs.h. */
6419_ACEOF
6420cat confdefs.h >>conftest.$ac_ext
6421cat >>conftest.$ac_ext <<_ACEOF
6422/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006423
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006424#ifdef HAVE_CURSES_H
6425#include <curses.h>
6426#endif
6427
6428
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006429#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006430_ACEOF
6431rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006432if { (ac_try="$ac_compile"
6433case "(($ac_try" in
6434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6435 *) ac_try_echo=$ac_try;;
6436esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006438 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006439 ac_status=$?
6440 grep -v '^ *+' conftest.er1 >conftest.err
6441 rm -f conftest.er1
6442 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006444 (exit $ac_status); } && {
6445 test -z "$ac_c_werror_flag" ||
6446 test ! -s conftest.err
6447 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006448 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006449else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006450 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006451sed 's/^/| /' conftest.$ac_ext >&5
6452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006453 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006455
6456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006457fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006458ac_res=`eval echo '${'$as_ac_Header'}'`
6459 { echo "$as_me:$LINENO: result: $ac_res" >&5
6460echo "${ECHO_T}$ac_res" >&6; }
6461if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006462 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006463#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006464_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006465
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006466fi
6467
6468done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006469
6470
Martin v. Löwis11017b12006-01-14 18:12:57 +00006471# On Linux, netlink.h requires asm/types.h
6472
6473for ac_header in linux/netlink.h
6474do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006475as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6476{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6477echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006478if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006479 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006480else
6481 cat >conftest.$ac_ext <<_ACEOF
6482/* confdefs.h. */
6483_ACEOF
6484cat confdefs.h >>conftest.$ac_ext
6485cat >>conftest.$ac_ext <<_ACEOF
6486/* end confdefs.h. */
6487
6488#ifdef HAVE_ASM_TYPES_H
6489#include <asm/types.h>
6490#endif
6491#ifdef HAVE_SYS_SOCKET_H
6492#include <sys/socket.h>
6493#endif
6494
6495
6496#include <$ac_header>
6497_ACEOF
6498rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006499if { (ac_try="$ac_compile"
6500case "(($ac_try" in
6501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6502 *) ac_try_echo=$ac_try;;
6503esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006505 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006506 ac_status=$?
6507 grep -v '^ *+' conftest.er1 >conftest.err
6508 rm -f conftest.er1
6509 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006511 (exit $ac_status); } && {
6512 test -z "$ac_c_werror_flag" ||
6513 test ! -s conftest.err
6514 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006515 eval "$as_ac_Header=yes"
6516else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006517 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006518sed 's/^/| /' conftest.$ac_ext >&5
6519
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006520 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006522
6523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006524fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006525ac_res=`eval echo '${'$as_ac_Header'}'`
6526 { echo "$as_me:$LINENO: result: $ac_res" >&5
6527echo "${ECHO_T}$ac_res" >&6; }
6528if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006529 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006530#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006531_ACEOF
6532
6533fi
6534
6535done
6536
6537
Guido van Rossum627b2d71993-12-24 10:39:16 +00006538# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006539was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006540{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6541echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006542cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006543/* confdefs.h. */
6544_ACEOF
6545cat confdefs.h >>conftest.$ac_ext
6546cat >>conftest.$ac_ext <<_ACEOF
6547/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006548#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006549
6550_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006551if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006552 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006553 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006554else
Martin v. Löwis11437992002-04-12 09:54:03 +00006555
6556
6557cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006558#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006559_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006560
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006561
Guido van Rossum627b2d71993-12-24 10:39:16 +00006562fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006563rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006564
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006565{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6566echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006567
Neal Norwitz11690112002-07-30 01:08:28 +00006568# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006569{ echo "$as_me:$LINENO: checking for makedev" >&5
6570echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006571cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006572/* confdefs.h. */
6573_ACEOF
6574cat confdefs.h >>conftest.$ac_ext
6575cat >>conftest.$ac_ext <<_ACEOF
6576/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006577#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006578int
6579main ()
6580{
6581 makedev(0, 0)
6582 ;
6583 return 0;
6584}
6585_ACEOF
6586rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006587if { (ac_try="$ac_link"
6588case "(($ac_try" in
6589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6590 *) ac_try_echo=$ac_try;;
6591esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006593 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006594 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006595 grep -v '^ *+' conftest.er1 >conftest.err
6596 rm -f conftest.er1
6597 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006599 (exit $ac_status); } && {
6600 test -z "$ac_c_werror_flag" ||
6601 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006602 } && test -s conftest$ac_exeext &&
6603 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006604 ac_cv_has_makedev=yes
6605else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006607sed 's/^/| /' conftest.$ac_ext >&5
6608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006609 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006611
6612rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006613 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006614if test "$ac_cv_has_makedev" = "no"; then
6615 # we didn't link, try if _OSF_SOURCE will allow us to link
6616 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006617/* confdefs.h. */
6618_ACEOF
6619cat confdefs.h >>conftest.$ac_ext
6620cat >>conftest.$ac_ext <<_ACEOF
6621/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006622
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006623#define _OSF_SOURCE 1
6624#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006625
Neal Norwitz11690112002-07-30 01:08:28 +00006626int
6627main ()
6628{
6629 makedev(0, 0)
6630 ;
6631 return 0;
6632}
6633_ACEOF
6634rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006635if { (ac_try="$ac_link"
6636case "(($ac_try" in
6637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6638 *) ac_try_echo=$ac_try;;
6639esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006641 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006643 grep -v '^ *+' conftest.er1 >conftest.err
6644 rm -f conftest.er1
6645 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006647 (exit $ac_status); } && {
6648 test -z "$ac_c_werror_flag" ||
6649 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006650 } && test -s conftest$ac_exeext &&
6651 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006652 ac_cv_has_makedev=yes
6653else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006655sed 's/^/| /' conftest.$ac_ext >&5
6656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006657 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006659
6660rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006661 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006662 if test "$ac_cv_has_makedev" = "yes"; then
6663
6664cat >>confdefs.h <<\_ACEOF
6665#define _OSF_SOURCE 1
6666_ACEOF
6667
6668 fi
6669fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006670{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6671echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006672if test "$ac_cv_has_makedev" = "yes"; then
6673
6674cat >>confdefs.h <<\_ACEOF
6675#define HAVE_MAKEDEV 1
6676_ACEOF
6677
6678fi
6679
Martin v. Löwis399a6892002-10-04 10:22:02 +00006680# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6681# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6682# defined, but the compiler does not support pragma redefine_extname,
6683# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6684# structures (such as rlimit64) without declaring them. As a
6685# work-around, disable LFS on such configurations
6686
6687use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006688{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6689echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006690cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006691/* confdefs.h. */
6692_ACEOF
6693cat confdefs.h >>conftest.$ac_ext
6694cat >>conftest.$ac_ext <<_ACEOF
6695/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006696
6697#define _LARGEFILE_SOURCE 1
6698#define _FILE_OFFSET_BITS 64
6699#include <sys/resource.h>
6700
Martin v. Löwis399a6892002-10-04 10:22:02 +00006701int
6702main ()
6703{
6704struct rlimit foo;
6705 ;
6706 return 0;
6707}
6708_ACEOF
6709rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006710if { (ac_try="$ac_compile"
6711case "(($ac_try" in
6712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6713 *) ac_try_echo=$ac_try;;
6714esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006716 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006717 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006718 grep -v '^ *+' conftest.er1 >conftest.err
6719 rm -f conftest.er1
6720 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006722 (exit $ac_status); } && {
6723 test -z "$ac_c_werror_flag" ||
6724 test ! -s conftest.err
6725 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006726 sol_lfs_bug=no
6727else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006729sed 's/^/| /' conftest.$ac_ext >&5
6730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006731 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006732fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006733
6734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006735{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6736echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006737if test "$sol_lfs_bug" = "yes"; then
6738 use_lfs=no
6739fi
6740
6741if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006742# Two defines needed to enable largefile support on various platforms
6743# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006744
Martin v. Löwis11437992002-04-12 09:54:03 +00006745cat >>confdefs.h <<\_ACEOF
6746#define _LARGEFILE_SOURCE 1
6747_ACEOF
6748
6749
6750cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006751#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006752_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006753
Martin v. Löwis399a6892002-10-04 10:22:02 +00006754fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006755
Guido van Rossum84e7b241996-08-19 21:59:00 +00006756# Add some code to confdefs.h so that the test for off_t works on SCO
6757cat >> confdefs.h <<\EOF
6758#if defined(SCO_DS)
6759#undef _OFF_T
6760#endif
6761EOF
6762
Guido van Rossumef2255b2000-03-10 22:30:29 +00006763# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006764{ echo "$as_me:$LINENO: checking for mode_t" >&5
6765echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006766if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006767 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006768else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006769 cat >conftest.$ac_ext <<_ACEOF
6770/* confdefs.h. */
6771_ACEOF
6772cat confdefs.h >>conftest.$ac_ext
6773cat >>conftest.$ac_ext <<_ACEOF
6774/* end confdefs.h. */
6775$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006776typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006777int
6778main ()
6779{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006780if ((ac__type_new_ *) 0)
6781 return 0;
6782if (sizeof (ac__type_new_))
6783 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006784 ;
6785 return 0;
6786}
6787_ACEOF
6788rm -f conftest.$ac_objext
6789if { (ac_try="$ac_compile"
6790case "(($ac_try" in
6791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6792 *) ac_try_echo=$ac_try;;
6793esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006795 (eval "$ac_compile") 2>conftest.er1
6796 ac_status=$?
6797 grep -v '^ *+' conftest.er1 >conftest.err
6798 rm -f conftest.er1
6799 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006801 (exit $ac_status); } && {
6802 test -z "$ac_c_werror_flag" ||
6803 test ! -s conftest.err
6804 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006805 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006806else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006808sed 's/^/| /' conftest.$ac_ext >&5
6809
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006810 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006812
6813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006814fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006815{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6816echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6817if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006818 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006819else
Martin v. Löwis11437992002-04-12 09:54:03 +00006820
6821cat >>confdefs.h <<_ACEOF
6822#define mode_t int
6823_ACEOF
6824
6825fi
6826
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006827{ echo "$as_me:$LINENO: checking for off_t" >&5
6828echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006829if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006830 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006831else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006832 cat >conftest.$ac_ext <<_ACEOF
6833/* confdefs.h. */
6834_ACEOF
6835cat confdefs.h >>conftest.$ac_ext
6836cat >>conftest.$ac_ext <<_ACEOF
6837/* end confdefs.h. */
6838$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006839typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006840int
6841main ()
6842{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006843if ((ac__type_new_ *) 0)
6844 return 0;
6845if (sizeof (ac__type_new_))
6846 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006847 ;
6848 return 0;
6849}
6850_ACEOF
6851rm -f conftest.$ac_objext
6852if { (ac_try="$ac_compile"
6853case "(($ac_try" in
6854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6855 *) ac_try_echo=$ac_try;;
6856esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006858 (eval "$ac_compile") 2>conftest.er1
6859 ac_status=$?
6860 grep -v '^ *+' conftest.er1 >conftest.err
6861 rm -f conftest.er1
6862 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006864 (exit $ac_status); } && {
6865 test -z "$ac_c_werror_flag" ||
6866 test ! -s conftest.err
6867 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006868 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006869else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006871sed 's/^/| /' conftest.$ac_ext >&5
6872
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006873 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006875
6876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006877fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006878{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6879echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6880if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006881 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006882else
Martin v. Löwis11437992002-04-12 09:54:03 +00006883
6884cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006885#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006886_ACEOF
6887
6888fi
6889
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006890{ echo "$as_me:$LINENO: checking for pid_t" >&5
6891echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006892if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006893 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006894else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006895 cat >conftest.$ac_ext <<_ACEOF
6896/* confdefs.h. */
6897_ACEOF
6898cat confdefs.h >>conftest.$ac_ext
6899cat >>conftest.$ac_ext <<_ACEOF
6900/* end confdefs.h. */
6901$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006902typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006903int
6904main ()
6905{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006906if ((ac__type_new_ *) 0)
6907 return 0;
6908if (sizeof (ac__type_new_))
6909 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006910 ;
6911 return 0;
6912}
6913_ACEOF
6914rm -f conftest.$ac_objext
6915if { (ac_try="$ac_compile"
6916case "(($ac_try" in
6917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6918 *) ac_try_echo=$ac_try;;
6919esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006921 (eval "$ac_compile") 2>conftest.er1
6922 ac_status=$?
6923 grep -v '^ *+' conftest.er1 >conftest.err
6924 rm -f conftest.er1
6925 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006927 (exit $ac_status); } && {
6928 test -z "$ac_c_werror_flag" ||
6929 test ! -s conftest.err
6930 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006931 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006932else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006934sed 's/^/| /' conftest.$ac_ext >&5
6935
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006936 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006938
6939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006940fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006941{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6942echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6943if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006944 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006945else
Martin v. Löwis11437992002-04-12 09:54:03 +00006946
6947cat >>confdefs.h <<_ACEOF
6948#define pid_t int
6949_ACEOF
6950
6951fi
6952
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006953{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6954echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006955if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006956 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006957else
6958 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006959/* confdefs.h. */
6960_ACEOF
6961cat confdefs.h >>conftest.$ac_ext
6962cat >>conftest.$ac_ext <<_ACEOF
6963/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006964#include <sys/types.h>
6965#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006966
Martin v. Löwis11437992002-04-12 09:54:03 +00006967int
6968main ()
6969{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006970return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006971 ;
6972 return 0;
6973}
6974_ACEOF
6975rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006976if { (ac_try="$ac_compile"
6977case "(($ac_try" in
6978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6979 *) ac_try_echo=$ac_try;;
6980esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006984 grep -v '^ *+' conftest.er1 >conftest.err
6985 rm -f conftest.er1
6986 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006988 (exit $ac_status); } && {
6989 test -z "$ac_c_werror_flag" ||
6990 test ! -s conftest.err
6991 } && test -s conftest.$ac_objext; then
6992 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006993else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006995sed 's/^/| /' conftest.$ac_ext >&5
6996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006997 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006999
7000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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_signal" >&5
7003echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007004
Martin v. Löwis11437992002-04-12 09:54:03 +00007005cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007006#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007007_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007008
Michael W. Hudson54241132001-12-07 15:38:26 +00007009
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007010{ echo "$as_me:$LINENO: checking for size_t" >&5
7011echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007012if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007013 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007014else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007015 cat >conftest.$ac_ext <<_ACEOF
7016/* confdefs.h. */
7017_ACEOF
7018cat confdefs.h >>conftest.$ac_ext
7019cat >>conftest.$ac_ext <<_ACEOF
7020/* end confdefs.h. */
7021$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007022typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007023int
7024main ()
7025{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007026if ((ac__type_new_ *) 0)
7027 return 0;
7028if (sizeof (ac__type_new_))
7029 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007030 ;
7031 return 0;
7032}
7033_ACEOF
7034rm -f conftest.$ac_objext
7035if { (ac_try="$ac_compile"
7036case "(($ac_try" in
7037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7038 *) ac_try_echo=$ac_try;;
7039esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007041 (eval "$ac_compile") 2>conftest.er1
7042 ac_status=$?
7043 grep -v '^ *+' conftest.er1 >conftest.err
7044 rm -f conftest.er1
7045 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007047 (exit $ac_status); } && {
7048 test -z "$ac_c_werror_flag" ||
7049 test ! -s conftest.err
7050 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007051 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007052else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007054sed 's/^/| /' conftest.$ac_ext >&5
7055
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007056 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007058
7059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007060fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007061{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7062echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7063if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007064 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007065else
Martin v. Löwis11437992002-04-12 09:54:03 +00007066
7067cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007068#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007069_ACEOF
7070
7071fi
7072
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007073{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7074echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007075if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007076 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007077else
7078 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007079/* confdefs.h. */
7080_ACEOF
7081cat confdefs.h >>conftest.$ac_ext
7082cat >>conftest.$ac_ext <<_ACEOF
7083/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007084#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007085
7086_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007087if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007088 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007089 ac_cv_type_uid_t=yes
7090else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007091 ac_cv_type_uid_t=no
7092fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007093rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007094
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007095fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007096{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7097echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007098if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007099
Martin v. Löwis11437992002-04-12 09:54:03 +00007100cat >>confdefs.h <<\_ACEOF
7101#define uid_t int
7102_ACEOF
7103
7104
7105cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007106#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007107_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007108
7109fi
7110
Mark Dickinsonbd792642009-03-18 20:06:12 +00007111
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007112 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7113echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007114if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007115 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007116else
7117 ac_cv_c_uint32_t=no
7118 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7119 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7120 cat >conftest.$ac_ext <<_ACEOF
7121/* confdefs.h. */
7122_ACEOF
7123cat confdefs.h >>conftest.$ac_ext
7124cat >>conftest.$ac_ext <<_ACEOF
7125/* end confdefs.h. */
7126$ac_includes_default
7127int
7128main ()
7129{
7130static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7131test_array [0] = 0
7132
7133 ;
7134 return 0;
7135}
7136_ACEOF
7137rm -f conftest.$ac_objext
7138if { (ac_try="$ac_compile"
7139case "(($ac_try" in
7140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7141 *) ac_try_echo=$ac_try;;
7142esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007144 (eval "$ac_compile") 2>conftest.er1
7145 ac_status=$?
7146 grep -v '^ *+' conftest.er1 >conftest.err
7147 rm -f conftest.er1
7148 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007150 (exit $ac_status); } && {
7151 test -z "$ac_c_werror_flag" ||
7152 test ! -s conftest.err
7153 } && test -s conftest.$ac_objext; then
7154 case $ac_type in
7155 uint32_t) ac_cv_c_uint32_t=yes ;;
7156 *) ac_cv_c_uint32_t=$ac_type ;;
7157esac
7158
7159else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007160 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007161sed 's/^/| /' conftest.$ac_ext >&5
7162
7163
7164fi
7165
7166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7167 test "$ac_cv_c_uint32_t" != no && break
7168 done
7169fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007170{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7171echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007172 case $ac_cv_c_uint32_t in #(
7173 no|yes) ;; #(
7174 *)
7175
7176cat >>confdefs.h <<\_ACEOF
7177#define _UINT32_T 1
7178_ACEOF
7179
7180
7181cat >>confdefs.h <<_ACEOF
7182#define uint32_t $ac_cv_c_uint32_t
7183_ACEOF
7184;;
7185 esac
7186
7187
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007188 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7189echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007190if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007191 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007192else
7193 ac_cv_c_uint64_t=no
7194 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7195 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7196 cat >conftest.$ac_ext <<_ACEOF
7197/* confdefs.h. */
7198_ACEOF
7199cat confdefs.h >>conftest.$ac_ext
7200cat >>conftest.$ac_ext <<_ACEOF
7201/* end confdefs.h. */
7202$ac_includes_default
7203int
7204main ()
7205{
7206static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7207test_array [0] = 0
7208
7209 ;
7210 return 0;
7211}
7212_ACEOF
7213rm -f conftest.$ac_objext
7214if { (ac_try="$ac_compile"
7215case "(($ac_try" in
7216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7217 *) ac_try_echo=$ac_try;;
7218esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007220 (eval "$ac_compile") 2>conftest.er1
7221 ac_status=$?
7222 grep -v '^ *+' conftest.er1 >conftest.err
7223 rm -f conftest.er1
7224 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007226 (exit $ac_status); } && {
7227 test -z "$ac_c_werror_flag" ||
7228 test ! -s conftest.err
7229 } && test -s conftest.$ac_objext; then
7230 case $ac_type in
7231 uint64_t) ac_cv_c_uint64_t=yes ;;
7232 *) ac_cv_c_uint64_t=$ac_type ;;
7233esac
7234
7235else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007236 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007237sed 's/^/| /' conftest.$ac_ext >&5
7238
7239
7240fi
7241
7242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7243 test "$ac_cv_c_uint64_t" != no && break
7244 done
7245fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007246{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7247echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007248 case $ac_cv_c_uint64_t in #(
7249 no|yes) ;; #(
7250 *)
7251
7252cat >>confdefs.h <<\_ACEOF
7253#define _UINT64_T 1
7254_ACEOF
7255
7256
7257cat >>confdefs.h <<_ACEOF
7258#define uint64_t $ac_cv_c_uint64_t
7259_ACEOF
7260;;
7261 esac
7262
7263
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007264 { echo "$as_me:$LINENO: checking for int32_t" >&5
7265echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007266if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007267 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007268else
7269 ac_cv_c_int32_t=no
7270 for ac_type in 'int32_t' 'int' 'long int' \
7271 'long long int' 'short int' 'signed char'; do
7272 cat >conftest.$ac_ext <<_ACEOF
7273/* confdefs.h. */
7274_ACEOF
7275cat confdefs.h >>conftest.$ac_ext
7276cat >>conftest.$ac_ext <<_ACEOF
7277/* end confdefs.h. */
7278$ac_includes_default
7279int
7280main ()
7281{
7282static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7283test_array [0] = 0
7284
7285 ;
7286 return 0;
7287}
7288_ACEOF
7289rm -f conftest.$ac_objext
7290if { (ac_try="$ac_compile"
7291case "(($ac_try" in
7292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7293 *) ac_try_echo=$ac_try;;
7294esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007296 (eval "$ac_compile") 2>conftest.er1
7297 ac_status=$?
7298 grep -v '^ *+' conftest.er1 >conftest.err
7299 rm -f conftest.er1
7300 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007302 (exit $ac_status); } && {
7303 test -z "$ac_c_werror_flag" ||
7304 test ! -s conftest.err
7305 } && test -s conftest.$ac_objext; then
7306 cat >conftest.$ac_ext <<_ACEOF
7307/* confdefs.h. */
7308_ACEOF
7309cat confdefs.h >>conftest.$ac_ext
7310cat >>conftest.$ac_ext <<_ACEOF
7311/* end confdefs.h. */
7312$ac_includes_default
7313int
7314main ()
7315{
7316static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007317 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007318test_array [0] = 0
7319
7320 ;
7321 return 0;
7322}
7323_ACEOF
7324rm -f conftest.$ac_objext
7325if { (ac_try="$ac_compile"
7326case "(($ac_try" in
7327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7328 *) ac_try_echo=$ac_try;;
7329esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007331 (eval "$ac_compile") 2>conftest.er1
7332 ac_status=$?
7333 grep -v '^ *+' conftest.er1 >conftest.err
7334 rm -f conftest.er1
7335 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007337 (exit $ac_status); } && {
7338 test -z "$ac_c_werror_flag" ||
7339 test ! -s conftest.err
7340 } && test -s conftest.$ac_objext; then
7341 :
7342else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007343 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007344sed 's/^/| /' conftest.$ac_ext >&5
7345
7346 case $ac_type in
7347 int32_t) ac_cv_c_int32_t=yes ;;
7348 *) ac_cv_c_int32_t=$ac_type ;;
7349esac
7350
7351fi
7352
7353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7354else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007355 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007356sed 's/^/| /' conftest.$ac_ext >&5
7357
7358
7359fi
7360
7361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7362 test "$ac_cv_c_int32_t" != no && break
7363 done
7364fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007365{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7366echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007367 case $ac_cv_c_int32_t in #(
7368 no|yes) ;; #(
7369 *)
7370
7371cat >>confdefs.h <<_ACEOF
7372#define int32_t $ac_cv_c_int32_t
7373_ACEOF
7374;;
7375 esac
7376
7377
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007378 { echo "$as_me:$LINENO: checking for int64_t" >&5
7379echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007380if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007381 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007382else
7383 ac_cv_c_int64_t=no
7384 for ac_type in 'int64_t' 'int' 'long int' \
7385 'long long int' 'short int' 'signed char'; do
7386 cat >conftest.$ac_ext <<_ACEOF
7387/* confdefs.h. */
7388_ACEOF
7389cat confdefs.h >>conftest.$ac_ext
7390cat >>conftest.$ac_ext <<_ACEOF
7391/* end confdefs.h. */
7392$ac_includes_default
7393int
7394main ()
7395{
7396static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7397test_array [0] = 0
7398
7399 ;
7400 return 0;
7401}
7402_ACEOF
7403rm -f conftest.$ac_objext
7404if { (ac_try="$ac_compile"
7405case "(($ac_try" in
7406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7407 *) ac_try_echo=$ac_try;;
7408esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007410 (eval "$ac_compile") 2>conftest.er1
7411 ac_status=$?
7412 grep -v '^ *+' conftest.er1 >conftest.err
7413 rm -f conftest.er1
7414 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007416 (exit $ac_status); } && {
7417 test -z "$ac_c_werror_flag" ||
7418 test ! -s conftest.err
7419 } && test -s conftest.$ac_objext; then
7420 cat >conftest.$ac_ext <<_ACEOF
7421/* confdefs.h. */
7422_ACEOF
7423cat confdefs.h >>conftest.$ac_ext
7424cat >>conftest.$ac_ext <<_ACEOF
7425/* end confdefs.h. */
7426$ac_includes_default
7427int
7428main ()
7429{
7430static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007431 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007432test_array [0] = 0
7433
7434 ;
7435 return 0;
7436}
7437_ACEOF
7438rm -f conftest.$ac_objext
7439if { (ac_try="$ac_compile"
7440case "(($ac_try" in
7441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7442 *) ac_try_echo=$ac_try;;
7443esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007445 (eval "$ac_compile") 2>conftest.er1
7446 ac_status=$?
7447 grep -v '^ *+' conftest.er1 >conftest.err
7448 rm -f conftest.er1
7449 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007451 (exit $ac_status); } && {
7452 test -z "$ac_c_werror_flag" ||
7453 test ! -s conftest.err
7454 } && test -s conftest.$ac_objext; then
7455 :
7456else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007457 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007458sed 's/^/| /' conftest.$ac_ext >&5
7459
7460 case $ac_type in
7461 int64_t) ac_cv_c_int64_t=yes ;;
7462 *) ac_cv_c_int64_t=$ac_type ;;
7463esac
7464
7465fi
7466
7467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7468else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007469 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007470sed 's/^/| /' conftest.$ac_ext >&5
7471
7472
7473fi
7474
7475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7476 test "$ac_cv_c_int64_t" != no && break
7477 done
7478fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007479{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7480echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007481 case $ac_cv_c_int64_t in #(
7482 no|yes) ;; #(
7483 *)
7484
7485cat >>confdefs.h <<_ACEOF
7486#define int64_t $ac_cv_c_int64_t
7487_ACEOF
7488;;
7489 esac
7490
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007491{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7492echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007493if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007494 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007495else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007496 cat >conftest.$ac_ext <<_ACEOF
7497/* confdefs.h. */
7498_ACEOF
7499cat confdefs.h >>conftest.$ac_ext
7500cat >>conftest.$ac_ext <<_ACEOF
7501/* end confdefs.h. */
7502$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007503typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007504int
7505main ()
7506{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007507if ((ac__type_new_ *) 0)
7508 return 0;
7509if (sizeof (ac__type_new_))
7510 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007511 ;
7512 return 0;
7513}
7514_ACEOF
7515rm -f conftest.$ac_objext
7516if { (ac_try="$ac_compile"
7517case "(($ac_try" in
7518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7519 *) ac_try_echo=$ac_try;;
7520esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007522 (eval "$ac_compile") 2>conftest.er1
7523 ac_status=$?
7524 grep -v '^ *+' conftest.er1 >conftest.err
7525 rm -f conftest.er1
7526 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007528 (exit $ac_status); } && {
7529 test -z "$ac_c_werror_flag" ||
7530 test ! -s conftest.err
7531 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007532 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007533else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007534 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007535sed 's/^/| /' conftest.$ac_ext >&5
7536
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007537 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007539
7540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007541fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007542{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7543echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7544if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007545
7546cat >>confdefs.h <<\_ACEOF
7547#define HAVE_SSIZE_T 1
7548_ACEOF
7549
7550fi
7551
Jack Jansendd19cf82001-12-06 22:36:17 +00007552
Michael W. Hudson54241132001-12-07 15:38:26 +00007553# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007554# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007555{ echo "$as_me:$LINENO: checking for int" >&5
7556echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7557if test "${ac_cv_type_int+set}" = set; then
7558 echo $ECHO_N "(cached) $ECHO_C" >&6
7559else
7560 cat >conftest.$ac_ext <<_ACEOF
7561/* confdefs.h. */
7562_ACEOF
7563cat confdefs.h >>conftest.$ac_ext
7564cat >>conftest.$ac_ext <<_ACEOF
7565/* end confdefs.h. */
7566$ac_includes_default
7567typedef int ac__type_new_;
7568int
7569main ()
7570{
7571if ((ac__type_new_ *) 0)
7572 return 0;
7573if (sizeof (ac__type_new_))
7574 return 0;
7575 ;
7576 return 0;
7577}
7578_ACEOF
7579rm -f conftest.$ac_objext
7580if { (ac_try="$ac_compile"
7581case "(($ac_try" in
7582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7583 *) ac_try_echo=$ac_try;;
7584esac
7585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7586 (eval "$ac_compile") 2>conftest.er1
7587 ac_status=$?
7588 grep -v '^ *+' conftest.er1 >conftest.err
7589 rm -f conftest.er1
7590 cat conftest.err >&5
7591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7592 (exit $ac_status); } && {
7593 test -z "$ac_c_werror_flag" ||
7594 test ! -s conftest.err
7595 } && test -s conftest.$ac_objext; then
7596 ac_cv_type_int=yes
7597else
7598 echo "$as_me: failed program was:" >&5
7599sed 's/^/| /' conftest.$ac_ext >&5
7600
7601 ac_cv_type_int=no
7602fi
7603
7604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7605fi
7606{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7607echo "${ECHO_T}$ac_cv_type_int" >&6; }
7608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007609# The cast to long int works around a bug in the HP C Compiler
7610# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7611# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7612# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007613{ echo "$as_me:$LINENO: checking size of int" >&5
7614echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007615if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007616 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007617else
Martin v. Löwis11437992002-04-12 09:54:03 +00007618 if test "$cross_compiling" = yes; then
7619 # Depending upon the size, compute the lo and hi bounds.
7620cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007621/* confdefs.h. */
7622_ACEOF
7623cat confdefs.h >>conftest.$ac_ext
7624cat >>conftest.$ac_ext <<_ACEOF
7625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007626$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007627 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007628int
7629main ()
7630{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007631static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007632test_array [0] = 0
7633
7634 ;
7635 return 0;
7636}
7637_ACEOF
7638rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007639if { (ac_try="$ac_compile"
7640case "(($ac_try" in
7641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7642 *) ac_try_echo=$ac_try;;
7643esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007645 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007647 grep -v '^ *+' conftest.er1 >conftest.err
7648 rm -f conftest.er1
7649 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007651 (exit $ac_status); } && {
7652 test -z "$ac_c_werror_flag" ||
7653 test ! -s conftest.err
7654 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007655 ac_lo=0 ac_mid=0
7656 while :; do
7657 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007658/* confdefs.h. */
7659_ACEOF
7660cat confdefs.h >>conftest.$ac_ext
7661cat >>conftest.$ac_ext <<_ACEOF
7662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007663$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007664 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007665int
7666main ()
7667{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007668static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007669test_array [0] = 0
7670
7671 ;
7672 return 0;
7673}
7674_ACEOF
7675rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007676if { (ac_try="$ac_compile"
7677case "(($ac_try" in
7678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7679 *) ac_try_echo=$ac_try;;
7680esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007682 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007683 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007684 grep -v '^ *+' conftest.er1 >conftest.err
7685 rm -f conftest.er1
7686 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007688 (exit $ac_status); } && {
7689 test -z "$ac_c_werror_flag" ||
7690 test ! -s conftest.err
7691 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007692 ac_hi=$ac_mid; break
7693else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007695sed 's/^/| /' conftest.$ac_ext >&5
7696
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007697 ac_lo=`expr $ac_mid + 1`
7698 if test $ac_lo -le $ac_mid; then
7699 ac_lo= ac_hi=
7700 break
7701 fi
7702 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007704
7705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007706 done
7707else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007709sed 's/^/| /' conftest.$ac_ext >&5
7710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007712/* confdefs.h. */
7713_ACEOF
7714cat confdefs.h >>conftest.$ac_ext
7715cat >>conftest.$ac_ext <<_ACEOF
7716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007717$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007718 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007719int
7720main ()
7721{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007722static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007723test_array [0] = 0
7724
7725 ;
7726 return 0;
7727}
7728_ACEOF
7729rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007730if { (ac_try="$ac_compile"
7731case "(($ac_try" in
7732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7733 *) ac_try_echo=$ac_try;;
7734esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007736 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007737 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007738 grep -v '^ *+' conftest.er1 >conftest.err
7739 rm -f conftest.er1
7740 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007742 (exit $ac_status); } && {
7743 test -z "$ac_c_werror_flag" ||
7744 test ! -s conftest.err
7745 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007746 ac_hi=-1 ac_mid=-1
7747 while :; do
7748 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007749/* confdefs.h. */
7750_ACEOF
7751cat confdefs.h >>conftest.$ac_ext
7752cat >>conftest.$ac_ext <<_ACEOF
7753/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007754$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007755 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007756int
7757main ()
7758{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007759static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007760test_array [0] = 0
7761
7762 ;
7763 return 0;
7764}
7765_ACEOF
7766rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007767if { (ac_try="$ac_compile"
7768case "(($ac_try" in
7769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7770 *) ac_try_echo=$ac_try;;
7771esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007773 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007774 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007775 grep -v '^ *+' conftest.er1 >conftest.err
7776 rm -f conftest.er1
7777 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007779 (exit $ac_status); } && {
7780 test -z "$ac_c_werror_flag" ||
7781 test ! -s conftest.err
7782 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007783 ac_lo=$ac_mid; break
7784else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007786sed 's/^/| /' conftest.$ac_ext >&5
7787
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007788 ac_hi=`expr '(' $ac_mid ')' - 1`
7789 if test $ac_mid -le $ac_hi; then
7790 ac_lo= ac_hi=
7791 break
7792 fi
7793 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795
7796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007797 done
7798else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007800sed 's/^/| /' conftest.$ac_ext >&5
7801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007804
7805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007807
7808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007809# Binary search between lo and hi bounds.
7810while test "x$ac_lo" != "x$ac_hi"; do
7811 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007813/* confdefs.h. */
7814_ACEOF
7815cat confdefs.h >>conftest.$ac_ext
7816cat >>conftest.$ac_ext <<_ACEOF
7817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007818$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007819 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007820int
7821main ()
7822{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007823static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007824test_array [0] = 0
7825
7826 ;
7827 return 0;
7828}
7829_ACEOF
7830rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831if { (ac_try="$ac_compile"
7832case "(($ac_try" in
7833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7834 *) ac_try_echo=$ac_try;;
7835esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007837 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007839 grep -v '^ *+' conftest.er1 >conftest.err
7840 rm -f conftest.er1
7841 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843 (exit $ac_status); } && {
7844 test -z "$ac_c_werror_flag" ||
7845 test ! -s conftest.err
7846 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007847 ac_hi=$ac_mid
7848else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007850sed 's/^/| /' conftest.$ac_ext >&5
7851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007852 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007854
7855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007856done
7857case $ac_lo in
7858?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007860 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007861See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007862echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007863See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007864 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865 else
7866 ac_cv_sizeof_int=0
7867 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007868esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007869else
Martin v. Löwis11437992002-04-12 09:54:03 +00007870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007871/* confdefs.h. */
7872_ACEOF
7873cat confdefs.h >>conftest.$ac_ext
7874cat >>conftest.$ac_ext <<_ACEOF
7875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007876$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007877 typedef int ac__type_sizeof_;
7878static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7879static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007880#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007881#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007882int
7883main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007884{
Martin v. Löwis11437992002-04-12 09:54:03 +00007885
7886 FILE *f = fopen ("conftest.val", "w");
7887 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007888 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007889 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007890 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007892 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007893 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007894 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007895 }
7896 else
7897 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007898 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007899 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007900 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007901 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007902 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007903 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007904
7905 ;
7906 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007907}
Martin v. Löwis11437992002-04-12 09:54:03 +00007908_ACEOF
7909rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007910if { (ac_try="$ac_link"
7911case "(($ac_try" in
7912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7913 *) ac_try_echo=$ac_try;;
7914esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007916 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007917 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007919 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007920 { (case "(($ac_try" in
7921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7922 *) ac_try_echo=$ac_try;;
7923esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007925 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007926 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007928 (exit $ac_status); }; }; then
7929 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007930else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007931 echo "$as_me: program exited with status $ac_status" >&5
7932echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007933sed 's/^/| /' conftest.$ac_ext >&5
7934
Martin v. Löwis11437992002-04-12 09:54:03 +00007935( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007936if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007937 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007938See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007939echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007940See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007941 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942 else
7943 ac_cv_sizeof_int=0
7944 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007946rm -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 +00007947fi
7948rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007949fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007950{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7951echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007952
7953
7954
Martin v. Löwis11437992002-04-12 09:54:03 +00007955cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007956#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007957_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007958
7959
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007960{ echo "$as_me:$LINENO: checking for long" >&5
7961echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7962if test "${ac_cv_type_long+set}" = set; then
7963 echo $ECHO_N "(cached) $ECHO_C" >&6
7964else
7965 cat >conftest.$ac_ext <<_ACEOF
7966/* confdefs.h. */
7967_ACEOF
7968cat confdefs.h >>conftest.$ac_ext
7969cat >>conftest.$ac_ext <<_ACEOF
7970/* end confdefs.h. */
7971$ac_includes_default
7972typedef long ac__type_new_;
7973int
7974main ()
7975{
7976if ((ac__type_new_ *) 0)
7977 return 0;
7978if (sizeof (ac__type_new_))
7979 return 0;
7980 ;
7981 return 0;
7982}
7983_ACEOF
7984rm -f conftest.$ac_objext
7985if { (ac_try="$ac_compile"
7986case "(($ac_try" in
7987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7988 *) ac_try_echo=$ac_try;;
7989esac
7990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7991 (eval "$ac_compile") 2>conftest.er1
7992 ac_status=$?
7993 grep -v '^ *+' conftest.er1 >conftest.err
7994 rm -f conftest.er1
7995 cat conftest.err >&5
7996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7997 (exit $ac_status); } && {
7998 test -z "$ac_c_werror_flag" ||
7999 test ! -s conftest.err
8000 } && test -s conftest.$ac_objext; then
8001 ac_cv_type_long=yes
8002else
8003 echo "$as_me: failed program was:" >&5
8004sed 's/^/| /' conftest.$ac_ext >&5
8005
8006 ac_cv_type_long=no
8007fi
8008
8009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8010fi
8011{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
8012echo "${ECHO_T}$ac_cv_type_long" >&6; }
8013
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014# The cast to long int works around a bug in the HP C Compiler
8015# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8016# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8017# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008018{ echo "$as_me:$LINENO: checking size of long" >&5
8019echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008020if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008021 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008022else
Martin v. Löwis11437992002-04-12 09:54:03 +00008023 if test "$cross_compiling" = yes; then
8024 # Depending upon the size, compute the lo and hi bounds.
8025cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008026/* confdefs.h. */
8027_ACEOF
8028cat confdefs.h >>conftest.$ac_ext
8029cat >>conftest.$ac_ext <<_ACEOF
8030/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008031$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008032 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008033int
8034main ()
8035{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008036static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008037test_array [0] = 0
8038
8039 ;
8040 return 0;
8041}
8042_ACEOF
8043rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044if { (ac_try="$ac_compile"
8045case "(($ac_try" in
8046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8047 *) ac_try_echo=$ac_try;;
8048esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008050 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008052 grep -v '^ *+' conftest.er1 >conftest.err
8053 rm -f conftest.er1
8054 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056 (exit $ac_status); } && {
8057 test -z "$ac_c_werror_flag" ||
8058 test ! -s conftest.err
8059 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008060 ac_lo=0 ac_mid=0
8061 while :; do
8062 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008063/* confdefs.h. */
8064_ACEOF
8065cat confdefs.h >>conftest.$ac_ext
8066cat >>conftest.$ac_ext <<_ACEOF
8067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008068$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008069 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008070int
8071main ()
8072{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008073static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008074test_array [0] = 0
8075
8076 ;
8077 return 0;
8078}
8079_ACEOF
8080rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008081if { (ac_try="$ac_compile"
8082case "(($ac_try" in
8083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8084 *) ac_try_echo=$ac_try;;
8085esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008087 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008088 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008089 grep -v '^ *+' conftest.er1 >conftest.err
8090 rm -f conftest.er1
8091 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008093 (exit $ac_status); } && {
8094 test -z "$ac_c_werror_flag" ||
8095 test ! -s conftest.err
8096 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 ac_hi=$ac_mid; break
8098else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008100sed 's/^/| /' conftest.$ac_ext >&5
8101
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008102 ac_lo=`expr $ac_mid + 1`
8103 if test $ac_lo -le $ac_mid; then
8104 ac_lo= ac_hi=
8105 break
8106 fi
8107 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008109
8110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008111 done
8112else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008114sed 's/^/| /' conftest.$ac_ext >&5
8115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008117/* confdefs.h. */
8118_ACEOF
8119cat confdefs.h >>conftest.$ac_ext
8120cat >>conftest.$ac_ext <<_ACEOF
8121/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008122$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008123 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008124int
8125main ()
8126{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008127static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008128test_array [0] = 0
8129
8130 ;
8131 return 0;
8132}
8133_ACEOF
8134rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008135if { (ac_try="$ac_compile"
8136case "(($ac_try" in
8137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8138 *) ac_try_echo=$ac_try;;
8139esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008141 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008142 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008143 grep -v '^ *+' conftest.er1 >conftest.err
8144 rm -f conftest.er1
8145 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008147 (exit $ac_status); } && {
8148 test -z "$ac_c_werror_flag" ||
8149 test ! -s conftest.err
8150 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008151 ac_hi=-1 ac_mid=-1
8152 while :; do
8153 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008154/* confdefs.h. */
8155_ACEOF
8156cat confdefs.h >>conftest.$ac_ext
8157cat >>conftest.$ac_ext <<_ACEOF
8158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008159$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008160 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008161int
8162main ()
8163{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008164static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008165test_array [0] = 0
8166
8167 ;
8168 return 0;
8169}
8170_ACEOF
8171rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008172if { (ac_try="$ac_compile"
8173case "(($ac_try" in
8174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8175 *) ac_try_echo=$ac_try;;
8176esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008178 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008179 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008180 grep -v '^ *+' conftest.er1 >conftest.err
8181 rm -f conftest.er1
8182 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008184 (exit $ac_status); } && {
8185 test -z "$ac_c_werror_flag" ||
8186 test ! -s conftest.err
8187 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008188 ac_lo=$ac_mid; break
8189else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008190 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008191sed 's/^/| /' conftest.$ac_ext >&5
8192
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008193 ac_hi=`expr '(' $ac_mid ')' - 1`
8194 if test $ac_mid -le $ac_hi; then
8195 ac_lo= ac_hi=
8196 break
8197 fi
8198 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008200
8201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008202 done
8203else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008204 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008205sed 's/^/| /' conftest.$ac_ext >&5
8206
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008207 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008209
8210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212
8213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008214# Binary search between lo and hi bounds.
8215while test "x$ac_lo" != "x$ac_hi"; do
8216 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008218/* confdefs.h. */
8219_ACEOF
8220cat confdefs.h >>conftest.$ac_ext
8221cat >>conftest.$ac_ext <<_ACEOF
8222/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008223$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008224 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008225int
8226main ()
8227{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008228static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008229test_array [0] = 0
8230
8231 ;
8232 return 0;
8233}
8234_ACEOF
8235rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008236if { (ac_try="$ac_compile"
8237case "(($ac_try" in
8238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8239 *) ac_try_echo=$ac_try;;
8240esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008242 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008244 grep -v '^ *+' conftest.er1 >conftest.err
8245 rm -f conftest.er1
8246 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008248 (exit $ac_status); } && {
8249 test -z "$ac_c_werror_flag" ||
8250 test ! -s conftest.err
8251 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008252 ac_hi=$ac_mid
8253else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008255sed 's/^/| /' conftest.$ac_ext >&5
8256
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008257 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008259
8260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008261done
8262case $ac_lo in
8263?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008264'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008265 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008266See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008267echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008268See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008269 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008270 else
8271 ac_cv_sizeof_long=0
8272 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008273esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008274else
Martin v. Löwis11437992002-04-12 09:54:03 +00008275 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008276/* confdefs.h. */
8277_ACEOF
8278cat confdefs.h >>conftest.$ac_ext
8279cat >>conftest.$ac_ext <<_ACEOF
8280/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008281$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008282 typedef long ac__type_sizeof_;
8283static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8284static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008285#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008286#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008287int
8288main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008289{
Martin v. Löwis11437992002-04-12 09:54:03 +00008290
8291 FILE *f = fopen ("conftest.val", "w");
8292 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008293 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008294 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008295 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008296 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008297 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008298 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008299 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008300 }
8301 else
8302 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008303 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008304 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008305 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008306 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008307 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008308 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008309
8310 ;
8311 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008312}
Martin v. Löwis11437992002-04-12 09:54:03 +00008313_ACEOF
8314rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008315if { (ac_try="$ac_link"
8316case "(($ac_try" in
8317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8318 *) ac_try_echo=$ac_try;;
8319esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008321 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008322 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008324 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008325 { (case "(($ac_try" in
8326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8327 *) ac_try_echo=$ac_try;;
8328esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008330 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008331 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008333 (exit $ac_status); }; }; then
8334 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008335else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008336 echo "$as_me: program exited with status $ac_status" >&5
8337echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008338sed 's/^/| /' conftest.$ac_ext >&5
8339
Martin v. Löwis11437992002-04-12 09:54:03 +00008340( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008341if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008342 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008343See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008344echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008345See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008346 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008347 else
8348 ac_cv_sizeof_long=0
8349 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008351rm -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 +00008352fi
8353rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008354fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008355{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8356echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008357
8358
8359
Martin v. Löwis11437992002-04-12 09:54:03 +00008360cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008361#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008362_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008363
8364
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008365{ echo "$as_me:$LINENO: checking for void *" >&5
8366echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8367if test "${ac_cv_type_void_p+set}" = set; then
8368 echo $ECHO_N "(cached) $ECHO_C" >&6
8369else
8370 cat >conftest.$ac_ext <<_ACEOF
8371/* confdefs.h. */
8372_ACEOF
8373cat confdefs.h >>conftest.$ac_ext
8374cat >>conftest.$ac_ext <<_ACEOF
8375/* end confdefs.h. */
8376$ac_includes_default
8377typedef void * ac__type_new_;
8378int
8379main ()
8380{
8381if ((ac__type_new_ *) 0)
8382 return 0;
8383if (sizeof (ac__type_new_))
8384 return 0;
8385 ;
8386 return 0;
8387}
8388_ACEOF
8389rm -f conftest.$ac_objext
8390if { (ac_try="$ac_compile"
8391case "(($ac_try" in
8392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8393 *) ac_try_echo=$ac_try;;
8394esac
8395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8396 (eval "$ac_compile") 2>conftest.er1
8397 ac_status=$?
8398 grep -v '^ *+' conftest.er1 >conftest.err
8399 rm -f conftest.er1
8400 cat conftest.err >&5
8401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8402 (exit $ac_status); } && {
8403 test -z "$ac_c_werror_flag" ||
8404 test ! -s conftest.err
8405 } && test -s conftest.$ac_objext; then
8406 ac_cv_type_void_p=yes
8407else
8408 echo "$as_me: failed program was:" >&5
8409sed 's/^/| /' conftest.$ac_ext >&5
8410
8411 ac_cv_type_void_p=no
8412fi
8413
8414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8415fi
8416{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8417echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008419# The cast to long int works around a bug in the HP C Compiler
8420# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8421# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8422# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008423{ echo "$as_me:$LINENO: checking size of void *" >&5
8424echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008425if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008426 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008427else
Martin v. Löwis11437992002-04-12 09:54:03 +00008428 if test "$cross_compiling" = yes; then
8429 # Depending upon the size, compute the lo and hi bounds.
8430cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008431/* confdefs.h. */
8432_ACEOF
8433cat confdefs.h >>conftest.$ac_ext
8434cat >>conftest.$ac_ext <<_ACEOF
8435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008436$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008437 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008438int
8439main ()
8440{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008441static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008442test_array [0] = 0
8443
8444 ;
8445 return 0;
8446}
8447_ACEOF
8448rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449if { (ac_try="$ac_compile"
8450case "(($ac_try" in
8451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8452 *) ac_try_echo=$ac_try;;
8453esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008455 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008457 grep -v '^ *+' conftest.er1 >conftest.err
8458 rm -f conftest.er1
8459 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008461 (exit $ac_status); } && {
8462 test -z "$ac_c_werror_flag" ||
8463 test ! -s conftest.err
8464 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008465 ac_lo=0 ac_mid=0
8466 while :; do
8467 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008468/* confdefs.h. */
8469_ACEOF
8470cat confdefs.h >>conftest.$ac_ext
8471cat >>conftest.$ac_ext <<_ACEOF
8472/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008473$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008474 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008475int
8476main ()
8477{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008478static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008479test_array [0] = 0
8480
8481 ;
8482 return 0;
8483}
8484_ACEOF
8485rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486if { (ac_try="$ac_compile"
8487case "(($ac_try" in
8488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8489 *) ac_try_echo=$ac_try;;
8490esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008492 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008493 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008494 grep -v '^ *+' conftest.er1 >conftest.err
8495 rm -f conftest.er1
8496 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008498 (exit $ac_status); } && {
8499 test -z "$ac_c_werror_flag" ||
8500 test ! -s conftest.err
8501 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008502 ac_hi=$ac_mid; break
8503else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008505sed 's/^/| /' conftest.$ac_ext >&5
8506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507 ac_lo=`expr $ac_mid + 1`
8508 if test $ac_lo -le $ac_mid; then
8509 ac_lo= ac_hi=
8510 break
8511 fi
8512 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514
8515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008516 done
8517else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008519sed 's/^/| /' conftest.$ac_ext >&5
8520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008522/* confdefs.h. */
8523_ACEOF
8524cat confdefs.h >>conftest.$ac_ext
8525cat >>conftest.$ac_ext <<_ACEOF
8526/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008527$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008528 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008529int
8530main ()
8531{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008532static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008533test_array [0] = 0
8534
8535 ;
8536 return 0;
8537}
8538_ACEOF
8539rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008540if { (ac_try="$ac_compile"
8541case "(($ac_try" in
8542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8543 *) ac_try_echo=$ac_try;;
8544esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008546 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008548 grep -v '^ *+' conftest.er1 >conftest.err
8549 rm -f conftest.er1
8550 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008552 (exit $ac_status); } && {
8553 test -z "$ac_c_werror_flag" ||
8554 test ! -s conftest.err
8555 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008556 ac_hi=-1 ac_mid=-1
8557 while :; do
8558 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008559/* confdefs.h. */
8560_ACEOF
8561cat confdefs.h >>conftest.$ac_ext
8562cat >>conftest.$ac_ext <<_ACEOF
8563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008564$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008565 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008566int
8567main ()
8568{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008569static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008570test_array [0] = 0
8571
8572 ;
8573 return 0;
8574}
8575_ACEOF
8576rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008577if { (ac_try="$ac_compile"
8578case "(($ac_try" in
8579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8580 *) ac_try_echo=$ac_try;;
8581esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008583 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008584 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008585 grep -v '^ *+' conftest.er1 >conftest.err
8586 rm -f conftest.er1
8587 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008589 (exit $ac_status); } && {
8590 test -z "$ac_c_werror_flag" ||
8591 test ! -s conftest.err
8592 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008593 ac_lo=$ac_mid; break
8594else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008595 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008596sed 's/^/| /' conftest.$ac_ext >&5
8597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008598 ac_hi=`expr '(' $ac_mid ')' - 1`
8599 if test $ac_mid -le $ac_hi; then
8600 ac_lo= ac_hi=
8601 break
8602 fi
8603 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008605
8606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008607 done
8608else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008609 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008610sed 's/^/| /' conftest.$ac_ext >&5
8611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008614
8615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617
8618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008619# Binary search between lo and hi bounds.
8620while test "x$ac_lo" != "x$ac_hi"; do
8621 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8622 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008623/* confdefs.h. */
8624_ACEOF
8625cat confdefs.h >>conftest.$ac_ext
8626cat >>conftest.$ac_ext <<_ACEOF
8627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008628$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008629 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008630int
8631main ()
8632{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008633static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008634test_array [0] = 0
8635
8636 ;
8637 return 0;
8638}
8639_ACEOF
8640rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008641if { (ac_try="$ac_compile"
8642case "(($ac_try" in
8643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8644 *) ac_try_echo=$ac_try;;
8645esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008647 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008649 grep -v '^ *+' conftest.er1 >conftest.err
8650 rm -f conftest.er1
8651 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008653 (exit $ac_status); } && {
8654 test -z "$ac_c_werror_flag" ||
8655 test ! -s conftest.err
8656 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008657 ac_hi=$ac_mid
8658else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008660sed 's/^/| /' conftest.$ac_ext >&5
8661
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008662 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008664
8665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008666done
8667case $ac_lo in
8668?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008669'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008670 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008671See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008672echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008673See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008674 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675 else
8676 ac_cv_sizeof_void_p=0
8677 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008678esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008679else
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008681/* confdefs.h. */
8682_ACEOF
8683cat confdefs.h >>conftest.$ac_ext
8684cat >>conftest.$ac_ext <<_ACEOF
8685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008686$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008687 typedef void * ac__type_sizeof_;
8688static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8689static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008690#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008691#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008692int
8693main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008694{
Martin v. Löwis11437992002-04-12 09:54:03 +00008695
8696 FILE *f = fopen ("conftest.val", "w");
8697 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008698 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008699 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008701 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008702 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008703 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008704 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 }
8706 else
8707 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008708 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008709 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008710 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008711 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008712 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008713 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008714
8715 ;
8716 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008717}
Martin v. Löwis11437992002-04-12 09:54:03 +00008718_ACEOF
8719rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720if { (ac_try="$ac_link"
8721case "(($ac_try" in
8722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8723 *) ac_try_echo=$ac_try;;
8724esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008726 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008727 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008730 { (case "(($ac_try" in
8731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8732 *) ac_try_echo=$ac_try;;
8733esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008735 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008736 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008738 (exit $ac_status); }; }; then
8739 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008740else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008741 echo "$as_me: program exited with status $ac_status" >&5
8742echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008743sed 's/^/| /' conftest.$ac_ext >&5
8744
Martin v. Löwis11437992002-04-12 09:54:03 +00008745( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008746if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008747 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008748See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008749echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008750See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008751 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008752 else
8753 ac_cv_sizeof_void_p=0
8754 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008756rm -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 +00008757fi
8758rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008759fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008760{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8761echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008762
8763
8764
Martin v. Löwis11437992002-04-12 09:54:03 +00008765cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008766#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008767_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008768
8769
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008770{ echo "$as_me:$LINENO: checking for short" >&5
8771echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8772if test "${ac_cv_type_short+set}" = set; then
8773 echo $ECHO_N "(cached) $ECHO_C" >&6
8774else
8775 cat >conftest.$ac_ext <<_ACEOF
8776/* confdefs.h. */
8777_ACEOF
8778cat confdefs.h >>conftest.$ac_ext
8779cat >>conftest.$ac_ext <<_ACEOF
8780/* end confdefs.h. */
8781$ac_includes_default
8782typedef short ac__type_new_;
8783int
8784main ()
8785{
8786if ((ac__type_new_ *) 0)
8787 return 0;
8788if (sizeof (ac__type_new_))
8789 return 0;
8790 ;
8791 return 0;
8792}
8793_ACEOF
8794rm -f conftest.$ac_objext
8795if { (ac_try="$ac_compile"
8796case "(($ac_try" in
8797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8798 *) ac_try_echo=$ac_try;;
8799esac
8800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8801 (eval "$ac_compile") 2>conftest.er1
8802 ac_status=$?
8803 grep -v '^ *+' conftest.er1 >conftest.err
8804 rm -f conftest.er1
8805 cat conftest.err >&5
8806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8807 (exit $ac_status); } && {
8808 test -z "$ac_c_werror_flag" ||
8809 test ! -s conftest.err
8810 } && test -s conftest.$ac_objext; then
8811 ac_cv_type_short=yes
8812else
8813 echo "$as_me: failed program was:" >&5
8814sed 's/^/| /' conftest.$ac_ext >&5
8815
8816 ac_cv_type_short=no
8817fi
8818
8819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8820fi
8821{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8822echo "${ECHO_T}$ac_cv_type_short" >&6; }
8823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008824# The cast to long int works around a bug in the HP C Compiler
8825# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8826# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8827# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008828{ echo "$as_me:$LINENO: checking size of short" >&5
8829echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008830if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008831 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008832else
Martin v. Löwis11437992002-04-12 09:54:03 +00008833 if test "$cross_compiling" = yes; then
8834 # Depending upon the size, compute the lo and hi bounds.
8835cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008836/* confdefs.h. */
8837_ACEOF
8838cat confdefs.h >>conftest.$ac_ext
8839cat >>conftest.$ac_ext <<_ACEOF
8840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008841$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008842 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008843int
8844main ()
8845{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008846static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008847test_array [0] = 0
8848
8849 ;
8850 return 0;
8851}
8852_ACEOF
8853rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008854if { (ac_try="$ac_compile"
8855case "(($ac_try" in
8856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8857 *) ac_try_echo=$ac_try;;
8858esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008860 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008862 grep -v '^ *+' conftest.er1 >conftest.err
8863 rm -f conftest.er1
8864 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008866 (exit $ac_status); } && {
8867 test -z "$ac_c_werror_flag" ||
8868 test ! -s conftest.err
8869 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008870 ac_lo=0 ac_mid=0
8871 while :; do
8872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008873/* confdefs.h. */
8874_ACEOF
8875cat confdefs.h >>conftest.$ac_ext
8876cat >>conftest.$ac_ext <<_ACEOF
8877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008878$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008879 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008880int
8881main ()
8882{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008883static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008884test_array [0] = 0
8885
8886 ;
8887 return 0;
8888}
8889_ACEOF
8890rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008891if { (ac_try="$ac_compile"
8892case "(($ac_try" in
8893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8894 *) ac_try_echo=$ac_try;;
8895esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008897 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008899 grep -v '^ *+' conftest.er1 >conftest.err
8900 rm -f conftest.er1
8901 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008903 (exit $ac_status); } && {
8904 test -z "$ac_c_werror_flag" ||
8905 test ! -s conftest.err
8906 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008907 ac_hi=$ac_mid; break
8908else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008910sed 's/^/| /' conftest.$ac_ext >&5
8911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008912 ac_lo=`expr $ac_mid + 1`
8913 if test $ac_lo -le $ac_mid; then
8914 ac_lo= ac_hi=
8915 break
8916 fi
8917 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008919
8920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008921 done
8922else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008924sed 's/^/| /' conftest.$ac_ext >&5
8925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008926 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008927/* confdefs.h. */
8928_ACEOF
8929cat confdefs.h >>conftest.$ac_ext
8930cat >>conftest.$ac_ext <<_ACEOF
8931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008932$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008933 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008934int
8935main ()
8936{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008937static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008938test_array [0] = 0
8939
8940 ;
8941 return 0;
8942}
8943_ACEOF
8944rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008945if { (ac_try="$ac_compile"
8946case "(($ac_try" in
8947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8948 *) ac_try_echo=$ac_try;;
8949esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008953 grep -v '^ *+' conftest.er1 >conftest.err
8954 rm -f conftest.er1
8955 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008957 (exit $ac_status); } && {
8958 test -z "$ac_c_werror_flag" ||
8959 test ! -s conftest.err
8960 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008961 ac_hi=-1 ac_mid=-1
8962 while :; do
8963 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008964/* confdefs.h. */
8965_ACEOF
8966cat confdefs.h >>conftest.$ac_ext
8967cat >>conftest.$ac_ext <<_ACEOF
8968/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008969$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008970 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008971int
8972main ()
8973{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008974static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008975test_array [0] = 0
8976
8977 ;
8978 return 0;
8979}
8980_ACEOF
8981rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008982if { (ac_try="$ac_compile"
8983case "(($ac_try" in
8984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8985 *) ac_try_echo=$ac_try;;
8986esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008988 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008989 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008990 grep -v '^ *+' conftest.er1 >conftest.err
8991 rm -f conftest.er1
8992 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008994 (exit $ac_status); } && {
8995 test -z "$ac_c_werror_flag" ||
8996 test ! -s conftest.err
8997 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008998 ac_lo=$ac_mid; break
8999else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009000 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009001sed 's/^/| /' conftest.$ac_ext >&5
9002
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009003 ac_hi=`expr '(' $ac_mid ')' - 1`
9004 if test $ac_mid -le $ac_hi; then
9005 ac_lo= ac_hi=
9006 break
9007 fi
9008 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009010
9011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009012 done
9013else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009015sed 's/^/| /' conftest.$ac_ext >&5
9016
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009017 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009019
9020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009022
9023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009024# Binary search between lo and hi bounds.
9025while test "x$ac_lo" != "x$ac_hi"; do
9026 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009028/* confdefs.h. */
9029_ACEOF
9030cat confdefs.h >>conftest.$ac_ext
9031cat >>conftest.$ac_ext <<_ACEOF
9032/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009033$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009034 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009035int
9036main ()
9037{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009038static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009039test_array [0] = 0
9040
9041 ;
9042 return 0;
9043}
9044_ACEOF
9045rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009046if { (ac_try="$ac_compile"
9047case "(($ac_try" in
9048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9049 *) ac_try_echo=$ac_try;;
9050esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009052 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009054 grep -v '^ *+' conftest.er1 >conftest.err
9055 rm -f conftest.er1
9056 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009058 (exit $ac_status); } && {
9059 test -z "$ac_c_werror_flag" ||
9060 test ! -s conftest.err
9061 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009062 ac_hi=$ac_mid
9063else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009065sed 's/^/| /' conftest.$ac_ext >&5
9066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009067 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009069
9070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009071done
9072case $ac_lo in
9073?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009074'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009075 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009076See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009077echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009078See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009079 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009080 else
9081 ac_cv_sizeof_short=0
9082 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009083esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009084else
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009086/* confdefs.h. */
9087_ACEOF
9088cat confdefs.h >>conftest.$ac_ext
9089cat >>conftest.$ac_ext <<_ACEOF
9090/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009091$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009092 typedef short ac__type_sizeof_;
9093static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9094static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009095#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009096#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009097int
9098main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009099{
Martin v. Löwis11437992002-04-12 09:54:03 +00009100
9101 FILE *f = fopen ("conftest.val", "w");
9102 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009103 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009104 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009105 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009106 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009107 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009108 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009109 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 }
9111 else
9112 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009113 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009114 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009115 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009116 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009117 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009118 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009119
9120 ;
9121 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009122}
Martin v. Löwis11437992002-04-12 09:54:03 +00009123_ACEOF
9124rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009125if { (ac_try="$ac_link"
9126case "(($ac_try" in
9127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9128 *) ac_try_echo=$ac_try;;
9129esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009131 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009132 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009134 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009135 { (case "(($ac_try" in
9136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9137 *) ac_try_echo=$ac_try;;
9138esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009140 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009141 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009143 (exit $ac_status); }; }; then
9144 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009145else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009146 echo "$as_me: program exited with status $ac_status" >&5
9147echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009148sed 's/^/| /' conftest.$ac_ext >&5
9149
Martin v. Löwis11437992002-04-12 09:54:03 +00009150( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009151if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009152 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009153See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009154echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009155See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009156 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009157 else
9158 ac_cv_sizeof_short=0
9159 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009160fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009161rm -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 +00009162fi
9163rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009164fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009165{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9166echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009167
9168
9169
Martin v. Löwis11437992002-04-12 09:54:03 +00009170cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009171#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009172_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009173
9174
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009175{ echo "$as_me:$LINENO: checking for float" >&5
9176echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9177if test "${ac_cv_type_float+set}" = set; then
9178 echo $ECHO_N "(cached) $ECHO_C" >&6
9179else
9180 cat >conftest.$ac_ext <<_ACEOF
9181/* confdefs.h. */
9182_ACEOF
9183cat confdefs.h >>conftest.$ac_ext
9184cat >>conftest.$ac_ext <<_ACEOF
9185/* end confdefs.h. */
9186$ac_includes_default
9187typedef float ac__type_new_;
9188int
9189main ()
9190{
9191if ((ac__type_new_ *) 0)
9192 return 0;
9193if (sizeof (ac__type_new_))
9194 return 0;
9195 ;
9196 return 0;
9197}
9198_ACEOF
9199rm -f conftest.$ac_objext
9200if { (ac_try="$ac_compile"
9201case "(($ac_try" in
9202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9203 *) ac_try_echo=$ac_try;;
9204esac
9205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9206 (eval "$ac_compile") 2>conftest.er1
9207 ac_status=$?
9208 grep -v '^ *+' conftest.er1 >conftest.err
9209 rm -f conftest.er1
9210 cat conftest.err >&5
9211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9212 (exit $ac_status); } && {
9213 test -z "$ac_c_werror_flag" ||
9214 test ! -s conftest.err
9215 } && test -s conftest.$ac_objext; then
9216 ac_cv_type_float=yes
9217else
9218 echo "$as_me: failed program was:" >&5
9219sed 's/^/| /' conftest.$ac_ext >&5
9220
9221 ac_cv_type_float=no
9222fi
9223
9224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9225fi
9226{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9227echo "${ECHO_T}$ac_cv_type_float" >&6; }
9228
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009229# The cast to long int works around a bug in the HP C Compiler
9230# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9231# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9232# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009233{ echo "$as_me:$LINENO: checking size of float" >&5
9234echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009235if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009236 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009237else
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 if test "$cross_compiling" = yes; then
9239 # Depending upon the size, compute the lo and hi bounds.
9240cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009241/* confdefs.h. */
9242_ACEOF
9243cat confdefs.h >>conftest.$ac_ext
9244cat >>conftest.$ac_ext <<_ACEOF
9245/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009246$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009247 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009248int
9249main ()
9250{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009251static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009252test_array [0] = 0
9253
9254 ;
9255 return 0;
9256}
9257_ACEOF
9258rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009259if { (ac_try="$ac_compile"
9260case "(($ac_try" in
9261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9262 *) ac_try_echo=$ac_try;;
9263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009267 grep -v '^ *+' conftest.er1 >conftest.err
9268 rm -f conftest.er1
9269 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009271 (exit $ac_status); } && {
9272 test -z "$ac_c_werror_flag" ||
9273 test ! -s conftest.err
9274 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009275 ac_lo=0 ac_mid=0
9276 while :; do
9277 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009278/* confdefs.h. */
9279_ACEOF
9280cat confdefs.h >>conftest.$ac_ext
9281cat >>conftest.$ac_ext <<_ACEOF
9282/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009283$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009284 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009285int
9286main ()
9287{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009288static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009289test_array [0] = 0
9290
9291 ;
9292 return 0;
9293}
9294_ACEOF
9295rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009296if { (ac_try="$ac_compile"
9297case "(($ac_try" in
9298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9299 *) ac_try_echo=$ac_try;;
9300esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009302 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009304 grep -v '^ *+' conftest.er1 >conftest.err
9305 rm -f conftest.er1
9306 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009308 (exit $ac_status); } && {
9309 test -z "$ac_c_werror_flag" ||
9310 test ! -s conftest.err
9311 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009312 ac_hi=$ac_mid; break
9313else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009315sed 's/^/| /' conftest.$ac_ext >&5
9316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009317 ac_lo=`expr $ac_mid + 1`
9318 if test $ac_lo -le $ac_mid; then
9319 ac_lo= ac_hi=
9320 break
9321 fi
9322 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009324
9325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009326 done
9327else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009329sed 's/^/| /' conftest.$ac_ext >&5
9330
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009331 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009332/* confdefs.h. */
9333_ACEOF
9334cat confdefs.h >>conftest.$ac_ext
9335cat >>conftest.$ac_ext <<_ACEOF
9336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009337$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009338 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009339int
9340main ()
9341{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009342static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009343test_array [0] = 0
9344
9345 ;
9346 return 0;
9347}
9348_ACEOF
9349rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009350if { (ac_try="$ac_compile"
9351case "(($ac_try" in
9352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9353 *) ac_try_echo=$ac_try;;
9354esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009356 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009358 grep -v '^ *+' conftest.er1 >conftest.err
9359 rm -f conftest.er1
9360 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009362 (exit $ac_status); } && {
9363 test -z "$ac_c_werror_flag" ||
9364 test ! -s conftest.err
9365 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009366 ac_hi=-1 ac_mid=-1
9367 while :; do
9368 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009369/* confdefs.h. */
9370_ACEOF
9371cat confdefs.h >>conftest.$ac_ext
9372cat >>conftest.$ac_ext <<_ACEOF
9373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009374$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009375 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009376int
9377main ()
9378{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009379static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009380test_array [0] = 0
9381
9382 ;
9383 return 0;
9384}
9385_ACEOF
9386rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009387if { (ac_try="$ac_compile"
9388case "(($ac_try" in
9389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9390 *) ac_try_echo=$ac_try;;
9391esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009393 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009394 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009395 grep -v '^ *+' conftest.er1 >conftest.err
9396 rm -f conftest.er1
9397 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009399 (exit $ac_status); } && {
9400 test -z "$ac_c_werror_flag" ||
9401 test ! -s conftest.err
9402 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009403 ac_lo=$ac_mid; break
9404else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009405 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009406sed 's/^/| /' conftest.$ac_ext >&5
9407
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009408 ac_hi=`expr '(' $ac_mid ')' - 1`
9409 if test $ac_mid -le $ac_hi; then
9410 ac_lo= ac_hi=
9411 break
9412 fi
9413 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009415
9416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009417 done
9418else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009420sed 's/^/| /' conftest.$ac_ext >&5
9421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009422 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009424
9425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009427
9428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009429# Binary search between lo and hi bounds.
9430while test "x$ac_lo" != "x$ac_hi"; do
9431 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9432 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009433/* confdefs.h. */
9434_ACEOF
9435cat confdefs.h >>conftest.$ac_ext
9436cat >>conftest.$ac_ext <<_ACEOF
9437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009438$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009439 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009440int
9441main ()
9442{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009443static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009444test_array [0] = 0
9445
9446 ;
9447 return 0;
9448}
9449_ACEOF
9450rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009451if { (ac_try="$ac_compile"
9452case "(($ac_try" in
9453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9454 *) ac_try_echo=$ac_try;;
9455esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009457 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009459 grep -v '^ *+' conftest.er1 >conftest.err
9460 rm -f conftest.er1
9461 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009463 (exit $ac_status); } && {
9464 test -z "$ac_c_werror_flag" ||
9465 test ! -s conftest.err
9466 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009467 ac_hi=$ac_mid
9468else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009469 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009470sed 's/^/| /' conftest.$ac_ext >&5
9471
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009472 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009474
9475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009476done
9477case $ac_lo in
9478?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009479'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009480 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009481See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009482echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009483See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009484 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009485 else
9486 ac_cv_sizeof_float=0
9487 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009488esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009489else
Martin v. Löwis11437992002-04-12 09:54:03 +00009490 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009491/* confdefs.h. */
9492_ACEOF
9493cat confdefs.h >>conftest.$ac_ext
9494cat >>conftest.$ac_ext <<_ACEOF
9495/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009496$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009497 typedef float ac__type_sizeof_;
9498static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9499static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009500#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009501#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009502int
9503main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009504{
Martin v. Löwis11437992002-04-12 09:54:03 +00009505
9506 FILE *f = fopen ("conftest.val", "w");
9507 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009508 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009509 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009511 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009512 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009513 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009514 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009515 }
9516 else
9517 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009518 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009519 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009520 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009521 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009522 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009523 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009524
9525 ;
9526 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009527}
Martin v. Löwis11437992002-04-12 09:54:03 +00009528_ACEOF
9529rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009530if { (ac_try="$ac_link"
9531case "(($ac_try" in
9532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9533 *) ac_try_echo=$ac_try;;
9534esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009536 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009537 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009540 { (case "(($ac_try" in
9541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9542 *) ac_try_echo=$ac_try;;
9543esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009545 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009546 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009548 (exit $ac_status); }; }; then
9549 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009550else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009551 echo "$as_me: program exited with status $ac_status" >&5
9552echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009553sed 's/^/| /' conftest.$ac_ext >&5
9554
Martin v. Löwis11437992002-04-12 09:54:03 +00009555( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009556if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009557 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009558See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009559echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009560See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009561 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009562 else
9563 ac_cv_sizeof_float=0
9564 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009566rm -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 +00009567fi
9568rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009569fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009570{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9571echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009572
9573
9574
Martin v. Löwis11437992002-04-12 09:54:03 +00009575cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009576#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009577_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009578
9579
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009580{ echo "$as_me:$LINENO: checking for double" >&5
9581echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9582if test "${ac_cv_type_double+set}" = set; then
9583 echo $ECHO_N "(cached) $ECHO_C" >&6
9584else
9585 cat >conftest.$ac_ext <<_ACEOF
9586/* confdefs.h. */
9587_ACEOF
9588cat confdefs.h >>conftest.$ac_ext
9589cat >>conftest.$ac_ext <<_ACEOF
9590/* end confdefs.h. */
9591$ac_includes_default
9592typedef double ac__type_new_;
9593int
9594main ()
9595{
9596if ((ac__type_new_ *) 0)
9597 return 0;
9598if (sizeof (ac__type_new_))
9599 return 0;
9600 ;
9601 return 0;
9602}
9603_ACEOF
9604rm -f conftest.$ac_objext
9605if { (ac_try="$ac_compile"
9606case "(($ac_try" in
9607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9608 *) ac_try_echo=$ac_try;;
9609esac
9610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9611 (eval "$ac_compile") 2>conftest.er1
9612 ac_status=$?
9613 grep -v '^ *+' conftest.er1 >conftest.err
9614 rm -f conftest.er1
9615 cat conftest.err >&5
9616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9617 (exit $ac_status); } && {
9618 test -z "$ac_c_werror_flag" ||
9619 test ! -s conftest.err
9620 } && test -s conftest.$ac_objext; then
9621 ac_cv_type_double=yes
9622else
9623 echo "$as_me: failed program was:" >&5
9624sed 's/^/| /' conftest.$ac_ext >&5
9625
9626 ac_cv_type_double=no
9627fi
9628
9629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9630fi
9631{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9632echo "${ECHO_T}$ac_cv_type_double" >&6; }
9633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634# The cast to long int works around a bug in the HP C Compiler
9635# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9636# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9637# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009638{ echo "$as_me:$LINENO: checking size of double" >&5
9639echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009640if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009641 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009642else
Martin v. Löwis11437992002-04-12 09:54:03 +00009643 if test "$cross_compiling" = yes; then
9644 # Depending upon the size, compute the lo and hi bounds.
9645cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009646/* confdefs.h. */
9647_ACEOF
9648cat confdefs.h >>conftest.$ac_ext
9649cat >>conftest.$ac_ext <<_ACEOF
9650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009651$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009652 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009653int
9654main ()
9655{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009656static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009657test_array [0] = 0
9658
9659 ;
9660 return 0;
9661}
9662_ACEOF
9663rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009664if { (ac_try="$ac_compile"
9665case "(($ac_try" in
9666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9667 *) ac_try_echo=$ac_try;;
9668esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009672 grep -v '^ *+' conftest.er1 >conftest.err
9673 rm -f conftest.er1
9674 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009676 (exit $ac_status); } && {
9677 test -z "$ac_c_werror_flag" ||
9678 test ! -s conftest.err
9679 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 ac_lo=0 ac_mid=0
9681 while :; do
9682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009683/* confdefs.h. */
9684_ACEOF
9685cat confdefs.h >>conftest.$ac_ext
9686cat >>conftest.$ac_ext <<_ACEOF
9687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009688$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009689 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009690int
9691main ()
9692{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009693static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009694test_array [0] = 0
9695
9696 ;
9697 return 0;
9698}
9699_ACEOF
9700rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009701if { (ac_try="$ac_compile"
9702case "(($ac_try" in
9703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9704 *) ac_try_echo=$ac_try;;
9705esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009709 grep -v '^ *+' conftest.er1 >conftest.err
9710 rm -f conftest.er1
9711 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009713 (exit $ac_status); } && {
9714 test -z "$ac_c_werror_flag" ||
9715 test ! -s conftest.err
9716 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009717 ac_hi=$ac_mid; break
9718else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009720sed 's/^/| /' conftest.$ac_ext >&5
9721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009722 ac_lo=`expr $ac_mid + 1`
9723 if test $ac_lo -le $ac_mid; then
9724 ac_lo= ac_hi=
9725 break
9726 fi
9727 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009729
9730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 done
9732else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009734sed 's/^/| /' conftest.$ac_ext >&5
9735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009737/* confdefs.h. */
9738_ACEOF
9739cat confdefs.h >>conftest.$ac_ext
9740cat >>conftest.$ac_ext <<_ACEOF
9741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009742$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009743 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009744int
9745main ()
9746{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009747static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009748test_array [0] = 0
9749
9750 ;
9751 return 0;
9752}
9753_ACEOF
9754rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009755if { (ac_try="$ac_compile"
9756case "(($ac_try" in
9757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9758 *) ac_try_echo=$ac_try;;
9759esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009761 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009763 grep -v '^ *+' conftest.er1 >conftest.err
9764 rm -f conftest.er1
9765 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009767 (exit $ac_status); } && {
9768 test -z "$ac_c_werror_flag" ||
9769 test ! -s conftest.err
9770 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009771 ac_hi=-1 ac_mid=-1
9772 while :; do
9773 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009774/* confdefs.h. */
9775_ACEOF
9776cat confdefs.h >>conftest.$ac_ext
9777cat >>conftest.$ac_ext <<_ACEOF
9778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009779$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009780 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009781int
9782main ()
9783{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009784static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009785test_array [0] = 0
9786
9787 ;
9788 return 0;
9789}
9790_ACEOF
9791rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009792if { (ac_try="$ac_compile"
9793case "(($ac_try" in
9794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9795 *) ac_try_echo=$ac_try;;
9796esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009798 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009799 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009800 grep -v '^ *+' conftest.er1 >conftest.err
9801 rm -f conftest.er1
9802 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009804 (exit $ac_status); } && {
9805 test -z "$ac_c_werror_flag" ||
9806 test ! -s conftest.err
9807 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009808 ac_lo=$ac_mid; break
9809else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009811sed 's/^/| /' conftest.$ac_ext >&5
9812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009813 ac_hi=`expr '(' $ac_mid ')' - 1`
9814 if test $ac_mid -le $ac_hi; then
9815 ac_lo= ac_hi=
9816 break
9817 fi
9818 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009820
9821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009822 done
9823else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009825sed 's/^/| /' conftest.$ac_ext >&5
9826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009827 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009828fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009829
9830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832
9833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009834# Binary search between lo and hi bounds.
9835while test "x$ac_lo" != "x$ac_hi"; do
9836 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9837 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009838/* confdefs.h. */
9839_ACEOF
9840cat confdefs.h >>conftest.$ac_ext
9841cat >>conftest.$ac_ext <<_ACEOF
9842/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009843$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009844 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009845int
9846main ()
9847{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009848static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009849test_array [0] = 0
9850
9851 ;
9852 return 0;
9853}
9854_ACEOF
9855rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009856if { (ac_try="$ac_compile"
9857case "(($ac_try" in
9858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9859 *) ac_try_echo=$ac_try;;
9860esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009862 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009863 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009864 grep -v '^ *+' conftest.er1 >conftest.err
9865 rm -f conftest.er1
9866 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009868 (exit $ac_status); } && {
9869 test -z "$ac_c_werror_flag" ||
9870 test ! -s conftest.err
9871 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009872 ac_hi=$ac_mid
9873else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009874 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009875sed 's/^/| /' conftest.$ac_ext >&5
9876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009877 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009878fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009879
9880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009881done
9882case $ac_lo in
9883?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009884'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009885 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009886See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009887echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009888See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009889 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009890 else
9891 ac_cv_sizeof_double=0
9892 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009893esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009894else
Martin v. Löwis11437992002-04-12 09:54:03 +00009895 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009896/* confdefs.h. */
9897_ACEOF
9898cat confdefs.h >>conftest.$ac_ext
9899cat >>conftest.$ac_ext <<_ACEOF
9900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009901$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009902 typedef double ac__type_sizeof_;
9903static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9904static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009905#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009906#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009907int
9908main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009909{
Martin v. Löwis11437992002-04-12 09:54:03 +00009910
9911 FILE *f = fopen ("conftest.val", "w");
9912 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009913 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009914 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009915 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009916 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009917 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009918 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009919 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009920 }
9921 else
9922 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009923 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009924 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009925 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009926 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009927 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009928 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009929
9930 ;
9931 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009932}
Martin v. Löwis11437992002-04-12 09:54:03 +00009933_ACEOF
9934rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009935if { (ac_try="$ac_link"
9936case "(($ac_try" in
9937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9938 *) ac_try_echo=$ac_try;;
9939esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009941 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009942 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009944 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009945 { (case "(($ac_try" in
9946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9947 *) ac_try_echo=$ac_try;;
9948esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009950 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009951 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009953 (exit $ac_status); }; }; then
9954 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009955else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009956 echo "$as_me: program exited with status $ac_status" >&5
9957echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009958sed 's/^/| /' conftest.$ac_ext >&5
9959
Martin v. Löwis11437992002-04-12 09:54:03 +00009960( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009961if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009962 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009963See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009964echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009965See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009966 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009967 else
9968 ac_cv_sizeof_double=0
9969 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009971rm -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 +00009972fi
9973rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009974fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009975{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9976echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009977
9978
9979
Martin v. Löwis11437992002-04-12 09:54:03 +00009980cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009981#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009982_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009983
9984
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009985{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9986echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9987if test "${ac_cv_type_fpos_t+set}" = set; then
9988 echo $ECHO_N "(cached) $ECHO_C" >&6
9989else
9990 cat >conftest.$ac_ext <<_ACEOF
9991/* confdefs.h. */
9992_ACEOF
9993cat confdefs.h >>conftest.$ac_ext
9994cat >>conftest.$ac_ext <<_ACEOF
9995/* end confdefs.h. */
9996$ac_includes_default
9997typedef fpos_t ac__type_new_;
9998int
9999main ()
10000{
10001if ((ac__type_new_ *) 0)
10002 return 0;
10003if (sizeof (ac__type_new_))
10004 return 0;
10005 ;
10006 return 0;
10007}
10008_ACEOF
10009rm -f conftest.$ac_objext
10010if { (ac_try="$ac_compile"
10011case "(($ac_try" in
10012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10013 *) ac_try_echo=$ac_try;;
10014esac
10015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10016 (eval "$ac_compile") 2>conftest.er1
10017 ac_status=$?
10018 grep -v '^ *+' conftest.er1 >conftest.err
10019 rm -f conftest.er1
10020 cat conftest.err >&5
10021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10022 (exit $ac_status); } && {
10023 test -z "$ac_c_werror_flag" ||
10024 test ! -s conftest.err
10025 } && test -s conftest.$ac_objext; then
10026 ac_cv_type_fpos_t=yes
10027else
10028 echo "$as_me: failed program was:" >&5
10029sed 's/^/| /' conftest.$ac_ext >&5
10030
10031 ac_cv_type_fpos_t=no
10032fi
10033
10034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10035fi
10036{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10037echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010039# The cast to long int works around a bug in the HP C Compiler
10040# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10041# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10042# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010043{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10044echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010045if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010046 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010047else
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 if test "$cross_compiling" = yes; then
10049 # Depending upon the size, compute the lo and hi bounds.
10050cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010051/* confdefs.h. */
10052_ACEOF
10053cat confdefs.h >>conftest.$ac_ext
10054cat >>conftest.$ac_ext <<_ACEOF
10055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010056$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010057 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010058int
10059main ()
10060{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010061static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010062test_array [0] = 0
10063
10064 ;
10065 return 0;
10066}
10067_ACEOF
10068rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010069if { (ac_try="$ac_compile"
10070case "(($ac_try" in
10071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10072 *) ac_try_echo=$ac_try;;
10073esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010077 grep -v '^ *+' conftest.er1 >conftest.err
10078 rm -f conftest.er1
10079 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010081 (exit $ac_status); } && {
10082 test -z "$ac_c_werror_flag" ||
10083 test ! -s conftest.err
10084 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 ac_lo=0 ac_mid=0
10086 while :; do
10087 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010088/* confdefs.h. */
10089_ACEOF
10090cat confdefs.h >>conftest.$ac_ext
10091cat >>conftest.$ac_ext <<_ACEOF
10092/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010093$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010094 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010095int
10096main ()
10097{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010098static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010099test_array [0] = 0
10100
10101 ;
10102 return 0;
10103}
10104_ACEOF
10105rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010106if { (ac_try="$ac_compile"
10107case "(($ac_try" in
10108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10109 *) ac_try_echo=$ac_try;;
10110esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010112 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010114 grep -v '^ *+' conftest.er1 >conftest.err
10115 rm -f conftest.er1
10116 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010118 (exit $ac_status); } && {
10119 test -z "$ac_c_werror_flag" ||
10120 test ! -s conftest.err
10121 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010122 ac_hi=$ac_mid; break
10123else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010125sed 's/^/| /' conftest.$ac_ext >&5
10126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010127 ac_lo=`expr $ac_mid + 1`
10128 if test $ac_lo -le $ac_mid; then
10129 ac_lo= ac_hi=
10130 break
10131 fi
10132 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134
10135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 done
10137else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010139sed 's/^/| /' conftest.$ac_ext >&5
10140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010141 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010142/* confdefs.h. */
10143_ACEOF
10144cat confdefs.h >>conftest.$ac_ext
10145cat >>conftest.$ac_ext <<_ACEOF
10146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010147$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010148 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010149int
10150main ()
10151{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010152static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010153test_array [0] = 0
10154
10155 ;
10156 return 0;
10157}
10158_ACEOF
10159rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010160if { (ac_try="$ac_compile"
10161case "(($ac_try" in
10162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10163 *) ac_try_echo=$ac_try;;
10164esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010166 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010168 grep -v '^ *+' conftest.er1 >conftest.err
10169 rm -f conftest.er1
10170 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010172 (exit $ac_status); } && {
10173 test -z "$ac_c_werror_flag" ||
10174 test ! -s conftest.err
10175 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010176 ac_hi=-1 ac_mid=-1
10177 while :; do
10178 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010179/* confdefs.h. */
10180_ACEOF
10181cat confdefs.h >>conftest.$ac_ext
10182cat >>conftest.$ac_ext <<_ACEOF
10183/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010184$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010185 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010186int
10187main ()
10188{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010189static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010190test_array [0] = 0
10191
10192 ;
10193 return 0;
10194}
10195_ACEOF
10196rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010197if { (ac_try="$ac_compile"
10198case "(($ac_try" in
10199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10200 *) ac_try_echo=$ac_try;;
10201esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010203 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010204 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010205 grep -v '^ *+' conftest.er1 >conftest.err
10206 rm -f conftest.er1
10207 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010209 (exit $ac_status); } && {
10210 test -z "$ac_c_werror_flag" ||
10211 test ! -s conftest.err
10212 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010213 ac_lo=$ac_mid; break
10214else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010215 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010216sed 's/^/| /' conftest.$ac_ext >&5
10217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010218 ac_hi=`expr '(' $ac_mid ')' - 1`
10219 if test $ac_mid -le $ac_hi; then
10220 ac_lo= ac_hi=
10221 break
10222 fi
10223 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010225
10226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010227 done
10228else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010229 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010230sed 's/^/| /' conftest.$ac_ext >&5
10231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010232 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010234
10235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237
10238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010239# Binary search between lo and hi bounds.
10240while test "x$ac_lo" != "x$ac_hi"; do
10241 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010243/* confdefs.h. */
10244_ACEOF
10245cat confdefs.h >>conftest.$ac_ext
10246cat >>conftest.$ac_ext <<_ACEOF
10247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010248$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010249 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010250int
10251main ()
10252{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010253static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010254test_array [0] = 0
10255
10256 ;
10257 return 0;
10258}
10259_ACEOF
10260rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010261if { (ac_try="$ac_compile"
10262case "(($ac_try" in
10263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10264 *) ac_try_echo=$ac_try;;
10265esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010267 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010268 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010269 grep -v '^ *+' conftest.er1 >conftest.err
10270 rm -f conftest.er1
10271 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010273 (exit $ac_status); } && {
10274 test -z "$ac_c_werror_flag" ||
10275 test ! -s conftest.err
10276 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010277 ac_hi=$ac_mid
10278else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010280sed 's/^/| /' conftest.$ac_ext >&5
10281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010282 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010284
10285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010286done
10287case $ac_lo in
10288?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010289'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010290 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010291See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010292echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010293See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010294 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010295 else
10296 ac_cv_sizeof_fpos_t=0
10297 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010298esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010299else
Martin v. Löwis11437992002-04-12 09:54:03 +000010300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010301/* confdefs.h. */
10302_ACEOF
10303cat confdefs.h >>conftest.$ac_ext
10304cat >>conftest.$ac_ext <<_ACEOF
10305/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010306$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010307 typedef fpos_t ac__type_sizeof_;
10308static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10309static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010310#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010311#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010312int
10313main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010314{
Martin v. Löwis11437992002-04-12 09:54:03 +000010315
10316 FILE *f = fopen ("conftest.val", "w");
10317 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010318 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010319 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010320 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010321 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010322 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010323 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010324 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010325 }
10326 else
10327 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010328 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010329 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010330 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010331 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010332 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010333 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010334
10335 ;
10336 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010337}
Martin v. Löwis11437992002-04-12 09:54:03 +000010338_ACEOF
10339rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010340if { (ac_try="$ac_link"
10341case "(($ac_try" in
10342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10343 *) ac_try_echo=$ac_try;;
10344esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010346 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010347 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010350 { (case "(($ac_try" in
10351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10352 *) ac_try_echo=$ac_try;;
10353esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010355 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010356 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010358 (exit $ac_status); }; }; then
10359 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010360else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010361 echo "$as_me: program exited with status $ac_status" >&5
10362echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010363sed 's/^/| /' conftest.$ac_ext >&5
10364
Martin v. Löwis11437992002-04-12 09:54:03 +000010365( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010366if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010367 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010368See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010369echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010370See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010371 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010372 else
10373 ac_cv_sizeof_fpos_t=0
10374 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010376rm -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 +000010377fi
10378rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010379fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010380{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10381echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010382
10383
10384
Martin v. Löwis11437992002-04-12 09:54:03 +000010385cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010386#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010387_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010388
Michael W. Hudson54241132001-12-07 15:38:26 +000010389
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010390{ echo "$as_me:$LINENO: checking for size_t" >&5
10391echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10392if test "${ac_cv_type_size_t+set}" = set; then
10393 echo $ECHO_N "(cached) $ECHO_C" >&6
10394else
10395 cat >conftest.$ac_ext <<_ACEOF
10396/* confdefs.h. */
10397_ACEOF
10398cat confdefs.h >>conftest.$ac_ext
10399cat >>conftest.$ac_ext <<_ACEOF
10400/* end confdefs.h. */
10401$ac_includes_default
10402typedef size_t ac__type_new_;
10403int
10404main ()
10405{
10406if ((ac__type_new_ *) 0)
10407 return 0;
10408if (sizeof (ac__type_new_))
10409 return 0;
10410 ;
10411 return 0;
10412}
10413_ACEOF
10414rm -f conftest.$ac_objext
10415if { (ac_try="$ac_compile"
10416case "(($ac_try" in
10417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10418 *) ac_try_echo=$ac_try;;
10419esac
10420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10421 (eval "$ac_compile") 2>conftest.er1
10422 ac_status=$?
10423 grep -v '^ *+' conftest.er1 >conftest.err
10424 rm -f conftest.er1
10425 cat conftest.err >&5
10426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10427 (exit $ac_status); } && {
10428 test -z "$ac_c_werror_flag" ||
10429 test ! -s conftest.err
10430 } && test -s conftest.$ac_objext; then
10431 ac_cv_type_size_t=yes
10432else
10433 echo "$as_me: failed program was:" >&5
10434sed 's/^/| /' conftest.$ac_ext >&5
10435
10436 ac_cv_type_size_t=no
10437fi
10438
10439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10440fi
10441{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10442echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010444# The cast to long int works around a bug in the HP C Compiler
10445# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10446# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10447# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010448{ echo "$as_me:$LINENO: checking size of size_t" >&5
10449echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010450if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010451 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010452else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010453 if test "$cross_compiling" = yes; then
10454 # Depending upon the size, compute the lo and hi bounds.
10455cat >conftest.$ac_ext <<_ACEOF
10456/* confdefs.h. */
10457_ACEOF
10458cat confdefs.h >>conftest.$ac_ext
10459cat >>conftest.$ac_ext <<_ACEOF
10460/* end confdefs.h. */
10461$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010462 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010463int
10464main ()
10465{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010466static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010467test_array [0] = 0
10468
10469 ;
10470 return 0;
10471}
10472_ACEOF
10473rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010474if { (ac_try="$ac_compile"
10475case "(($ac_try" in
10476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10477 *) ac_try_echo=$ac_try;;
10478esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010480 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010481 ac_status=$?
10482 grep -v '^ *+' conftest.er1 >conftest.err
10483 rm -f conftest.er1
10484 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010486 (exit $ac_status); } && {
10487 test -z "$ac_c_werror_flag" ||
10488 test ! -s conftest.err
10489 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010490 ac_lo=0 ac_mid=0
10491 while :; do
10492 cat >conftest.$ac_ext <<_ACEOF
10493/* confdefs.h. */
10494_ACEOF
10495cat confdefs.h >>conftest.$ac_ext
10496cat >>conftest.$ac_ext <<_ACEOF
10497/* end confdefs.h. */
10498$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010499 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010500int
10501main ()
10502{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010503static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010504test_array [0] = 0
10505
10506 ;
10507 return 0;
10508}
10509_ACEOF
10510rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010511if { (ac_try="$ac_compile"
10512case "(($ac_try" in
10513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10514 *) ac_try_echo=$ac_try;;
10515esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010518 ac_status=$?
10519 grep -v '^ *+' conftest.er1 >conftest.err
10520 rm -f conftest.er1
10521 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010523 (exit $ac_status); } && {
10524 test -z "$ac_c_werror_flag" ||
10525 test ! -s conftest.err
10526 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010527 ac_hi=$ac_mid; break
10528else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010529 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010530sed 's/^/| /' conftest.$ac_ext >&5
10531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010532 ac_lo=`expr $ac_mid + 1`
10533 if test $ac_lo -le $ac_mid; then
10534 ac_lo= ac_hi=
10535 break
10536 fi
10537 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010539
10540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010541 done
10542else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010543 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010544sed 's/^/| /' conftest.$ac_ext >&5
10545
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010546 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010547/* confdefs.h. */
10548_ACEOF
10549cat confdefs.h >>conftest.$ac_ext
10550cat >>conftest.$ac_ext <<_ACEOF
10551/* end confdefs.h. */
10552$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010553 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010554int
10555main ()
10556{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010557static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010558test_array [0] = 0
10559
10560 ;
10561 return 0;
10562}
10563_ACEOF
10564rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010565if { (ac_try="$ac_compile"
10566case "(($ac_try" in
10567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10568 *) ac_try_echo=$ac_try;;
10569esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010571 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010572 ac_status=$?
10573 grep -v '^ *+' conftest.er1 >conftest.err
10574 rm -f conftest.er1
10575 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010577 (exit $ac_status); } && {
10578 test -z "$ac_c_werror_flag" ||
10579 test ! -s conftest.err
10580 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010581 ac_hi=-1 ac_mid=-1
10582 while :; do
10583 cat >conftest.$ac_ext <<_ACEOF
10584/* confdefs.h. */
10585_ACEOF
10586cat confdefs.h >>conftest.$ac_ext
10587cat >>conftest.$ac_ext <<_ACEOF
10588/* end confdefs.h. */
10589$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010590 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010591int
10592main ()
10593{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010594static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010595test_array [0] = 0
10596
10597 ;
10598 return 0;
10599}
10600_ACEOF
10601rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010602if { (ac_try="$ac_compile"
10603case "(($ac_try" in
10604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10605 *) ac_try_echo=$ac_try;;
10606esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010608 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010609 ac_status=$?
10610 grep -v '^ *+' conftest.er1 >conftest.err
10611 rm -f conftest.er1
10612 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010614 (exit $ac_status); } && {
10615 test -z "$ac_c_werror_flag" ||
10616 test ! -s conftest.err
10617 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010618 ac_lo=$ac_mid; break
10619else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010620 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010621sed 's/^/| /' conftest.$ac_ext >&5
10622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010623 ac_hi=`expr '(' $ac_mid ')' - 1`
10624 if test $ac_mid -le $ac_hi; then
10625 ac_lo= ac_hi=
10626 break
10627 fi
10628 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010630
10631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010632 done
10633else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010634 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010635sed 's/^/| /' conftest.$ac_ext >&5
10636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010639
10640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642
10643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010644# Binary search between lo and hi bounds.
10645while test "x$ac_lo" != "x$ac_hi"; do
10646 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10647 cat >conftest.$ac_ext <<_ACEOF
10648/* confdefs.h. */
10649_ACEOF
10650cat confdefs.h >>conftest.$ac_ext
10651cat >>conftest.$ac_ext <<_ACEOF
10652/* end confdefs.h. */
10653$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010654 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010655int
10656main ()
10657{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010658static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010659test_array [0] = 0
10660
10661 ;
10662 return 0;
10663}
10664_ACEOF
10665rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010666if { (ac_try="$ac_compile"
10667case "(($ac_try" in
10668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10669 *) ac_try_echo=$ac_try;;
10670esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010672 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010673 ac_status=$?
10674 grep -v '^ *+' conftest.er1 >conftest.err
10675 rm -f conftest.er1
10676 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010678 (exit $ac_status); } && {
10679 test -z "$ac_c_werror_flag" ||
10680 test ! -s conftest.err
10681 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010682 ac_hi=$ac_mid
10683else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010684 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010685sed 's/^/| /' conftest.$ac_ext >&5
10686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010687 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010689
10690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010691done
10692case $ac_lo in
10693?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010694'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010695 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010696See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010697echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010698See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010699 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010700 else
10701 ac_cv_sizeof_size_t=0
10702 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010703esac
10704else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010705 cat >conftest.$ac_ext <<_ACEOF
10706/* confdefs.h. */
10707_ACEOF
10708cat confdefs.h >>conftest.$ac_ext
10709cat >>conftest.$ac_ext <<_ACEOF
10710/* end confdefs.h. */
10711$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010712 typedef size_t ac__type_sizeof_;
10713static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10714static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010715#include <stdio.h>
10716#include <stdlib.h>
10717int
10718main ()
10719{
10720
10721 FILE *f = fopen ("conftest.val", "w");
10722 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010723 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010724 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010725 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010726 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010727 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010728 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010729 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010730 }
10731 else
10732 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010733 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010734 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010735 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010736 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010737 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010738 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010739
10740 ;
10741 return 0;
10742}
10743_ACEOF
10744rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010745if { (ac_try="$ac_link"
10746case "(($ac_try" in
10747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10748 *) ac_try_echo=$ac_try;;
10749esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010751 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010752 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010754 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010755 { (case "(($ac_try" in
10756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10757 *) ac_try_echo=$ac_try;;
10758esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010760 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010761 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010763 (exit $ac_status); }; }; then
10764 ac_cv_sizeof_size_t=`cat conftest.val`
10765else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010766 echo "$as_me: program exited with status $ac_status" >&5
10767echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010768sed 's/^/| /' conftest.$ac_ext >&5
10769
10770( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010771if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010772 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010773See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010774echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010775See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010776 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010777 else
10778 ac_cv_sizeof_size_t=0
10779 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010781rm -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 +000010782fi
10783rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010784fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010785{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10786echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010787
10788
10789
Martin v. Löwis18e16552006-02-15 17:27:45 +000010790cat >>confdefs.h <<_ACEOF
10791#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10792_ACEOF
10793
10794
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010795{ echo "$as_me:$LINENO: checking for pid_t" >&5
10796echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10797if test "${ac_cv_type_pid_t+set}" = set; then
10798 echo $ECHO_N "(cached) $ECHO_C" >&6
10799else
10800 cat >conftest.$ac_ext <<_ACEOF
10801/* confdefs.h. */
10802_ACEOF
10803cat confdefs.h >>conftest.$ac_ext
10804cat >>conftest.$ac_ext <<_ACEOF
10805/* end confdefs.h. */
10806$ac_includes_default
10807typedef pid_t ac__type_new_;
10808int
10809main ()
10810{
10811if ((ac__type_new_ *) 0)
10812 return 0;
10813if (sizeof (ac__type_new_))
10814 return 0;
10815 ;
10816 return 0;
10817}
10818_ACEOF
10819rm -f conftest.$ac_objext
10820if { (ac_try="$ac_compile"
10821case "(($ac_try" in
10822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10823 *) ac_try_echo=$ac_try;;
10824esac
10825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10826 (eval "$ac_compile") 2>conftest.er1
10827 ac_status=$?
10828 grep -v '^ *+' conftest.er1 >conftest.err
10829 rm -f conftest.er1
10830 cat conftest.err >&5
10831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10832 (exit $ac_status); } && {
10833 test -z "$ac_c_werror_flag" ||
10834 test ! -s conftest.err
10835 } && test -s conftest.$ac_objext; then
10836 ac_cv_type_pid_t=yes
10837else
10838 echo "$as_me: failed program was:" >&5
10839sed 's/^/| /' conftest.$ac_ext >&5
10840
10841 ac_cv_type_pid_t=no
10842fi
10843
10844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10845fi
10846{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10847echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10848
Christian Heimes400adb02008-02-01 08:12:03 +000010849# The cast to long int works around a bug in the HP C Compiler
10850# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10851# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10852# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010853{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10854echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010855if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010856 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010857else
10858 if test "$cross_compiling" = yes; then
10859 # Depending upon the size, compute the lo and hi bounds.
10860cat >conftest.$ac_ext <<_ACEOF
10861/* confdefs.h. */
10862_ACEOF
10863cat confdefs.h >>conftest.$ac_ext
10864cat >>conftest.$ac_ext <<_ACEOF
10865/* end confdefs.h. */
10866$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010867 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010868int
10869main ()
10870{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010871static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010872test_array [0] = 0
10873
10874 ;
10875 return 0;
10876}
10877_ACEOF
10878rm -f conftest.$ac_objext
10879if { (ac_try="$ac_compile"
10880case "(($ac_try" in
10881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10882 *) ac_try_echo=$ac_try;;
10883esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010885 (eval "$ac_compile") 2>conftest.er1
10886 ac_status=$?
10887 grep -v '^ *+' conftest.er1 >conftest.err
10888 rm -f conftest.er1
10889 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010891 (exit $ac_status); } && {
10892 test -z "$ac_c_werror_flag" ||
10893 test ! -s conftest.err
10894 } && test -s conftest.$ac_objext; then
10895 ac_lo=0 ac_mid=0
10896 while :; do
10897 cat >conftest.$ac_ext <<_ACEOF
10898/* confdefs.h. */
10899_ACEOF
10900cat confdefs.h >>conftest.$ac_ext
10901cat >>conftest.$ac_ext <<_ACEOF
10902/* end confdefs.h. */
10903$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010904 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010905int
10906main ()
10907{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010908static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010909test_array [0] = 0
10910
10911 ;
10912 return 0;
10913}
10914_ACEOF
10915rm -f conftest.$ac_objext
10916if { (ac_try="$ac_compile"
10917case "(($ac_try" in
10918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10919 *) ac_try_echo=$ac_try;;
10920esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010922 (eval "$ac_compile") 2>conftest.er1
10923 ac_status=$?
10924 grep -v '^ *+' conftest.er1 >conftest.err
10925 rm -f conftest.er1
10926 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010928 (exit $ac_status); } && {
10929 test -z "$ac_c_werror_flag" ||
10930 test ! -s conftest.err
10931 } && test -s conftest.$ac_objext; then
10932 ac_hi=$ac_mid; break
10933else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010934 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010935sed 's/^/| /' conftest.$ac_ext >&5
10936
10937 ac_lo=`expr $ac_mid + 1`
10938 if test $ac_lo -le $ac_mid; then
10939 ac_lo= ac_hi=
10940 break
10941 fi
10942 ac_mid=`expr 2 '*' $ac_mid + 1`
10943fi
10944
10945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10946 done
10947else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010948 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010949sed 's/^/| /' conftest.$ac_ext >&5
10950
10951 cat >conftest.$ac_ext <<_ACEOF
10952/* confdefs.h. */
10953_ACEOF
10954cat confdefs.h >>conftest.$ac_ext
10955cat >>conftest.$ac_ext <<_ACEOF
10956/* end confdefs.h. */
10957$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010958 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010959int
10960main ()
10961{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010962static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010963test_array [0] = 0
10964
10965 ;
10966 return 0;
10967}
10968_ACEOF
10969rm -f conftest.$ac_objext
10970if { (ac_try="$ac_compile"
10971case "(($ac_try" in
10972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10973 *) ac_try_echo=$ac_try;;
10974esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010976 (eval "$ac_compile") 2>conftest.er1
10977 ac_status=$?
10978 grep -v '^ *+' conftest.er1 >conftest.err
10979 rm -f conftest.er1
10980 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010982 (exit $ac_status); } && {
10983 test -z "$ac_c_werror_flag" ||
10984 test ! -s conftest.err
10985 } && test -s conftest.$ac_objext; then
10986 ac_hi=-1 ac_mid=-1
10987 while :; do
10988 cat >conftest.$ac_ext <<_ACEOF
10989/* confdefs.h. */
10990_ACEOF
10991cat confdefs.h >>conftest.$ac_ext
10992cat >>conftest.$ac_ext <<_ACEOF
10993/* end confdefs.h. */
10994$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010995 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010996int
10997main ()
10998{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010999static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011000test_array [0] = 0
11001
11002 ;
11003 return 0;
11004}
11005_ACEOF
11006rm -f conftest.$ac_objext
11007if { (ac_try="$ac_compile"
11008case "(($ac_try" in
11009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11010 *) ac_try_echo=$ac_try;;
11011esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011013 (eval "$ac_compile") 2>conftest.er1
11014 ac_status=$?
11015 grep -v '^ *+' conftest.er1 >conftest.err
11016 rm -f conftest.er1
11017 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011019 (exit $ac_status); } && {
11020 test -z "$ac_c_werror_flag" ||
11021 test ! -s conftest.err
11022 } && test -s conftest.$ac_objext; then
11023 ac_lo=$ac_mid; break
11024else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011025 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011026sed 's/^/| /' conftest.$ac_ext >&5
11027
11028 ac_hi=`expr '(' $ac_mid ')' - 1`
11029 if test $ac_mid -le $ac_hi; then
11030 ac_lo= ac_hi=
11031 break
11032 fi
11033 ac_mid=`expr 2 '*' $ac_mid`
11034fi
11035
11036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11037 done
11038else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011039 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011040sed 's/^/| /' conftest.$ac_ext >&5
11041
11042 ac_lo= ac_hi=
11043fi
11044
11045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11046fi
11047
11048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11049# Binary search between lo and hi bounds.
11050while test "x$ac_lo" != "x$ac_hi"; do
11051 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11052 cat >conftest.$ac_ext <<_ACEOF
11053/* confdefs.h. */
11054_ACEOF
11055cat confdefs.h >>conftest.$ac_ext
11056cat >>conftest.$ac_ext <<_ACEOF
11057/* end confdefs.h. */
11058$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011059 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000011060int
11061main ()
11062{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011063static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011064test_array [0] = 0
11065
11066 ;
11067 return 0;
11068}
11069_ACEOF
11070rm -f conftest.$ac_objext
11071if { (ac_try="$ac_compile"
11072case "(($ac_try" in
11073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11074 *) ac_try_echo=$ac_try;;
11075esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011077 (eval "$ac_compile") 2>conftest.er1
11078 ac_status=$?
11079 grep -v '^ *+' conftest.er1 >conftest.err
11080 rm -f conftest.er1
11081 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011083 (exit $ac_status); } && {
11084 test -z "$ac_c_werror_flag" ||
11085 test ! -s conftest.err
11086 } && test -s conftest.$ac_objext; then
11087 ac_hi=$ac_mid
11088else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011089 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011090sed 's/^/| /' conftest.$ac_ext >&5
11091
11092 ac_lo=`expr '(' $ac_mid ')' + 1`
11093fi
11094
11095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11096done
11097case $ac_lo in
11098?*) ac_cv_sizeof_pid_t=$ac_lo;;
11099'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011100 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011101See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011102echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011103See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011104 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011105 else
11106 ac_cv_sizeof_pid_t=0
11107 fi ;;
11108esac
11109else
11110 cat >conftest.$ac_ext <<_ACEOF
11111/* confdefs.h. */
11112_ACEOF
11113cat confdefs.h >>conftest.$ac_ext
11114cat >>conftest.$ac_ext <<_ACEOF
11115/* end confdefs.h. */
11116$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011117 typedef pid_t ac__type_sizeof_;
11118static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11119static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011120#include <stdio.h>
11121#include <stdlib.h>
11122int
11123main ()
11124{
11125
11126 FILE *f = fopen ("conftest.val", "w");
11127 if (! f)
11128 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011129 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011130 {
11131 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011132 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011133 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011134 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011135 }
11136 else
11137 {
11138 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011139 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011140 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011141 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011142 }
11143 return ferror (f) || fclose (f) != 0;
11144
11145 ;
11146 return 0;
11147}
11148_ACEOF
11149rm -f conftest$ac_exeext
11150if { (ac_try="$ac_link"
11151case "(($ac_try" in
11152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11153 *) ac_try_echo=$ac_try;;
11154esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011156 (eval "$ac_link") 2>&5
11157 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011159 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11160 { (case "(($ac_try" in
11161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11162 *) ac_try_echo=$ac_try;;
11163esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011165 (eval "$ac_try") 2>&5
11166 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011168 (exit $ac_status); }; }; then
11169 ac_cv_sizeof_pid_t=`cat conftest.val`
11170else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011171 echo "$as_me: program exited with status $ac_status" >&5
11172echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011173sed 's/^/| /' conftest.$ac_ext >&5
11174
11175( exit $ac_status )
11176if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011177 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011178See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011179echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011180See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011181 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011182 else
11183 ac_cv_sizeof_pid_t=0
11184 fi
11185fi
11186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11187fi
11188rm -f conftest.val
11189fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011190{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11191echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011192
11193
11194
11195cat >>confdefs.h <<_ACEOF
11196#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11197_ACEOF
11198
11199
Michael W. Hudson54241132001-12-07 15:38:26 +000011200
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011201{ echo "$as_me:$LINENO: checking for long long support" >&5
11202echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011203have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011204cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011205/* confdefs.h. */
11206_ACEOF
11207cat confdefs.h >>conftest.$ac_ext
11208cat >>conftest.$ac_ext <<_ACEOF
11209/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011210
Martin v. Löwis11437992002-04-12 09:54:03 +000011211int
11212main ()
11213{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011214long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011215 ;
11216 return 0;
11217}
11218_ACEOF
11219rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011220if { (ac_try="$ac_compile"
11221case "(($ac_try" in
11222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11223 *) ac_try_echo=$ac_try;;
11224esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011226 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011227 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011228 grep -v '^ *+' conftest.er1 >conftest.err
11229 rm -f conftest.er1
11230 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011232 (exit $ac_status); } && {
11233 test -z "$ac_c_werror_flag" ||
11234 test ! -s conftest.err
11235 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011236
11237
11238cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011239#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011240_ACEOF
11241
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011242 have_long_long=yes
11243
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011244else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011245 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011246sed 's/^/| /' conftest.$ac_ext >&5
11247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011248
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011249fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011250
11251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011252{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11253echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011254if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011255{ echo "$as_me:$LINENO: checking for long long" >&5
11256echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11257if test "${ac_cv_type_long_long+set}" = set; then
11258 echo $ECHO_N "(cached) $ECHO_C" >&6
11259else
11260 cat >conftest.$ac_ext <<_ACEOF
11261/* confdefs.h. */
11262_ACEOF
11263cat confdefs.h >>conftest.$ac_ext
11264cat >>conftest.$ac_ext <<_ACEOF
11265/* end confdefs.h. */
11266$ac_includes_default
11267typedef long long ac__type_new_;
11268int
11269main ()
11270{
11271if ((ac__type_new_ *) 0)
11272 return 0;
11273if (sizeof (ac__type_new_))
11274 return 0;
11275 ;
11276 return 0;
11277}
11278_ACEOF
11279rm -f conftest.$ac_objext
11280if { (ac_try="$ac_compile"
11281case "(($ac_try" in
11282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11283 *) ac_try_echo=$ac_try;;
11284esac
11285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11286 (eval "$ac_compile") 2>conftest.er1
11287 ac_status=$?
11288 grep -v '^ *+' conftest.er1 >conftest.err
11289 rm -f conftest.er1
11290 cat conftest.err >&5
11291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11292 (exit $ac_status); } && {
11293 test -z "$ac_c_werror_flag" ||
11294 test ! -s conftest.err
11295 } && test -s conftest.$ac_objext; then
11296 ac_cv_type_long_long=yes
11297else
11298 echo "$as_me: failed program was:" >&5
11299sed 's/^/| /' conftest.$ac_ext >&5
11300
11301 ac_cv_type_long_long=no
11302fi
11303
11304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11305fi
11306{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11307echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011309# The cast to long int works around a bug in the HP C Compiler
11310# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11311# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11312# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011313{ echo "$as_me:$LINENO: checking size of long long" >&5
11314echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011315if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011316 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011317else
Martin v. Löwis11437992002-04-12 09:54:03 +000011318 if test "$cross_compiling" = yes; then
11319 # Depending upon the size, compute the lo and hi bounds.
11320cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011321/* confdefs.h. */
11322_ACEOF
11323cat confdefs.h >>conftest.$ac_ext
11324cat >>conftest.$ac_ext <<_ACEOF
11325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011326$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011327 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011328int
11329main ()
11330{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011331static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011332test_array [0] = 0
11333
11334 ;
11335 return 0;
11336}
11337_ACEOF
11338rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011339if { (ac_try="$ac_compile"
11340case "(($ac_try" in
11341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11342 *) ac_try_echo=$ac_try;;
11343esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011345 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011347 grep -v '^ *+' conftest.er1 >conftest.err
11348 rm -f conftest.er1
11349 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011351 (exit $ac_status); } && {
11352 test -z "$ac_c_werror_flag" ||
11353 test ! -s conftest.err
11354 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011355 ac_lo=0 ac_mid=0
11356 while :; do
11357 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011358/* confdefs.h. */
11359_ACEOF
11360cat confdefs.h >>conftest.$ac_ext
11361cat >>conftest.$ac_ext <<_ACEOF
11362/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011363$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011364 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011365int
11366main ()
11367{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011368static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011369test_array [0] = 0
11370
11371 ;
11372 return 0;
11373}
11374_ACEOF
11375rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011376if { (ac_try="$ac_compile"
11377case "(($ac_try" in
11378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11379 *) ac_try_echo=$ac_try;;
11380esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011382 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011384 grep -v '^ *+' conftest.er1 >conftest.err
11385 rm -f conftest.er1
11386 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011388 (exit $ac_status); } && {
11389 test -z "$ac_c_werror_flag" ||
11390 test ! -s conftest.err
11391 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011392 ac_hi=$ac_mid; break
11393else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011395sed 's/^/| /' conftest.$ac_ext >&5
11396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011397 ac_lo=`expr $ac_mid + 1`
11398 if test $ac_lo -le $ac_mid; then
11399 ac_lo= ac_hi=
11400 break
11401 fi
11402 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011404
11405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011406 done
11407else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011409sed 's/^/| /' conftest.$ac_ext >&5
11410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011411 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011412/* confdefs.h. */
11413_ACEOF
11414cat confdefs.h >>conftest.$ac_ext
11415cat >>conftest.$ac_ext <<_ACEOF
11416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011417$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011418 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011419int
11420main ()
11421{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011422static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011423test_array [0] = 0
11424
11425 ;
11426 return 0;
11427}
11428_ACEOF
11429rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011430if { (ac_try="$ac_compile"
11431case "(($ac_try" in
11432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11433 *) ac_try_echo=$ac_try;;
11434esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011436 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011437 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011438 grep -v '^ *+' conftest.er1 >conftest.err
11439 rm -f conftest.er1
11440 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011442 (exit $ac_status); } && {
11443 test -z "$ac_c_werror_flag" ||
11444 test ! -s conftest.err
11445 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011446 ac_hi=-1 ac_mid=-1
11447 while :; do
11448 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011449/* confdefs.h. */
11450_ACEOF
11451cat confdefs.h >>conftest.$ac_ext
11452cat >>conftest.$ac_ext <<_ACEOF
11453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011454$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011455 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011456int
11457main ()
11458{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011459static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011460test_array [0] = 0
11461
11462 ;
11463 return 0;
11464}
11465_ACEOF
11466rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011467if { (ac_try="$ac_compile"
11468case "(($ac_try" in
11469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11470 *) ac_try_echo=$ac_try;;
11471esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011473 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011474 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011475 grep -v '^ *+' conftest.er1 >conftest.err
11476 rm -f conftest.er1
11477 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011479 (exit $ac_status); } && {
11480 test -z "$ac_c_werror_flag" ||
11481 test ! -s conftest.err
11482 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011483 ac_lo=$ac_mid; break
11484else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011486sed 's/^/| /' conftest.$ac_ext >&5
11487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011488 ac_hi=`expr '(' $ac_mid ')' - 1`
11489 if test $ac_mid -le $ac_hi; then
11490 ac_lo= ac_hi=
11491 break
11492 fi
11493 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011495
11496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011497 done
11498else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011500sed 's/^/| /' conftest.$ac_ext >&5
11501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011502 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011504
11505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507
11508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011509# Binary search between lo and hi bounds.
11510while test "x$ac_lo" != "x$ac_hi"; do
11511 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011513/* confdefs.h. */
11514_ACEOF
11515cat confdefs.h >>conftest.$ac_ext
11516cat >>conftest.$ac_ext <<_ACEOF
11517/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011518$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011519 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011520int
11521main ()
11522{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011523static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011524test_array [0] = 0
11525
11526 ;
11527 return 0;
11528}
11529_ACEOF
11530rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011531if { (ac_try="$ac_compile"
11532case "(($ac_try" in
11533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11534 *) ac_try_echo=$ac_try;;
11535esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011537 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011539 grep -v '^ *+' conftest.er1 >conftest.err
11540 rm -f conftest.er1
11541 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011543 (exit $ac_status); } && {
11544 test -z "$ac_c_werror_flag" ||
11545 test ! -s conftest.err
11546 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011547 ac_hi=$ac_mid
11548else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011550sed 's/^/| /' conftest.$ac_ext >&5
11551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011552 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011554
11555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011556done
11557case $ac_lo in
11558?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011559'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011560 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011561See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011562echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011563See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011564 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011565 else
11566 ac_cv_sizeof_long_long=0
11567 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011568esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011569else
Martin v. Löwis11437992002-04-12 09:54:03 +000011570 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011571/* confdefs.h. */
11572_ACEOF
11573cat confdefs.h >>conftest.$ac_ext
11574cat >>conftest.$ac_ext <<_ACEOF
11575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011576$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011577 typedef long long ac__type_sizeof_;
11578static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11579static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011580#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011581#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011582int
11583main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011584{
Martin v. Löwis11437992002-04-12 09:54:03 +000011585
11586 FILE *f = fopen ("conftest.val", "w");
11587 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011588 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011589 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011590 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011591 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011592 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011593 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011594 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011595 }
11596 else
11597 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011598 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011599 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011600 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011601 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011602 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011603 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011604
11605 ;
11606 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011607}
Martin v. Löwis11437992002-04-12 09:54:03 +000011608_ACEOF
11609rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011610if { (ac_try="$ac_link"
11611case "(($ac_try" in
11612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11613 *) ac_try_echo=$ac_try;;
11614esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011616 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011617 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011619 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011620 { (case "(($ac_try" in
11621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11622 *) ac_try_echo=$ac_try;;
11623esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011625 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011626 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011628 (exit $ac_status); }; }; then
11629 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011630else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011631 echo "$as_me: program exited with status $ac_status" >&5
11632echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011633sed 's/^/| /' conftest.$ac_ext >&5
11634
Martin v. Löwis11437992002-04-12 09:54:03 +000011635( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011636if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011637 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011638See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011639echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011640See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011641 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011642 else
11643 ac_cv_sizeof_long_long=0
11644 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011646rm -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 +000011647fi
11648rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011649fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011650{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11651echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011652
11653
11654
Martin v. Löwis11437992002-04-12 09:54:03 +000011655cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011656#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011657_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011658
Michael W. Hudson54241132001-12-07 15:38:26 +000011659
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011660fi
11661
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011662{ echo "$as_me:$LINENO: checking for long double support" >&5
11663echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011664have_long_double=no
11665cat >conftest.$ac_ext <<_ACEOF
11666/* confdefs.h. */
11667_ACEOF
11668cat confdefs.h >>conftest.$ac_ext
11669cat >>conftest.$ac_ext <<_ACEOF
11670/* end confdefs.h. */
11671
11672int
11673main ()
11674{
11675long double x; x = (long double)0;
11676 ;
11677 return 0;
11678}
11679_ACEOF
11680rm -f conftest.$ac_objext
11681if { (ac_try="$ac_compile"
11682case "(($ac_try" in
11683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11684 *) ac_try_echo=$ac_try;;
11685esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011687 (eval "$ac_compile") 2>conftest.er1
11688 ac_status=$?
11689 grep -v '^ *+' conftest.er1 >conftest.err
11690 rm -f conftest.er1
11691 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011693 (exit $ac_status); } && {
11694 test -z "$ac_c_werror_flag" ||
11695 test ! -s conftest.err
11696 } && test -s conftest.$ac_objext; then
11697
11698
11699cat >>confdefs.h <<\_ACEOF
11700#define HAVE_LONG_DOUBLE 1
11701_ACEOF
11702
11703 have_long_double=yes
11704
11705else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011706 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011707sed 's/^/| /' conftest.$ac_ext >&5
11708
11709
11710fi
11711
11712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011713{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11714echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011715if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011716{ echo "$as_me:$LINENO: checking for long double" >&5
11717echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11718if test "${ac_cv_type_long_double+set}" = set; then
11719 echo $ECHO_N "(cached) $ECHO_C" >&6
11720else
11721 cat >conftest.$ac_ext <<_ACEOF
11722/* confdefs.h. */
11723_ACEOF
11724cat confdefs.h >>conftest.$ac_ext
11725cat >>conftest.$ac_ext <<_ACEOF
11726/* end confdefs.h. */
11727$ac_includes_default
11728typedef long double ac__type_new_;
11729int
11730main ()
11731{
11732if ((ac__type_new_ *) 0)
11733 return 0;
11734if (sizeof (ac__type_new_))
11735 return 0;
11736 ;
11737 return 0;
11738}
11739_ACEOF
11740rm -f conftest.$ac_objext
11741if { (ac_try="$ac_compile"
11742case "(($ac_try" in
11743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11744 *) ac_try_echo=$ac_try;;
11745esac
11746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11747 (eval "$ac_compile") 2>conftest.er1
11748 ac_status=$?
11749 grep -v '^ *+' conftest.er1 >conftest.err
11750 rm -f conftest.er1
11751 cat conftest.err >&5
11752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11753 (exit $ac_status); } && {
11754 test -z "$ac_c_werror_flag" ||
11755 test ! -s conftest.err
11756 } && test -s conftest.$ac_objext; then
11757 ac_cv_type_long_double=yes
11758else
11759 echo "$as_me: failed program was:" >&5
11760sed 's/^/| /' conftest.$ac_ext >&5
11761
11762 ac_cv_type_long_double=no
11763fi
11764
11765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11766fi
11767{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11768echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11769
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011770# The cast to long int works around a bug in the HP C Compiler
11771# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11772# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11773# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011774{ echo "$as_me:$LINENO: checking size of long double" >&5
11775echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011776if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011777 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011778else
11779 if test "$cross_compiling" = yes; then
11780 # Depending upon the size, compute the lo and hi bounds.
11781cat >conftest.$ac_ext <<_ACEOF
11782/* confdefs.h. */
11783_ACEOF
11784cat confdefs.h >>conftest.$ac_ext
11785cat >>conftest.$ac_ext <<_ACEOF
11786/* end confdefs.h. */
11787$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011788 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011789int
11790main ()
11791{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011792static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011793test_array [0] = 0
11794
11795 ;
11796 return 0;
11797}
11798_ACEOF
11799rm -f conftest.$ac_objext
11800if { (ac_try="$ac_compile"
11801case "(($ac_try" in
11802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11803 *) ac_try_echo=$ac_try;;
11804esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011806 (eval "$ac_compile") 2>conftest.er1
11807 ac_status=$?
11808 grep -v '^ *+' conftest.er1 >conftest.err
11809 rm -f conftest.er1
11810 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011812 (exit $ac_status); } && {
11813 test -z "$ac_c_werror_flag" ||
11814 test ! -s conftest.err
11815 } && test -s conftest.$ac_objext; then
11816 ac_lo=0 ac_mid=0
11817 while :; do
11818 cat >conftest.$ac_ext <<_ACEOF
11819/* confdefs.h. */
11820_ACEOF
11821cat confdefs.h >>conftest.$ac_ext
11822cat >>conftest.$ac_ext <<_ACEOF
11823/* end confdefs.h. */
11824$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011825 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011826int
11827main ()
11828{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011829static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011830test_array [0] = 0
11831
11832 ;
11833 return 0;
11834}
11835_ACEOF
11836rm -f conftest.$ac_objext
11837if { (ac_try="$ac_compile"
11838case "(($ac_try" in
11839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11840 *) ac_try_echo=$ac_try;;
11841esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011843 (eval "$ac_compile") 2>conftest.er1
11844 ac_status=$?
11845 grep -v '^ *+' conftest.er1 >conftest.err
11846 rm -f conftest.er1
11847 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011849 (exit $ac_status); } && {
11850 test -z "$ac_c_werror_flag" ||
11851 test ! -s conftest.err
11852 } && test -s conftest.$ac_objext; then
11853 ac_hi=$ac_mid; break
11854else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011855 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011856sed 's/^/| /' conftest.$ac_ext >&5
11857
11858 ac_lo=`expr $ac_mid + 1`
11859 if test $ac_lo -le $ac_mid; then
11860 ac_lo= ac_hi=
11861 break
11862 fi
11863 ac_mid=`expr 2 '*' $ac_mid + 1`
11864fi
11865
11866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11867 done
11868else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011869 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011870sed 's/^/| /' conftest.$ac_ext >&5
11871
11872 cat >conftest.$ac_ext <<_ACEOF
11873/* confdefs.h. */
11874_ACEOF
11875cat confdefs.h >>conftest.$ac_ext
11876cat >>conftest.$ac_ext <<_ACEOF
11877/* end confdefs.h. */
11878$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011879 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011880int
11881main ()
11882{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011883static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011884test_array [0] = 0
11885
11886 ;
11887 return 0;
11888}
11889_ACEOF
11890rm -f conftest.$ac_objext
11891if { (ac_try="$ac_compile"
11892case "(($ac_try" in
11893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11894 *) ac_try_echo=$ac_try;;
11895esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011897 (eval "$ac_compile") 2>conftest.er1
11898 ac_status=$?
11899 grep -v '^ *+' conftest.er1 >conftest.err
11900 rm -f conftest.er1
11901 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011903 (exit $ac_status); } && {
11904 test -z "$ac_c_werror_flag" ||
11905 test ! -s conftest.err
11906 } && test -s conftest.$ac_objext; then
11907 ac_hi=-1 ac_mid=-1
11908 while :; do
11909 cat >conftest.$ac_ext <<_ACEOF
11910/* confdefs.h. */
11911_ACEOF
11912cat confdefs.h >>conftest.$ac_ext
11913cat >>conftest.$ac_ext <<_ACEOF
11914/* end confdefs.h. */
11915$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011916 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011917int
11918main ()
11919{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011920static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011921test_array [0] = 0
11922
11923 ;
11924 return 0;
11925}
11926_ACEOF
11927rm -f conftest.$ac_objext
11928if { (ac_try="$ac_compile"
11929case "(($ac_try" in
11930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11931 *) ac_try_echo=$ac_try;;
11932esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011934 (eval "$ac_compile") 2>conftest.er1
11935 ac_status=$?
11936 grep -v '^ *+' conftest.er1 >conftest.err
11937 rm -f conftest.er1
11938 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011940 (exit $ac_status); } && {
11941 test -z "$ac_c_werror_flag" ||
11942 test ! -s conftest.err
11943 } && test -s conftest.$ac_objext; then
11944 ac_lo=$ac_mid; break
11945else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011946 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011947sed 's/^/| /' conftest.$ac_ext >&5
11948
11949 ac_hi=`expr '(' $ac_mid ')' - 1`
11950 if test $ac_mid -le $ac_hi; then
11951 ac_lo= ac_hi=
11952 break
11953 fi
11954 ac_mid=`expr 2 '*' $ac_mid`
11955fi
11956
11957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11958 done
11959else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011960 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011961sed 's/^/| /' conftest.$ac_ext >&5
11962
11963 ac_lo= ac_hi=
11964fi
11965
11966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11967fi
11968
11969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11970# Binary search between lo and hi bounds.
11971while test "x$ac_lo" != "x$ac_hi"; do
11972 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11973 cat >conftest.$ac_ext <<_ACEOF
11974/* confdefs.h. */
11975_ACEOF
11976cat confdefs.h >>conftest.$ac_ext
11977cat >>conftest.$ac_ext <<_ACEOF
11978/* end confdefs.h. */
11979$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011980 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011981int
11982main ()
11983{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011984static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011985test_array [0] = 0
11986
11987 ;
11988 return 0;
11989}
11990_ACEOF
11991rm -f conftest.$ac_objext
11992if { (ac_try="$ac_compile"
11993case "(($ac_try" in
11994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11995 *) ac_try_echo=$ac_try;;
11996esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011998 (eval "$ac_compile") 2>conftest.er1
11999 ac_status=$?
12000 grep -v '^ *+' conftest.er1 >conftest.err
12001 rm -f conftest.er1
12002 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012004 (exit $ac_status); } && {
12005 test -z "$ac_c_werror_flag" ||
12006 test ! -s conftest.err
12007 } && test -s conftest.$ac_objext; then
12008 ac_hi=$ac_mid
12009else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012010 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012011sed 's/^/| /' conftest.$ac_ext >&5
12012
12013 ac_lo=`expr '(' $ac_mid ')' + 1`
12014fi
12015
12016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12017done
12018case $ac_lo in
12019?*) ac_cv_sizeof_long_double=$ac_lo;;
12020'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012021 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012022See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012023echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012024See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012025 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012026 else
12027 ac_cv_sizeof_long_double=0
12028 fi ;;
12029esac
12030else
12031 cat >conftest.$ac_ext <<_ACEOF
12032/* confdefs.h. */
12033_ACEOF
12034cat confdefs.h >>conftest.$ac_ext
12035cat >>conftest.$ac_ext <<_ACEOF
12036/* end confdefs.h. */
12037$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012038 typedef long double ac__type_sizeof_;
12039static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12040static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012041#include <stdio.h>
12042#include <stdlib.h>
12043int
12044main ()
12045{
12046
12047 FILE *f = fopen ("conftest.val", "w");
12048 if (! f)
12049 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012050 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012051 {
12052 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012053 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012054 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012055 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012056 }
12057 else
12058 {
12059 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012060 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012061 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012062 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012063 }
12064 return ferror (f) || fclose (f) != 0;
12065
12066 ;
12067 return 0;
12068}
12069_ACEOF
12070rm -f conftest$ac_exeext
12071if { (ac_try="$ac_link"
12072case "(($ac_try" in
12073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12074 *) ac_try_echo=$ac_try;;
12075esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012077 (eval "$ac_link") 2>&5
12078 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012080 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12081 { (case "(($ac_try" in
12082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12083 *) ac_try_echo=$ac_try;;
12084esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012086 (eval "$ac_try") 2>&5
12087 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012089 (exit $ac_status); }; }; then
12090 ac_cv_sizeof_long_double=`cat conftest.val`
12091else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012092 echo "$as_me: program exited with status $ac_status" >&5
12093echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012094sed 's/^/| /' conftest.$ac_ext >&5
12095
12096( exit $ac_status )
12097if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012098 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012099See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012100echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012101See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012102 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012103 else
12104 ac_cv_sizeof_long_double=0
12105 fi
12106fi
12107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12108fi
12109rm -f conftest.val
12110fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012111{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12112echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012113
12114
12115
12116cat >>confdefs.h <<_ACEOF
12117#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12118_ACEOF
12119
12120
12121fi
12122
12123
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012124{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12125echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012126have_c99_bool=no
12127cat >conftest.$ac_ext <<_ACEOF
12128/* confdefs.h. */
12129_ACEOF
12130cat confdefs.h >>conftest.$ac_ext
12131cat >>conftest.$ac_ext <<_ACEOF
12132/* end confdefs.h. */
12133
12134int
12135main ()
12136{
12137_Bool x; x = (_Bool)0;
12138 ;
12139 return 0;
12140}
12141_ACEOF
12142rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012143if { (ac_try="$ac_compile"
12144case "(($ac_try" in
12145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12146 *) ac_try_echo=$ac_try;;
12147esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012149 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012150 ac_status=$?
12151 grep -v '^ *+' conftest.er1 >conftest.err
12152 rm -f conftest.er1
12153 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012155 (exit $ac_status); } && {
12156 test -z "$ac_c_werror_flag" ||
12157 test ! -s conftest.err
12158 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012159
12160
12161cat >>confdefs.h <<\_ACEOF
12162#define HAVE_C99_BOOL 1
12163_ACEOF
12164
12165 have_c99_bool=yes
12166
12167else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012168 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012169sed 's/^/| /' conftest.$ac_ext >&5
12170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012171
Thomas Woutersb2137042007-02-01 18:02:27 +000012172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012173
12174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012175{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12176echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012177if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012178{ echo "$as_me:$LINENO: checking for _Bool" >&5
12179echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12180if test "${ac_cv_type__Bool+set}" = set; then
12181 echo $ECHO_N "(cached) $ECHO_C" >&6
12182else
12183 cat >conftest.$ac_ext <<_ACEOF
12184/* confdefs.h. */
12185_ACEOF
12186cat confdefs.h >>conftest.$ac_ext
12187cat >>conftest.$ac_ext <<_ACEOF
12188/* end confdefs.h. */
12189$ac_includes_default
12190typedef _Bool ac__type_new_;
12191int
12192main ()
12193{
12194if ((ac__type_new_ *) 0)
12195 return 0;
12196if (sizeof (ac__type_new_))
12197 return 0;
12198 ;
12199 return 0;
12200}
12201_ACEOF
12202rm -f conftest.$ac_objext
12203if { (ac_try="$ac_compile"
12204case "(($ac_try" in
12205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12206 *) ac_try_echo=$ac_try;;
12207esac
12208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12209 (eval "$ac_compile") 2>conftest.er1
12210 ac_status=$?
12211 grep -v '^ *+' conftest.er1 >conftest.err
12212 rm -f conftest.er1
12213 cat conftest.err >&5
12214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12215 (exit $ac_status); } && {
12216 test -z "$ac_c_werror_flag" ||
12217 test ! -s conftest.err
12218 } && test -s conftest.$ac_objext; then
12219 ac_cv_type__Bool=yes
12220else
12221 echo "$as_me: failed program was:" >&5
12222sed 's/^/| /' conftest.$ac_ext >&5
12223
12224 ac_cv_type__Bool=no
12225fi
12226
12227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12228fi
12229{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12230echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012232# The cast to long int works around a bug in the HP C Compiler
12233# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12234# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12235# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012236{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12237echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012238if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012239 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012240else
12241 if test "$cross_compiling" = yes; then
12242 # Depending upon the size, compute the lo and hi bounds.
12243cat >conftest.$ac_ext <<_ACEOF
12244/* confdefs.h. */
12245_ACEOF
12246cat confdefs.h >>conftest.$ac_ext
12247cat >>conftest.$ac_ext <<_ACEOF
12248/* end confdefs.h. */
12249$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012250 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012251int
12252main ()
12253{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012254static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012255test_array [0] = 0
12256
12257 ;
12258 return 0;
12259}
12260_ACEOF
12261rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012262if { (ac_try="$ac_compile"
12263case "(($ac_try" in
12264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12265 *) ac_try_echo=$ac_try;;
12266esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012268 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012269 ac_status=$?
12270 grep -v '^ *+' conftest.er1 >conftest.err
12271 rm -f conftest.er1
12272 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012274 (exit $ac_status); } && {
12275 test -z "$ac_c_werror_flag" ||
12276 test ! -s conftest.err
12277 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012278 ac_lo=0 ac_mid=0
12279 while :; do
12280 cat >conftest.$ac_ext <<_ACEOF
12281/* confdefs.h. */
12282_ACEOF
12283cat confdefs.h >>conftest.$ac_ext
12284cat >>conftest.$ac_ext <<_ACEOF
12285/* end confdefs.h. */
12286$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012287 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012288int
12289main ()
12290{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012291static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012292test_array [0] = 0
12293
12294 ;
12295 return 0;
12296}
12297_ACEOF
12298rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012299if { (ac_try="$ac_compile"
12300case "(($ac_try" in
12301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12302 *) ac_try_echo=$ac_try;;
12303esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012305 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012306 ac_status=$?
12307 grep -v '^ *+' conftest.er1 >conftest.err
12308 rm -f conftest.er1
12309 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012311 (exit $ac_status); } && {
12312 test -z "$ac_c_werror_flag" ||
12313 test ! -s conftest.err
12314 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012315 ac_hi=$ac_mid; break
12316else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012317 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012318sed 's/^/| /' conftest.$ac_ext >&5
12319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012320 ac_lo=`expr $ac_mid + 1`
12321 if test $ac_lo -le $ac_mid; then
12322 ac_lo= ac_hi=
12323 break
12324 fi
12325 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012327
12328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012329 done
12330else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012331 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012332sed 's/^/| /' conftest.$ac_ext >&5
12333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012334 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012335/* confdefs.h. */
12336_ACEOF
12337cat confdefs.h >>conftest.$ac_ext
12338cat >>conftest.$ac_ext <<_ACEOF
12339/* end confdefs.h. */
12340$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012341 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012342int
12343main ()
12344{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012345static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012346test_array [0] = 0
12347
12348 ;
12349 return 0;
12350}
12351_ACEOF
12352rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012353if { (ac_try="$ac_compile"
12354case "(($ac_try" in
12355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12356 *) ac_try_echo=$ac_try;;
12357esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012359 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012360 ac_status=$?
12361 grep -v '^ *+' conftest.er1 >conftest.err
12362 rm -f conftest.er1
12363 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012365 (exit $ac_status); } && {
12366 test -z "$ac_c_werror_flag" ||
12367 test ! -s conftest.err
12368 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012369 ac_hi=-1 ac_mid=-1
12370 while :; do
12371 cat >conftest.$ac_ext <<_ACEOF
12372/* confdefs.h. */
12373_ACEOF
12374cat confdefs.h >>conftest.$ac_ext
12375cat >>conftest.$ac_ext <<_ACEOF
12376/* end confdefs.h. */
12377$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012378 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012379int
12380main ()
12381{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012382static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012383test_array [0] = 0
12384
12385 ;
12386 return 0;
12387}
12388_ACEOF
12389rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012390if { (ac_try="$ac_compile"
12391case "(($ac_try" in
12392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12393 *) ac_try_echo=$ac_try;;
12394esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012396 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012397 ac_status=$?
12398 grep -v '^ *+' conftest.er1 >conftest.err
12399 rm -f conftest.er1
12400 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012402 (exit $ac_status); } && {
12403 test -z "$ac_c_werror_flag" ||
12404 test ! -s conftest.err
12405 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012406 ac_lo=$ac_mid; break
12407else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012408 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012409sed 's/^/| /' conftest.$ac_ext >&5
12410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012411 ac_hi=`expr '(' $ac_mid ')' - 1`
12412 if test $ac_mid -le $ac_hi; then
12413 ac_lo= ac_hi=
12414 break
12415 fi
12416 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012418
12419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012420 done
12421else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012422 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012423sed 's/^/| /' conftest.$ac_ext >&5
12424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012425 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012427
12428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430
12431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012432# Binary search between lo and hi bounds.
12433while test "x$ac_lo" != "x$ac_hi"; do
12434 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12435 cat >conftest.$ac_ext <<_ACEOF
12436/* confdefs.h. */
12437_ACEOF
12438cat confdefs.h >>conftest.$ac_ext
12439cat >>conftest.$ac_ext <<_ACEOF
12440/* end confdefs.h. */
12441$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012442 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012443int
12444main ()
12445{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012446static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012447test_array [0] = 0
12448
12449 ;
12450 return 0;
12451}
12452_ACEOF
12453rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012454if { (ac_try="$ac_compile"
12455case "(($ac_try" in
12456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12457 *) ac_try_echo=$ac_try;;
12458esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012460 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012461 ac_status=$?
12462 grep -v '^ *+' conftest.er1 >conftest.err
12463 rm -f conftest.er1
12464 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012466 (exit $ac_status); } && {
12467 test -z "$ac_c_werror_flag" ||
12468 test ! -s conftest.err
12469 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012470 ac_hi=$ac_mid
12471else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012472 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012473sed 's/^/| /' conftest.$ac_ext >&5
12474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012475 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012477
12478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012479done
12480case $ac_lo in
12481?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012482'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012483 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012484See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012485echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012486See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012487 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012488 else
12489 ac_cv_sizeof__Bool=0
12490 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012491esac
12492else
12493 cat >conftest.$ac_ext <<_ACEOF
12494/* confdefs.h. */
12495_ACEOF
12496cat confdefs.h >>conftest.$ac_ext
12497cat >>conftest.$ac_ext <<_ACEOF
12498/* end confdefs.h. */
12499$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012500 typedef _Bool ac__type_sizeof_;
12501static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12502static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012503#include <stdio.h>
12504#include <stdlib.h>
12505int
12506main ()
12507{
12508
12509 FILE *f = fopen ("conftest.val", "w");
12510 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012511 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012512 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012513 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012514 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012515 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012516 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012517 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012518 }
12519 else
12520 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012521 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012522 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012523 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012524 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012525 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012526 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012527
12528 ;
12529 return 0;
12530}
12531_ACEOF
12532rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012533if { (ac_try="$ac_link"
12534case "(($ac_try" in
12535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12536 *) ac_try_echo=$ac_try;;
12537esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012539 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012540 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012542 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012543 { (case "(($ac_try" in
12544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12545 *) ac_try_echo=$ac_try;;
12546esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012548 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012549 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012551 (exit $ac_status); }; }; then
12552 ac_cv_sizeof__Bool=`cat conftest.val`
12553else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012554 echo "$as_me: program exited with status $ac_status" >&5
12555echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012556sed 's/^/| /' conftest.$ac_ext >&5
12557
12558( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012559if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012560 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012561See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012562echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012563See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012564 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012565 else
12566 ac_cv_sizeof__Bool=0
12567 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012569rm -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 +000012570fi
12571rm -f conftest.val
12572fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012573{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12574echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012575
12576
12577
Thomas Woutersb2137042007-02-01 18:02:27 +000012578cat >>confdefs.h <<_ACEOF
12579#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12580_ACEOF
12581
12582
12583fi
12584
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012585{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12586echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012587if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012588 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012589else
12590 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012591/* confdefs.h. */
12592_ACEOF
12593cat confdefs.h >>conftest.$ac_ext
12594cat >>conftest.$ac_ext <<_ACEOF
12595/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012596#ifdef HAVE_STDINT_H
12597 #include <stdint.h>
12598 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012599
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012600typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012601int
12602main ()
12603{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012604if ((ac__type_new_ *) 0)
12605 return 0;
12606if (sizeof (ac__type_new_))
12607 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012608 ;
12609 return 0;
12610}
12611_ACEOF
12612rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012613if { (ac_try="$ac_compile"
12614case "(($ac_try" in
12615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12616 *) ac_try_echo=$ac_try;;
12617esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012619 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012621 grep -v '^ *+' conftest.er1 >conftest.err
12622 rm -f conftest.er1
12623 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012625 (exit $ac_status); } && {
12626 test -z "$ac_c_werror_flag" ||
12627 test ! -s conftest.err
12628 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012629 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012630else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012632sed 's/^/| /' conftest.$ac_ext >&5
12633
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012634 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012636
12637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012638fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012639{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12640echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12641if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012642
12643cat >>confdefs.h <<_ACEOF
12644#define HAVE_UINTPTR_T 1
12645_ACEOF
12646
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012647{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12648echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12649if test "${ac_cv_type_uintptr_t+set}" = set; then
12650 echo $ECHO_N "(cached) $ECHO_C" >&6
12651else
12652 cat >conftest.$ac_ext <<_ACEOF
12653/* confdefs.h. */
12654_ACEOF
12655cat confdefs.h >>conftest.$ac_ext
12656cat >>conftest.$ac_ext <<_ACEOF
12657/* end confdefs.h. */
12658$ac_includes_default
12659typedef uintptr_t ac__type_new_;
12660int
12661main ()
12662{
12663if ((ac__type_new_ *) 0)
12664 return 0;
12665if (sizeof (ac__type_new_))
12666 return 0;
12667 ;
12668 return 0;
12669}
12670_ACEOF
12671rm -f conftest.$ac_objext
12672if { (ac_try="$ac_compile"
12673case "(($ac_try" in
12674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12675 *) ac_try_echo=$ac_try;;
12676esac
12677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12678 (eval "$ac_compile") 2>conftest.er1
12679 ac_status=$?
12680 grep -v '^ *+' conftest.er1 >conftest.err
12681 rm -f conftest.er1
12682 cat conftest.err >&5
12683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12684 (exit $ac_status); } && {
12685 test -z "$ac_c_werror_flag" ||
12686 test ! -s conftest.err
12687 } && test -s conftest.$ac_objext; then
12688 ac_cv_type_uintptr_t=yes
12689else
12690 echo "$as_me: failed program was:" >&5
12691sed 's/^/| /' conftest.$ac_ext >&5
12692
12693 ac_cv_type_uintptr_t=no
12694fi
12695
12696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12697fi
12698{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12699echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012701# The cast to long int works around a bug in the HP C Compiler
12702# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12703# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12704# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012705{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12706echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012707if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012708 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012709else
Martin v. Löwis11437992002-04-12 09:54:03 +000012710 if test "$cross_compiling" = yes; then
12711 # Depending upon the size, compute the lo and hi bounds.
12712cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012713/* confdefs.h. */
12714_ACEOF
12715cat confdefs.h >>conftest.$ac_ext
12716cat >>conftest.$ac_ext <<_ACEOF
12717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012718$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012719 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012720int
12721main ()
12722{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012723static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012724test_array [0] = 0
12725
12726 ;
12727 return 0;
12728}
12729_ACEOF
12730rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012731if { (ac_try="$ac_compile"
12732case "(($ac_try" in
12733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12734 *) ac_try_echo=$ac_try;;
12735esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012737 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012739 grep -v '^ *+' conftest.er1 >conftest.err
12740 rm -f conftest.er1
12741 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012743 (exit $ac_status); } && {
12744 test -z "$ac_c_werror_flag" ||
12745 test ! -s conftest.err
12746 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 ac_lo=0 ac_mid=0
12748 while :; do
12749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012750/* confdefs.h. */
12751_ACEOF
12752cat confdefs.h >>conftest.$ac_ext
12753cat >>conftest.$ac_ext <<_ACEOF
12754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012755$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012756 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012757int
12758main ()
12759{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012760static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012761test_array [0] = 0
12762
12763 ;
12764 return 0;
12765}
12766_ACEOF
12767rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012768if { (ac_try="$ac_compile"
12769case "(($ac_try" in
12770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12771 *) ac_try_echo=$ac_try;;
12772esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012774 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012775 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012776 grep -v '^ *+' conftest.er1 >conftest.err
12777 rm -f conftest.er1
12778 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012780 (exit $ac_status); } && {
12781 test -z "$ac_c_werror_flag" ||
12782 test ! -s conftest.err
12783 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012784 ac_hi=$ac_mid; break
12785else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012787sed 's/^/| /' conftest.$ac_ext >&5
12788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012789 ac_lo=`expr $ac_mid + 1`
12790 if test $ac_lo -le $ac_mid; then
12791 ac_lo= ac_hi=
12792 break
12793 fi
12794 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012796
12797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012798 done
12799else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012800 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012801sed 's/^/| /' conftest.$ac_ext >&5
12802
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012803 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012804/* confdefs.h. */
12805_ACEOF
12806cat confdefs.h >>conftest.$ac_ext
12807cat >>conftest.$ac_ext <<_ACEOF
12808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012809$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012810 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012811int
12812main ()
12813{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012814static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012815test_array [0] = 0
12816
12817 ;
12818 return 0;
12819}
12820_ACEOF
12821rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012822if { (ac_try="$ac_compile"
12823case "(($ac_try" in
12824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12825 *) ac_try_echo=$ac_try;;
12826esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012828 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012830 grep -v '^ *+' conftest.er1 >conftest.err
12831 rm -f conftest.er1
12832 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012834 (exit $ac_status); } && {
12835 test -z "$ac_c_werror_flag" ||
12836 test ! -s conftest.err
12837 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012838 ac_hi=-1 ac_mid=-1
12839 while :; do
12840 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012841/* confdefs.h. */
12842_ACEOF
12843cat confdefs.h >>conftest.$ac_ext
12844cat >>conftest.$ac_ext <<_ACEOF
12845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012846$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012847 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012848int
12849main ()
12850{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012851static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012852test_array [0] = 0
12853
12854 ;
12855 return 0;
12856}
12857_ACEOF
12858rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012859if { (ac_try="$ac_compile"
12860case "(($ac_try" in
12861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12862 *) ac_try_echo=$ac_try;;
12863esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012865 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012866 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012867 grep -v '^ *+' conftest.er1 >conftest.err
12868 rm -f conftest.er1
12869 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012871 (exit $ac_status); } && {
12872 test -z "$ac_c_werror_flag" ||
12873 test ! -s conftest.err
12874 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012875 ac_lo=$ac_mid; break
12876else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012878sed 's/^/| /' conftest.$ac_ext >&5
12879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012880 ac_hi=`expr '(' $ac_mid ')' - 1`
12881 if test $ac_mid -le $ac_hi; then
12882 ac_lo= ac_hi=
12883 break
12884 fi
12885 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012887
12888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012889 done
12890else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012891 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012892sed 's/^/| /' conftest.$ac_ext >&5
12893
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012894 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012896
12897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899
12900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012901# Binary search between lo and hi bounds.
12902while test "x$ac_lo" != "x$ac_hi"; do
12903 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12904 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012905/* confdefs.h. */
12906_ACEOF
12907cat confdefs.h >>conftest.$ac_ext
12908cat >>conftest.$ac_ext <<_ACEOF
12909/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012910$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012911 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012912int
12913main ()
12914{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012915static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012916test_array [0] = 0
12917
12918 ;
12919 return 0;
12920}
12921_ACEOF
12922rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012923if { (ac_try="$ac_compile"
12924case "(($ac_try" in
12925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12926 *) ac_try_echo=$ac_try;;
12927esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012929 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012930 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012931 grep -v '^ *+' conftest.er1 >conftest.err
12932 rm -f conftest.er1
12933 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012935 (exit $ac_status); } && {
12936 test -z "$ac_c_werror_flag" ||
12937 test ! -s conftest.err
12938 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012939 ac_hi=$ac_mid
12940else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012942sed 's/^/| /' conftest.$ac_ext >&5
12943
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012944 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012946
12947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012948done
12949case $ac_lo in
12950?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012951'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012952 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012953See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012954echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012955See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012956 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012957 else
12958 ac_cv_sizeof_uintptr_t=0
12959 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012960esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012961else
Martin v. Löwis11437992002-04-12 09:54:03 +000012962 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012963/* confdefs.h. */
12964_ACEOF
12965cat confdefs.h >>conftest.$ac_ext
12966cat >>conftest.$ac_ext <<_ACEOF
12967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012968$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012969 typedef uintptr_t ac__type_sizeof_;
12970static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12971static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012972#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012973#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012974int
12975main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012976{
Martin v. Löwis11437992002-04-12 09:54:03 +000012977
12978 FILE *f = fopen ("conftest.val", "w");
12979 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012980 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012981 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012982 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012983 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012984 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012985 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012986 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012987 }
12988 else
12989 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012990 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012991 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012992 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012993 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012994 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012995 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012996
12997 ;
12998 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012999}
Martin v. Löwis11437992002-04-12 09:54:03 +000013000_ACEOF
13001rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013002if { (ac_try="$ac_link"
13003case "(($ac_try" in
13004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13005 *) ac_try_echo=$ac_try;;
13006esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013008 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013009 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013011 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013012 { (case "(($ac_try" in
13013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13014 *) ac_try_echo=$ac_try;;
13015esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013017 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013018 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013020 (exit $ac_status); }; }; then
13021 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013022else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013023 echo "$as_me: program exited with status $ac_status" >&5
13024echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013025sed 's/^/| /' conftest.$ac_ext >&5
13026
Martin v. Löwis11437992002-04-12 09:54:03 +000013027( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013028if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013029 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013030See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013031echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013032See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013033 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013034 else
13035 ac_cv_sizeof_uintptr_t=0
13036 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013038rm -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 +000013039fi
13040rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013041fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013042{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13043echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013044
13045
13046
Martin v. Löwis11437992002-04-12 09:54:03 +000013047cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013048#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013049_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013050
Michael W. Hudson54241132001-12-07 15:38:26 +000013051
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013052fi
13053
Thomas Wouters89f507f2006-12-13 04:49:30 +000013054
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013055{ echo "$as_me:$LINENO: checking for off_t" >&5
13056echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13057if test "${ac_cv_type_off_t+set}" = set; then
13058 echo $ECHO_N "(cached) $ECHO_C" >&6
13059else
13060 cat >conftest.$ac_ext <<_ACEOF
13061/* confdefs.h. */
13062_ACEOF
13063cat confdefs.h >>conftest.$ac_ext
13064cat >>conftest.$ac_ext <<_ACEOF
13065/* end confdefs.h. */
13066
13067#ifdef HAVE_SYS_TYPES_H
13068#include <sys/types.h>
13069#endif
13070
13071
13072typedef off_t ac__type_new_;
13073int
13074main ()
13075{
13076if ((ac__type_new_ *) 0)
13077 return 0;
13078if (sizeof (ac__type_new_))
13079 return 0;
13080 ;
13081 return 0;
13082}
13083_ACEOF
13084rm -f conftest.$ac_objext
13085if { (ac_try="$ac_compile"
13086case "(($ac_try" in
13087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13088 *) ac_try_echo=$ac_try;;
13089esac
13090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13091 (eval "$ac_compile") 2>conftest.er1
13092 ac_status=$?
13093 grep -v '^ *+' conftest.er1 >conftest.err
13094 rm -f conftest.er1
13095 cat conftest.err >&5
13096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13097 (exit $ac_status); } && {
13098 test -z "$ac_c_werror_flag" ||
13099 test ! -s conftest.err
13100 } && test -s conftest.$ac_objext; then
13101 ac_cv_type_off_t=yes
13102else
13103 echo "$as_me: failed program was:" >&5
13104sed 's/^/| /' conftest.$ac_ext >&5
13105
13106 ac_cv_type_off_t=no
13107fi
13108
13109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13110fi
13111{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13112echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13113
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013114# The cast to long int works around a bug in the HP C Compiler
13115# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13116# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13117# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013118{ echo "$as_me:$LINENO: checking size of off_t" >&5
13119echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013120if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013121 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013122else
13123 if test "$cross_compiling" = yes; then
13124 # Depending upon the size, compute the lo and hi bounds.
13125cat >conftest.$ac_ext <<_ACEOF
13126/* confdefs.h. */
13127_ACEOF
13128cat confdefs.h >>conftest.$ac_ext
13129cat >>conftest.$ac_ext <<_ACEOF
13130/* end confdefs.h. */
13131
13132#ifdef HAVE_SYS_TYPES_H
13133#include <sys/types.h>
13134#endif
13135
13136
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013137 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013138int
13139main ()
13140{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013141static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013142test_array [0] = 0
13143
13144 ;
13145 return 0;
13146}
13147_ACEOF
13148rm -f conftest.$ac_objext
13149if { (ac_try="$ac_compile"
13150case "(($ac_try" in
13151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13152 *) ac_try_echo=$ac_try;;
13153esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013155 (eval "$ac_compile") 2>conftest.er1
13156 ac_status=$?
13157 grep -v '^ *+' conftest.er1 >conftest.err
13158 rm -f conftest.er1
13159 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013161 (exit $ac_status); } && {
13162 test -z "$ac_c_werror_flag" ||
13163 test ! -s conftest.err
13164 } && test -s conftest.$ac_objext; then
13165 ac_lo=0 ac_mid=0
13166 while :; do
13167 cat >conftest.$ac_ext <<_ACEOF
13168/* confdefs.h. */
13169_ACEOF
13170cat confdefs.h >>conftest.$ac_ext
13171cat >>conftest.$ac_ext <<_ACEOF
13172/* end confdefs.h. */
13173
13174#ifdef HAVE_SYS_TYPES_H
13175#include <sys/types.h>
13176#endif
13177
13178
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013179 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013180int
13181main ()
13182{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013183static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013184test_array [0] = 0
13185
13186 ;
13187 return 0;
13188}
13189_ACEOF
13190rm -f conftest.$ac_objext
13191if { (ac_try="$ac_compile"
13192case "(($ac_try" in
13193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13194 *) ac_try_echo=$ac_try;;
13195esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013197 (eval "$ac_compile") 2>conftest.er1
13198 ac_status=$?
13199 grep -v '^ *+' conftest.er1 >conftest.err
13200 rm -f conftest.er1
13201 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013203 (exit $ac_status); } && {
13204 test -z "$ac_c_werror_flag" ||
13205 test ! -s conftest.err
13206 } && test -s conftest.$ac_objext; then
13207 ac_hi=$ac_mid; break
13208else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013209 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013210sed 's/^/| /' conftest.$ac_ext >&5
13211
13212 ac_lo=`expr $ac_mid + 1`
13213 if test $ac_lo -le $ac_mid; then
13214 ac_lo= ac_hi=
13215 break
13216 fi
13217 ac_mid=`expr 2 '*' $ac_mid + 1`
13218fi
13219
13220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13221 done
13222else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013223 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013224sed 's/^/| /' conftest.$ac_ext >&5
13225
13226 cat >conftest.$ac_ext <<_ACEOF
13227/* confdefs.h. */
13228_ACEOF
13229cat confdefs.h >>conftest.$ac_ext
13230cat >>conftest.$ac_ext <<_ACEOF
13231/* end confdefs.h. */
13232
13233#ifdef HAVE_SYS_TYPES_H
13234#include <sys/types.h>
13235#endif
13236
13237
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013238 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013239int
13240main ()
13241{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013242static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013243test_array [0] = 0
13244
13245 ;
13246 return 0;
13247}
13248_ACEOF
13249rm -f conftest.$ac_objext
13250if { (ac_try="$ac_compile"
13251case "(($ac_try" in
13252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13253 *) ac_try_echo=$ac_try;;
13254esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013256 (eval "$ac_compile") 2>conftest.er1
13257 ac_status=$?
13258 grep -v '^ *+' conftest.er1 >conftest.err
13259 rm -f conftest.er1
13260 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013262 (exit $ac_status); } && {
13263 test -z "$ac_c_werror_flag" ||
13264 test ! -s conftest.err
13265 } && test -s conftest.$ac_objext; then
13266 ac_hi=-1 ac_mid=-1
13267 while :; do
13268 cat >conftest.$ac_ext <<_ACEOF
13269/* confdefs.h. */
13270_ACEOF
13271cat confdefs.h >>conftest.$ac_ext
13272cat >>conftest.$ac_ext <<_ACEOF
13273/* end confdefs.h. */
13274
13275#ifdef HAVE_SYS_TYPES_H
13276#include <sys/types.h>
13277#endif
13278
13279
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013280 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013281int
13282main ()
13283{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013284static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013285test_array [0] = 0
13286
13287 ;
13288 return 0;
13289}
13290_ACEOF
13291rm -f conftest.$ac_objext
13292if { (ac_try="$ac_compile"
13293case "(($ac_try" in
13294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13295 *) ac_try_echo=$ac_try;;
13296esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013298 (eval "$ac_compile") 2>conftest.er1
13299 ac_status=$?
13300 grep -v '^ *+' conftest.er1 >conftest.err
13301 rm -f conftest.er1
13302 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013304 (exit $ac_status); } && {
13305 test -z "$ac_c_werror_flag" ||
13306 test ! -s conftest.err
13307 } && test -s conftest.$ac_objext; then
13308 ac_lo=$ac_mid; break
13309else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013310 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013311sed 's/^/| /' conftest.$ac_ext >&5
13312
13313 ac_hi=`expr '(' $ac_mid ')' - 1`
13314 if test $ac_mid -le $ac_hi; then
13315 ac_lo= ac_hi=
13316 break
13317 fi
13318 ac_mid=`expr 2 '*' $ac_mid`
13319fi
13320
13321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13322 done
13323else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013324 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013325sed 's/^/| /' conftest.$ac_ext >&5
13326
13327 ac_lo= ac_hi=
13328fi
13329
13330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13331fi
13332
13333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13334# Binary search between lo and hi bounds.
13335while test "x$ac_lo" != "x$ac_hi"; do
13336 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13337 cat >conftest.$ac_ext <<_ACEOF
13338/* confdefs.h. */
13339_ACEOF
13340cat confdefs.h >>conftest.$ac_ext
13341cat >>conftest.$ac_ext <<_ACEOF
13342/* end confdefs.h. */
13343
13344#ifdef HAVE_SYS_TYPES_H
13345#include <sys/types.h>
13346#endif
13347
13348
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013349 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013350int
13351main ()
13352{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013353static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013354test_array [0] = 0
13355
13356 ;
13357 return 0;
13358}
13359_ACEOF
13360rm -f conftest.$ac_objext
13361if { (ac_try="$ac_compile"
13362case "(($ac_try" in
13363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13364 *) ac_try_echo=$ac_try;;
13365esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013367 (eval "$ac_compile") 2>conftest.er1
13368 ac_status=$?
13369 grep -v '^ *+' conftest.er1 >conftest.err
13370 rm -f conftest.er1
13371 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013373 (exit $ac_status); } && {
13374 test -z "$ac_c_werror_flag" ||
13375 test ! -s conftest.err
13376 } && test -s conftest.$ac_objext; then
13377 ac_hi=$ac_mid
13378else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013379 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013380sed 's/^/| /' conftest.$ac_ext >&5
13381
13382 ac_lo=`expr '(' $ac_mid ')' + 1`
13383fi
13384
13385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13386done
13387case $ac_lo in
13388?*) ac_cv_sizeof_off_t=$ac_lo;;
13389'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013390 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013391See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013392echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013393See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013394 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013395 else
13396 ac_cv_sizeof_off_t=0
13397 fi ;;
13398esac
13399else
13400 cat >conftest.$ac_ext <<_ACEOF
13401/* confdefs.h. */
13402_ACEOF
13403cat confdefs.h >>conftest.$ac_ext
13404cat >>conftest.$ac_ext <<_ACEOF
13405/* end confdefs.h. */
13406
13407#ifdef HAVE_SYS_TYPES_H
13408#include <sys/types.h>
13409#endif
13410
13411
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013412 typedef off_t ac__type_sizeof_;
13413static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13414static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013415#include <stdio.h>
13416#include <stdlib.h>
13417int
13418main ()
13419{
13420
13421 FILE *f = fopen ("conftest.val", "w");
13422 if (! f)
13423 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013424 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013425 {
13426 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013427 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013428 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013429 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013430 }
13431 else
13432 {
13433 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013434 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013435 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013436 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013437 }
13438 return ferror (f) || fclose (f) != 0;
13439
13440 ;
13441 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013442}
Martin v. Löwis11437992002-04-12 09:54:03 +000013443_ACEOF
13444rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013445if { (ac_try="$ac_link"
13446case "(($ac_try" in
13447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13448 *) ac_try_echo=$ac_try;;
13449esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013451 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013452 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013454 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013455 { (case "(($ac_try" in
13456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13457 *) ac_try_echo=$ac_try;;
13458esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013460 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013461 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013463 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013464 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013465else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013466 echo "$as_me: program exited with status $ac_status" >&5
13467echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013468sed 's/^/| /' conftest.$ac_ext >&5
13469
Martin v. Löwis11437992002-04-12 09:54:03 +000013470( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013471if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013472 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013473See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013474echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013475See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013476 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013477 else
13478 ac_cv_sizeof_off_t=0
13479 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013481rm -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 +000013482fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013483rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013484fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013485{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13486echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013487
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013488
13489
Martin v. Löwis11437992002-04-12 09:54:03 +000013490cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013491#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013492_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013493
Michael W. Hudson54241132001-12-07 15:38:26 +000013494
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013495
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013496{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13497echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +000013498if test "$have_long_long" = yes
13499then
13500if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013501 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013502
Martin v. Löwis11437992002-04-12 09:54:03 +000013503cat >>confdefs.h <<\_ACEOF
13504#define HAVE_LARGEFILE_SUPPORT 1
13505_ACEOF
13506
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013507 { echo "$as_me:$LINENO: result: yes" >&5
13508echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013509else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013510 { echo "$as_me:$LINENO: result: no" >&5
13511echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013512fi
Mark Dickinson2df5d282009-12-31 21:22:50 +000013513else
13514 { echo "$as_me:$LINENO: result: no" >&5
13515echo "${ECHO_T}no" >&6; }
13516fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013517
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013518{ echo "$as_me:$LINENO: checking for time_t" >&5
13519echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13520if test "${ac_cv_type_time_t+set}" = set; then
13521 echo $ECHO_N "(cached) $ECHO_C" >&6
13522else
13523 cat >conftest.$ac_ext <<_ACEOF
13524/* confdefs.h. */
13525_ACEOF
13526cat confdefs.h >>conftest.$ac_ext
13527cat >>conftest.$ac_ext <<_ACEOF
13528/* end confdefs.h. */
13529
13530#ifdef HAVE_SYS_TYPES_H
13531#include <sys/types.h>
13532#endif
13533#ifdef HAVE_TIME_H
13534#include <time.h>
13535#endif
13536
13537
13538typedef time_t ac__type_new_;
13539int
13540main ()
13541{
13542if ((ac__type_new_ *) 0)
13543 return 0;
13544if (sizeof (ac__type_new_))
13545 return 0;
13546 ;
13547 return 0;
13548}
13549_ACEOF
13550rm -f conftest.$ac_objext
13551if { (ac_try="$ac_compile"
13552case "(($ac_try" in
13553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13554 *) ac_try_echo=$ac_try;;
13555esac
13556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13557 (eval "$ac_compile") 2>conftest.er1
13558 ac_status=$?
13559 grep -v '^ *+' conftest.er1 >conftest.err
13560 rm -f conftest.er1
13561 cat conftest.err >&5
13562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13563 (exit $ac_status); } && {
13564 test -z "$ac_c_werror_flag" ||
13565 test ! -s conftest.err
13566 } && test -s conftest.$ac_objext; then
13567 ac_cv_type_time_t=yes
13568else
13569 echo "$as_me: failed program was:" >&5
13570sed 's/^/| /' conftest.$ac_ext >&5
13571
13572 ac_cv_type_time_t=no
13573fi
13574
13575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13576fi
13577{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13578echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13579
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013580# The cast to long int works around a bug in the HP C Compiler
13581# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13582# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13583# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013584{ echo "$as_me:$LINENO: checking size of time_t" >&5
13585echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013586if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013587 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013588else
13589 if test "$cross_compiling" = yes; then
13590 # Depending upon the size, compute the lo and hi bounds.
13591cat >conftest.$ac_ext <<_ACEOF
13592/* confdefs.h. */
13593_ACEOF
13594cat confdefs.h >>conftest.$ac_ext
13595cat >>conftest.$ac_ext <<_ACEOF
13596/* end confdefs.h. */
13597
13598#ifdef HAVE_SYS_TYPES_H
13599#include <sys/types.h>
13600#endif
13601#ifdef HAVE_TIME_H
13602#include <time.h>
13603#endif
13604
13605
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013606 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013607int
13608main ()
13609{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013610static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013611test_array [0] = 0
13612
13613 ;
13614 return 0;
13615}
13616_ACEOF
13617rm -f conftest.$ac_objext
13618if { (ac_try="$ac_compile"
13619case "(($ac_try" in
13620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13621 *) ac_try_echo=$ac_try;;
13622esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013624 (eval "$ac_compile") 2>conftest.er1
13625 ac_status=$?
13626 grep -v '^ *+' conftest.er1 >conftest.err
13627 rm -f conftest.er1
13628 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013630 (exit $ac_status); } && {
13631 test -z "$ac_c_werror_flag" ||
13632 test ! -s conftest.err
13633 } && test -s conftest.$ac_objext; then
13634 ac_lo=0 ac_mid=0
13635 while :; do
13636 cat >conftest.$ac_ext <<_ACEOF
13637/* confdefs.h. */
13638_ACEOF
13639cat confdefs.h >>conftest.$ac_ext
13640cat >>conftest.$ac_ext <<_ACEOF
13641/* end confdefs.h. */
13642
13643#ifdef HAVE_SYS_TYPES_H
13644#include <sys/types.h>
13645#endif
13646#ifdef HAVE_TIME_H
13647#include <time.h>
13648#endif
13649
13650
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013651 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013652int
13653main ()
13654{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013655static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013656test_array [0] = 0
13657
13658 ;
13659 return 0;
13660}
13661_ACEOF
13662rm -f conftest.$ac_objext
13663if { (ac_try="$ac_compile"
13664case "(($ac_try" in
13665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13666 *) ac_try_echo=$ac_try;;
13667esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013669 (eval "$ac_compile") 2>conftest.er1
13670 ac_status=$?
13671 grep -v '^ *+' conftest.er1 >conftest.err
13672 rm -f conftest.er1
13673 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013675 (exit $ac_status); } && {
13676 test -z "$ac_c_werror_flag" ||
13677 test ! -s conftest.err
13678 } && test -s conftest.$ac_objext; then
13679 ac_hi=$ac_mid; break
13680else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013681 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013682sed 's/^/| /' conftest.$ac_ext >&5
13683
13684 ac_lo=`expr $ac_mid + 1`
13685 if test $ac_lo -le $ac_mid; then
13686 ac_lo= ac_hi=
13687 break
13688 fi
13689 ac_mid=`expr 2 '*' $ac_mid + 1`
13690fi
13691
13692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13693 done
13694else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013695 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013696sed 's/^/| /' conftest.$ac_ext >&5
13697
13698 cat >conftest.$ac_ext <<_ACEOF
13699/* confdefs.h. */
13700_ACEOF
13701cat confdefs.h >>conftest.$ac_ext
13702cat >>conftest.$ac_ext <<_ACEOF
13703/* end confdefs.h. */
13704
13705#ifdef HAVE_SYS_TYPES_H
13706#include <sys/types.h>
13707#endif
13708#ifdef HAVE_TIME_H
13709#include <time.h>
13710#endif
13711
13712
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013713 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013714int
13715main ()
13716{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013717static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013718test_array [0] = 0
13719
13720 ;
13721 return 0;
13722}
13723_ACEOF
13724rm -f conftest.$ac_objext
13725if { (ac_try="$ac_compile"
13726case "(($ac_try" in
13727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13728 *) ac_try_echo=$ac_try;;
13729esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013731 (eval "$ac_compile") 2>conftest.er1
13732 ac_status=$?
13733 grep -v '^ *+' conftest.er1 >conftest.err
13734 rm -f conftest.er1
13735 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013737 (exit $ac_status); } && {
13738 test -z "$ac_c_werror_flag" ||
13739 test ! -s conftest.err
13740 } && test -s conftest.$ac_objext; then
13741 ac_hi=-1 ac_mid=-1
13742 while :; do
13743 cat >conftest.$ac_ext <<_ACEOF
13744/* confdefs.h. */
13745_ACEOF
13746cat confdefs.h >>conftest.$ac_ext
13747cat >>conftest.$ac_ext <<_ACEOF
13748/* end confdefs.h. */
13749
13750#ifdef HAVE_SYS_TYPES_H
13751#include <sys/types.h>
13752#endif
13753#ifdef HAVE_TIME_H
13754#include <time.h>
13755#endif
13756
13757
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013758 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013759int
13760main ()
13761{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013762static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013763test_array [0] = 0
13764
13765 ;
13766 return 0;
13767}
13768_ACEOF
13769rm -f conftest.$ac_objext
13770if { (ac_try="$ac_compile"
13771case "(($ac_try" in
13772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13773 *) ac_try_echo=$ac_try;;
13774esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013776 (eval "$ac_compile") 2>conftest.er1
13777 ac_status=$?
13778 grep -v '^ *+' conftest.er1 >conftest.err
13779 rm -f conftest.er1
13780 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013782 (exit $ac_status); } && {
13783 test -z "$ac_c_werror_flag" ||
13784 test ! -s conftest.err
13785 } && test -s conftest.$ac_objext; then
13786 ac_lo=$ac_mid; break
13787else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013788 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013789sed 's/^/| /' conftest.$ac_ext >&5
13790
13791 ac_hi=`expr '(' $ac_mid ')' - 1`
13792 if test $ac_mid -le $ac_hi; then
13793 ac_lo= ac_hi=
13794 break
13795 fi
13796 ac_mid=`expr 2 '*' $ac_mid`
13797fi
13798
13799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13800 done
13801else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013802 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013803sed 's/^/| /' conftest.$ac_ext >&5
13804
13805 ac_lo= ac_hi=
13806fi
13807
13808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13809fi
13810
13811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13812# Binary search between lo and hi bounds.
13813while test "x$ac_lo" != "x$ac_hi"; do
13814 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13815 cat >conftest.$ac_ext <<_ACEOF
13816/* confdefs.h. */
13817_ACEOF
13818cat confdefs.h >>conftest.$ac_ext
13819cat >>conftest.$ac_ext <<_ACEOF
13820/* end confdefs.h. */
13821
13822#ifdef HAVE_SYS_TYPES_H
13823#include <sys/types.h>
13824#endif
13825#ifdef HAVE_TIME_H
13826#include <time.h>
13827#endif
13828
13829
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013830 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013831int
13832main ()
13833{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013834static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013835test_array [0] = 0
13836
13837 ;
13838 return 0;
13839}
13840_ACEOF
13841rm -f conftest.$ac_objext
13842if { (ac_try="$ac_compile"
13843case "(($ac_try" in
13844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13845 *) ac_try_echo=$ac_try;;
13846esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013848 (eval "$ac_compile") 2>conftest.er1
13849 ac_status=$?
13850 grep -v '^ *+' conftest.er1 >conftest.err
13851 rm -f conftest.er1
13852 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013854 (exit $ac_status); } && {
13855 test -z "$ac_c_werror_flag" ||
13856 test ! -s conftest.err
13857 } && test -s conftest.$ac_objext; then
13858 ac_hi=$ac_mid
13859else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013860 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013861sed 's/^/| /' conftest.$ac_ext >&5
13862
13863 ac_lo=`expr '(' $ac_mid ')' + 1`
13864fi
13865
13866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13867done
13868case $ac_lo in
13869?*) ac_cv_sizeof_time_t=$ac_lo;;
13870'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013871 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013872See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013873echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013874See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013875 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013876 else
13877 ac_cv_sizeof_time_t=0
13878 fi ;;
13879esac
13880else
13881 cat >conftest.$ac_ext <<_ACEOF
13882/* confdefs.h. */
13883_ACEOF
13884cat confdefs.h >>conftest.$ac_ext
13885cat >>conftest.$ac_ext <<_ACEOF
13886/* end confdefs.h. */
13887
13888#ifdef HAVE_SYS_TYPES_H
13889#include <sys/types.h>
13890#endif
13891#ifdef HAVE_TIME_H
13892#include <time.h>
13893#endif
13894
13895
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013896 typedef time_t ac__type_sizeof_;
13897static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13898static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013899#include <stdio.h>
13900#include <stdlib.h>
13901int
13902main ()
13903{
13904
13905 FILE *f = fopen ("conftest.val", "w");
13906 if (! f)
13907 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013908 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013909 {
13910 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013911 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013912 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013913 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013914 }
13915 else
13916 {
13917 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013918 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013919 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013920 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013921 }
13922 return ferror (f) || fclose (f) != 0;
13923
13924 ;
13925 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013926}
Martin v. Löwis11437992002-04-12 09:54:03 +000013927_ACEOF
13928rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013929if { (ac_try="$ac_link"
13930case "(($ac_try" in
13931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13932 *) ac_try_echo=$ac_try;;
13933esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013935 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013936 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013938 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013939 { (case "(($ac_try" in
13940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13941 *) ac_try_echo=$ac_try;;
13942esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013944 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013945 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013947 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013948 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013949else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013950 echo "$as_me: program exited with status $ac_status" >&5
13951echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013952sed 's/^/| /' conftest.$ac_ext >&5
13953
Martin v. Löwis11437992002-04-12 09:54:03 +000013954( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013955if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013956 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013957See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013958echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013959See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013960 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013961 else
13962 ac_cv_sizeof_time_t=0
13963 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013965rm -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 +000013966fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013967rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013968fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013969{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13970echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013971
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013972
13973
Martin v. Löwis11437992002-04-12 09:54:03 +000013974cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013975#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013976_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013977
Michael W. Hudson54241132001-12-07 15:38:26 +000013978
13979
Trent Mick635f6fb2000-08-23 21:33:05 +000013980# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013981ac_save_cc="$CC"
13982if test "$ac_cv_kpthread" = "yes"
13983then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013984elif test "$ac_cv_kthread" = "yes"
13985then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013986elif test "$ac_cv_pthread" = "yes"
13987then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013988fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013989
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013990{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13991echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013992have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013993cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013994/* confdefs.h. */
13995_ACEOF
13996cat confdefs.h >>conftest.$ac_ext
13997cat >>conftest.$ac_ext <<_ACEOF
13998/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013999#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014000int
14001main ()
14002{
Guido van Rossum12580492000-09-24 16:47:19 +000014003pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014004 ;
14005 return 0;
14006}
14007_ACEOF
14008rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014009if { (ac_try="$ac_compile"
14010case "(($ac_try" in
14011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14012 *) ac_try_echo=$ac_try;;
14013esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014015 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014017 grep -v '^ *+' conftest.er1 >conftest.err
14018 rm -f conftest.er1
14019 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014021 (exit $ac_status); } && {
14022 test -z "$ac_c_werror_flag" ||
14023 test ! -s conftest.err
14024 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000014025 have_pthread_t=yes
14026else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014028sed 's/^/| /' conftest.$ac_ext >&5
14029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014030
Trent Mick635f6fb2000-08-23 21:33:05 +000014031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014032
14033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014034{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14035echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014036if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014037 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14038echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14039if test "${ac_cv_type_pthread_t+set}" = set; then
14040 echo $ECHO_N "(cached) $ECHO_C" >&6
14041else
14042 cat >conftest.$ac_ext <<_ACEOF
14043/* confdefs.h. */
14044_ACEOF
14045cat confdefs.h >>conftest.$ac_ext
14046cat >>conftest.$ac_ext <<_ACEOF
14047/* end confdefs.h. */
14048
14049#ifdef HAVE_PTHREAD_H
14050#include <pthread.h>
14051#endif
14052
14053
14054typedef pthread_t ac__type_new_;
14055int
14056main ()
14057{
14058if ((ac__type_new_ *) 0)
14059 return 0;
14060if (sizeof (ac__type_new_))
14061 return 0;
14062 ;
14063 return 0;
14064}
14065_ACEOF
14066rm -f conftest.$ac_objext
14067if { (ac_try="$ac_compile"
14068case "(($ac_try" in
14069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14070 *) ac_try_echo=$ac_try;;
14071esac
14072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14073 (eval "$ac_compile") 2>conftest.er1
14074 ac_status=$?
14075 grep -v '^ *+' conftest.er1 >conftest.err
14076 rm -f conftest.er1
14077 cat conftest.err >&5
14078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14079 (exit $ac_status); } && {
14080 test -z "$ac_c_werror_flag" ||
14081 test ! -s conftest.err
14082 } && test -s conftest.$ac_objext; then
14083 ac_cv_type_pthread_t=yes
14084else
14085 echo "$as_me: failed program was:" >&5
14086sed 's/^/| /' conftest.$ac_ext >&5
14087
14088 ac_cv_type_pthread_t=no
14089fi
14090
14091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14092fi
14093{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14094echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14095
14096# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014097# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14098# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14099# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014100{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14101echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014102if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014103 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014104else
14105 if test "$cross_compiling" = yes; then
14106 # Depending upon the size, compute the lo and hi bounds.
14107cat >conftest.$ac_ext <<_ACEOF
14108/* confdefs.h. */
14109_ACEOF
14110cat confdefs.h >>conftest.$ac_ext
14111cat >>conftest.$ac_ext <<_ACEOF
14112/* end confdefs.h. */
14113
14114#ifdef HAVE_PTHREAD_H
14115#include <pthread.h>
14116#endif
14117
14118
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014119 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014120int
14121main ()
14122{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014123static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014124test_array [0] = 0
14125
14126 ;
14127 return 0;
14128}
14129_ACEOF
14130rm -f conftest.$ac_objext
14131if { (ac_try="$ac_compile"
14132case "(($ac_try" in
14133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14134 *) ac_try_echo=$ac_try;;
14135esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014137 (eval "$ac_compile") 2>conftest.er1
14138 ac_status=$?
14139 grep -v '^ *+' conftest.er1 >conftest.err
14140 rm -f conftest.er1
14141 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014143 (exit $ac_status); } && {
14144 test -z "$ac_c_werror_flag" ||
14145 test ! -s conftest.err
14146 } && test -s conftest.$ac_objext; then
14147 ac_lo=0 ac_mid=0
14148 while :; do
14149 cat >conftest.$ac_ext <<_ACEOF
14150/* confdefs.h. */
14151_ACEOF
14152cat confdefs.h >>conftest.$ac_ext
14153cat >>conftest.$ac_ext <<_ACEOF
14154/* end confdefs.h. */
14155
14156#ifdef HAVE_PTHREAD_H
14157#include <pthread.h>
14158#endif
14159
14160
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014161 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014162int
14163main ()
14164{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014165static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014166test_array [0] = 0
14167
14168 ;
14169 return 0;
14170}
14171_ACEOF
14172rm -f conftest.$ac_objext
14173if { (ac_try="$ac_compile"
14174case "(($ac_try" in
14175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14176 *) ac_try_echo=$ac_try;;
14177esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014179 (eval "$ac_compile") 2>conftest.er1
14180 ac_status=$?
14181 grep -v '^ *+' conftest.er1 >conftest.err
14182 rm -f conftest.er1
14183 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014185 (exit $ac_status); } && {
14186 test -z "$ac_c_werror_flag" ||
14187 test ! -s conftest.err
14188 } && test -s conftest.$ac_objext; then
14189 ac_hi=$ac_mid; break
14190else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014191 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014192sed 's/^/| /' conftest.$ac_ext >&5
14193
14194 ac_lo=`expr $ac_mid + 1`
14195 if test $ac_lo -le $ac_mid; then
14196 ac_lo= ac_hi=
14197 break
14198 fi
14199 ac_mid=`expr 2 '*' $ac_mid + 1`
14200fi
14201
14202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14203 done
14204else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014205 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014206sed 's/^/| /' conftest.$ac_ext >&5
14207
14208 cat >conftest.$ac_ext <<_ACEOF
14209/* confdefs.h. */
14210_ACEOF
14211cat confdefs.h >>conftest.$ac_ext
14212cat >>conftest.$ac_ext <<_ACEOF
14213/* end confdefs.h. */
14214
14215#ifdef HAVE_PTHREAD_H
14216#include <pthread.h>
14217#endif
14218
14219
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014220 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014221int
14222main ()
14223{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014224static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014225test_array [0] = 0
14226
14227 ;
14228 return 0;
14229}
14230_ACEOF
14231rm -f conftest.$ac_objext
14232if { (ac_try="$ac_compile"
14233case "(($ac_try" in
14234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14235 *) ac_try_echo=$ac_try;;
14236esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014238 (eval "$ac_compile") 2>conftest.er1
14239 ac_status=$?
14240 grep -v '^ *+' conftest.er1 >conftest.err
14241 rm -f conftest.er1
14242 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014244 (exit $ac_status); } && {
14245 test -z "$ac_c_werror_flag" ||
14246 test ! -s conftest.err
14247 } && test -s conftest.$ac_objext; then
14248 ac_hi=-1 ac_mid=-1
14249 while :; do
14250 cat >conftest.$ac_ext <<_ACEOF
14251/* confdefs.h. */
14252_ACEOF
14253cat confdefs.h >>conftest.$ac_ext
14254cat >>conftest.$ac_ext <<_ACEOF
14255/* end confdefs.h. */
14256
14257#ifdef HAVE_PTHREAD_H
14258#include <pthread.h>
14259#endif
14260
14261
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014262 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014263int
14264main ()
14265{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014266static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014267test_array [0] = 0
14268
14269 ;
14270 return 0;
14271}
14272_ACEOF
14273rm -f conftest.$ac_objext
14274if { (ac_try="$ac_compile"
14275case "(($ac_try" in
14276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14277 *) ac_try_echo=$ac_try;;
14278esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014280 (eval "$ac_compile") 2>conftest.er1
14281 ac_status=$?
14282 grep -v '^ *+' conftest.er1 >conftest.err
14283 rm -f conftest.er1
14284 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014286 (exit $ac_status); } && {
14287 test -z "$ac_c_werror_flag" ||
14288 test ! -s conftest.err
14289 } && test -s conftest.$ac_objext; then
14290 ac_lo=$ac_mid; break
14291else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014292 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014293sed 's/^/| /' conftest.$ac_ext >&5
14294
14295 ac_hi=`expr '(' $ac_mid ')' - 1`
14296 if test $ac_mid -le $ac_hi; then
14297 ac_lo= ac_hi=
14298 break
14299 fi
14300 ac_mid=`expr 2 '*' $ac_mid`
14301fi
14302
14303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14304 done
14305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014306 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014307sed 's/^/| /' conftest.$ac_ext >&5
14308
14309 ac_lo= ac_hi=
14310fi
14311
14312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14313fi
14314
14315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14316# Binary search between lo and hi bounds.
14317while test "x$ac_lo" != "x$ac_hi"; do
14318 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14319 cat >conftest.$ac_ext <<_ACEOF
14320/* confdefs.h. */
14321_ACEOF
14322cat confdefs.h >>conftest.$ac_ext
14323cat >>conftest.$ac_ext <<_ACEOF
14324/* end confdefs.h. */
14325
14326#ifdef HAVE_PTHREAD_H
14327#include <pthread.h>
14328#endif
14329
14330
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014331 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014332int
14333main ()
14334{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014335static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014336test_array [0] = 0
14337
14338 ;
14339 return 0;
14340}
14341_ACEOF
14342rm -f conftest.$ac_objext
14343if { (ac_try="$ac_compile"
14344case "(($ac_try" in
14345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14346 *) ac_try_echo=$ac_try;;
14347esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014349 (eval "$ac_compile") 2>conftest.er1
14350 ac_status=$?
14351 grep -v '^ *+' conftest.er1 >conftest.err
14352 rm -f conftest.er1
14353 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014355 (exit $ac_status); } && {
14356 test -z "$ac_c_werror_flag" ||
14357 test ! -s conftest.err
14358 } && test -s conftest.$ac_objext; then
14359 ac_hi=$ac_mid
14360else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014361 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014362sed 's/^/| /' conftest.$ac_ext >&5
14363
14364 ac_lo=`expr '(' $ac_mid ')' + 1`
14365fi
14366
14367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14368done
14369case $ac_lo in
14370?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14371'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014372 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014373See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014374echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014375See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014376 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014377 else
14378 ac_cv_sizeof_pthread_t=0
14379 fi ;;
14380esac
14381else
14382 cat >conftest.$ac_ext <<_ACEOF
14383/* confdefs.h. */
14384_ACEOF
14385cat confdefs.h >>conftest.$ac_ext
14386cat >>conftest.$ac_ext <<_ACEOF
14387/* end confdefs.h. */
14388
14389#ifdef HAVE_PTHREAD_H
14390#include <pthread.h>
14391#endif
14392
14393
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014394 typedef pthread_t ac__type_sizeof_;
14395static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14396static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014397#include <stdio.h>
14398#include <stdlib.h>
14399int
14400main ()
14401{
14402
14403 FILE *f = fopen ("conftest.val", "w");
14404 if (! f)
14405 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014406 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014407 {
14408 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014409 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014410 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014411 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014412 }
14413 else
14414 {
14415 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014416 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014417 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014418 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014419 }
14420 return ferror (f) || fclose (f) != 0;
14421
14422 ;
14423 return 0;
14424}
Martin v. Löwis11437992002-04-12 09:54:03 +000014425_ACEOF
14426rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014427if { (ac_try="$ac_link"
14428case "(($ac_try" in
14429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14430 *) ac_try_echo=$ac_try;;
14431esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014433 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014434 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014436 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014437 { (case "(($ac_try" in
14438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14439 *) ac_try_echo=$ac_try;;
14440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014442 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014443 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014445 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014446 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014447else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014448 echo "$as_me: program exited with status $ac_status" >&5
14449echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014450sed 's/^/| /' conftest.$ac_ext >&5
14451
Martin v. Löwis11437992002-04-12 09:54:03 +000014452( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014453if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014454 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014455See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014456echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014457See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014458 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014459 else
14460 ac_cv_sizeof_pthread_t=0
14461 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014463rm -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 +000014464fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014465rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014466fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014467{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14468echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014469
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014470
14471
Martin v. Löwis11437992002-04-12 09:54:03 +000014472cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014473#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014474_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014475
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014476
Trent Mick635f6fb2000-08-23 21:33:05 +000014477fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014478CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014479
Michael W. Hudson54241132001-12-07 15:38:26 +000014480
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014481case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014482 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014483 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14484 ;;
14485 Darwin/*)
14486 OTHER_LIBTOOL_OPT=""
14487 ;;
14488esac
14489
14490
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014491ARCH_RUN_32BIT=""
14492
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014493case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014494 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014495 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14496 if test "${enable_universalsdk}"; then
14497 :
14498 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014499 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014500 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014501 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014502 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014503 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000014504 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014505 if test ${gcc_version} '<' 4.0
14506 then
14507 LIBTOOL_CRUFT="-lcc_dynamic"
14508 else
14509 LIBTOOL_CRUFT=""
14510 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014511 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014512 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014513else
14514 cat >conftest.$ac_ext <<_ACEOF
14515/* confdefs.h. */
14516_ACEOF
14517cat confdefs.h >>conftest.$ac_ext
14518cat >>conftest.$ac_ext <<_ACEOF
14519/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014520
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014521 #include <unistd.h>
14522 int main(int argc, char*argv[])
14523 {
14524 if (sizeof(long) == 4) {
14525 return 0;
14526 } else {
14527 return 1;
14528 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014529 }
14530
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014531_ACEOF
14532rm -f conftest$ac_exeext
14533if { (ac_try="$ac_link"
14534case "(($ac_try" in
14535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14536 *) ac_try_echo=$ac_try;;
14537esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014539 (eval "$ac_link") 2>&5
14540 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014542 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14543 { (case "(($ac_try" in
14544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14545 *) ac_try_echo=$ac_try;;
14546esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014548 (eval "$ac_try") 2>&5
14549 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014551 (exit $ac_status); }; }; then
14552 ac_osx_32bit=yes
14553else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014554 echo "$as_me: program exited with status $ac_status" >&5
14555echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014556sed 's/^/| /' conftest.$ac_ext >&5
14557
14558( exit $ac_status )
14559ac_osx_32bit=no
14560fi
14561rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14562fi
14563
14564
14565
14566 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014567 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014568 i386)
14569 MACOSX_DEFAULT_ARCH="i386"
14570 ;;
14571 ppc)
14572 MACOSX_DEFAULT_ARCH="ppc"
14573 ;;
14574 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014575 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14576echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014577 { (exit 1); exit 1; }; }
14578 ;;
14579 esac
14580 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014581 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014582 i386)
14583 MACOSX_DEFAULT_ARCH="x86_64"
14584 ;;
14585 ppc)
14586 MACOSX_DEFAULT_ARCH="ppc64"
14587 ;;
14588 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014589 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14590echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014591 { (exit 1); exit 1; }; }
14592 ;;
14593 esac
14594
14595 #ARCH_RUN_32BIT="true"
14596 fi
14597
14598 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014599 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014600 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014601esac
14602
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014603{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14604echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014605if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014606then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014607 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014608 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014609 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014610
Martin v. Löwis11437992002-04-12 09:54:03 +000014611cat >>confdefs.h <<\_ACEOF
14612#define WITH_NEXT_FRAMEWORK 1
14613_ACEOF
14614
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014615 { echo "$as_me:$LINENO: result: yes" >&5
14616echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014617 if test $enable_shared = "yes"
14618 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014619 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14620echo "$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 +000014621 { (exit 1); exit 1; }; }
14622 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014623else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014624 { echo "$as_me:$LINENO: result: no" >&5
14625echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014626fi
14627
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014628{ echo "$as_me:$LINENO: checking for dyld" >&5
14629echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014630case $ac_sys_system/$ac_sys_release in
14631 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014632
Martin v. Löwis11437992002-04-12 09:54:03 +000014633cat >>confdefs.h <<\_ACEOF
14634#define WITH_DYLD 1
14635_ACEOF
14636
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014637 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14638echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014639 ;;
14640 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014641 { echo "$as_me:$LINENO: result: no" >&5
14642echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014643 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014644esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014645
Guido van Rossum0a516c91994-09-12 10:58:40 +000014646# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014647
Michael W. Hudson54241132001-12-07 15:38:26 +000014648
14649
14650
14651
Benjamin Peterson99f03762010-04-11 22:15:28 +000014652
Guido van Rossum0a516c91994-09-12 10:58:40 +000014653# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014654# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014655{ echo "$as_me:$LINENO: checking SO" >&5
14656echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014657if test -z "$SO"
14658then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014659 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014660 hp*|HP*)
14661 case `uname -m` in
14662 ia64) SO=.so;;
14663 *) SO=.sl;;
14664 esac
14665 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014666 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014667 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014668 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014669else
14670 # this might also be a termcap variable, see #610332
14671 echo
14672 echo '====================================================================='
14673 echo '+ +'
14674 echo '+ WARNING: You have set SO in your environment. +'
14675 echo '+ Do you really mean to change the extension for shared libraries? +'
14676 echo '+ Continuing in 10 seconds to let you to ponder. +'
14677 echo '+ +'
14678 echo '====================================================================='
14679 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014680fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014681{ echo "$as_me:$LINENO: result: $SO" >&5
14682echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014683
Georg Brandlb1441c72009-01-03 22:33:39 +000014684
Thomas Wouters477c8d52006-05-27 19:21:47 +000014685cat >>confdefs.h <<_ACEOF
14686#define SHLIB_EXT "$SO"
14687_ACEOF
14688
Guido van Rossum0a516c91994-09-12 10:58:40 +000014689# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014690# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014691# (Shared libraries in this instance are shared modules to be loaded into
14692# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014693{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14694echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014695if test -z "$LDSHARED"
14696then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014697 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014698 AIX*)
14699 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014700 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014701 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014702 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014703 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014704 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000014705 if test "$GCC" = "yes" ; then
14706 LDSHARED='$(CC) -shared'
14707 LDCXXSHARED='$(CXX) -shared'
14708 else
14709 LDSHARED='$(CC) -G'
14710 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +000014711 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014712 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000014713 if test "$GCC" = "yes" ; then
14714 LDSHARED='$(CC) -shared'
14715 LDCXXSHARED='$(CXX) -shared'
14716 else
14717 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014718 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014719 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014720 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014721 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014722 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +000014723 if test "$enable_framework" ; then
14724 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014725 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14726 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014727 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014728 else
14729 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014730 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +000014731 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014732 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014733 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014734 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014735 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +000014736 if test "$enable_framework" ; then
14737 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014738 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14739 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014740 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014741 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014742 # No framework, use the Python app as bundle-loader
14743 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014744 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014745 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014746 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014747 Darwin/*)
14748 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14749 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014750
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014751 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014752 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014753 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014754 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014755 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014756 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014757 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +000014758 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014759 else
14760 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014761 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +000014762 if test "$enable_framework" ; then
14763 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014764 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14765 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014766 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014767 else
14768 # No framework, use the Python app as bundle-loader
14769 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14770 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014771 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014772 fi
14773 fi
14774 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +000014775 Linux*|GNU*|QNX*)
14776 LDSHARED='$(CC) -shared'
14777 LDCXXSHARED='$(CXX) -shared';;
14778 BSD/OS*/4*)
14779 LDSHARED="gcc -shared"
14780 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014781 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014782 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014783 then
Benjamin Petersonab0a7522010-03-14 15:18:25 +000014784 LDSHARED='$(CC) -shared ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014785 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +000014786 else
14787 LDSHARED="ld -Bshareable ${LDFLAGS}"
14788 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014789 OpenBSD*)
14790 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14791 then
14792 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014793 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014794 else
14795 case `uname -r` in
14796 [01].* | 2.[0-7] | 2.[0-7].*)
14797 LDSHARED="ld -Bshareable ${LDFLAGS}"
14798 ;;
14799 *)
14800 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014801 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014802 ;;
14803 esac
14804 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +000014805 NetBSD*|DragonFly*)
14806 LDSHARED="cc -shared ${LDFLAGS}"
14807 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014808 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000014809 if test "$GCC" = "yes" ; then
14810 LDSHARED='$(CC) -shared'
14811 LDCXXSHARED='$(CXX) -shared'
14812 else
14813 LDSHARED='$(CC) -G'
14814 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014815 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +000014816 SCO_SV*)
14817 LDSHARED='$(CC) -Wl,-G,-Bexport'
14818 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
14819 CYGWIN*)
14820 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
14821 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014822 *) LDSHARED="ld";;
14823 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014824fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014825{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14826echo "${ECHO_T}$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +000014827LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014828BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014829# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014830# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014831{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14832echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014833if test -z "$CCSHARED"
14834then
Guido van Rossum07397971997-04-29 21:49:50 +000014835 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014836 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014837 then CCSHARED="-fPIC";
14838 elif test `uname -p` = sparc;
14839 then CCSHARED="-xcode=pic32";
14840 else CCSHARED="-Kpic";
14841 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014842 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014843 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014844 else CCSHARED="+z";
14845 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014846 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014847 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014848 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014849 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014850 if test "$GCC" = "yes"
14851 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014852 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014853 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014854 SCO_SV*)
14855 if test "$GCC" = "yes"
14856 then CCSHARED="-fPIC"
14857 else CCSHARED="-Kpic -belf"
14858 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014859 IRIX*/6*) case $CC in
14860 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014861 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014862 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014863 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014864fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014865{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14866echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014867# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014868# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014869{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14870echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014871if test -z "$LINKFORSHARED"
14872then
Guido van Rossum07397971997-04-29 21:49:50 +000014873 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014874 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014875 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014876 LINKFORSHARED="-Wl,-E -Wl,+s";;
14877# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014878 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014879 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014880 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014881 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014882 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014883 if test "$enable_framework"
14884 then
Jack Jansenda49e192005-01-07 13:08:22 +000014885 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014886 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014887 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014888 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014889 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014890 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014891 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014892 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14893 then
14894 LINKFORSHARED="-Wl,--export-dynamic"
14895 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014896 SunOS/5*) case $CC in
14897 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014898 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014899 then
14900 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014901 fi;;
14902 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014903 CYGWIN*)
14904 if test $enable_shared = "no"
14905 then
14906 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14907 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014908 QNX*)
14909 # -Wl,-E causes the symbols to be added to the dynamic
14910 # symbol table so that they can be found when a module
14911 # is loaded. -N 2048K causes the stack size to be set
14912 # to 2048 kilobytes so that the stack doesn't overflow
14913 # when running test_compile.py.
14914 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014915 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014916fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014917{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14918echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014919
Michael W. Hudson54241132001-12-07 15:38:26 +000014920
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014921
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014922{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14923echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014924if test ! "$LIBRARY" = "$LDLIBRARY"
14925then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014926 case $ac_sys_system in
14927 CYGWIN*)
14928 # Cygwin needs CCSHARED when building extension DLLs
14929 # but not when building the interpreter DLL.
14930 CFLAGSFORSHARED='';;
14931 *)
14932 CFLAGSFORSHARED='$(CCSHARED)'
14933 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014934fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014935{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14936echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014937
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014938# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14939# library (with --enable-shared).
14940# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014941# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14942# if it is not required, since it creates a dependency of the shared library
14943# to LIBS. This, in turn, means that applications linking the shared libpython
14944# don't need to link LIBS explicitly. The default should be only changed
14945# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014946
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014947{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14948echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014949case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014950 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014951 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014952esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014953{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14954echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014955
14956
Guido van Rossum627b2d71993-12-24 10:39:16 +000014957# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014958
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014959{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14960echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014961if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014962 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014963else
Martin v. Löwis11437992002-04-12 09:54:03 +000014964 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014965LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014966cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014967/* confdefs.h. */
14968_ACEOF
14969cat confdefs.h >>conftest.$ac_ext
14970cat >>conftest.$ac_ext <<_ACEOF
14971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014972
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014973/* Override any GCC internal prototype to avoid an error.
14974 Use char because int might match the return type of a GCC
14975 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014976#ifdef __cplusplus
14977extern "C"
14978#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014979char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014980int
14981main ()
14982{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014983return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014984 ;
14985 return 0;
14986}
14987_ACEOF
14988rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014989if { (ac_try="$ac_link"
14990case "(($ac_try" in
14991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14992 *) ac_try_echo=$ac_try;;
14993esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014995 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014996 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014997 grep -v '^ *+' conftest.er1 >conftest.err
14998 rm -f conftest.er1
14999 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015001 (exit $ac_status); } && {
15002 test -z "$ac_c_werror_flag" ||
15003 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015004 } && test -s conftest$ac_exeext &&
15005 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015006 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015007else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015008 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015009sed 's/^/| /' conftest.$ac_ext >&5
15010
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015011 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015013
15014rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015015 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015016LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015017fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015018{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15019echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15020if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015021 cat >>confdefs.h <<_ACEOF
15022#define HAVE_LIBDL 1
15023_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015024
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015025 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015026
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015027fi
15028 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015029
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015030{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15031echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015032if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015033 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015034else
Martin v. Löwis11437992002-04-12 09:54:03 +000015035 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015036LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015037cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015038/* confdefs.h. */
15039_ACEOF
15040cat confdefs.h >>conftest.$ac_ext
15041cat >>conftest.$ac_ext <<_ACEOF
15042/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015044/* Override any GCC internal prototype to avoid an error.
15045 Use char because int might match the return type of a GCC
15046 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015047#ifdef __cplusplus
15048extern "C"
15049#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015050char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015051int
15052main ()
15053{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015054return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015055 ;
15056 return 0;
15057}
15058_ACEOF
15059rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015060if { (ac_try="$ac_link"
15061case "(($ac_try" in
15062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15063 *) ac_try_echo=$ac_try;;
15064esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015066 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015068 grep -v '^ *+' conftest.er1 >conftest.err
15069 rm -f conftest.er1
15070 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015072 (exit $ac_status); } && {
15073 test -z "$ac_c_werror_flag" ||
15074 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015075 } && test -s conftest$ac_exeext &&
15076 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015077 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015078else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015080sed 's/^/| /' conftest.$ac_ext >&5
15081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015082 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084
15085rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015086 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015087LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015088fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015089{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15090echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15091if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015092 cat >>confdefs.h <<_ACEOF
15093#define HAVE_LIBDLD 1
15094_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015095
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015096 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015097
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015098fi
15099 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015100
Georg Brandlb1441c72009-01-03 22:33:39 +000015101# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015102if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015103 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15104echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015105if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015106 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015107else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015108 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015109cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015110/* confdefs.h. */
15111_ACEOF
15112cat confdefs.h >>conftest.$ac_ext
15113cat >>conftest.$ac_ext <<_ACEOF
15114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015116/* Override any GCC internal prototype to avoid an error.
15117 Use char because int might match the return type of a GCC
15118 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015119#ifdef __cplusplus
15120extern "C"
15121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015122char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015123int
15124main ()
15125{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015126return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015127 ;
15128 return 0;
15129}
15130_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015131for ac_lib in '' pthread rt posix4; do
15132 if test -z "$ac_lib"; then
15133 ac_res="none required"
15134 else
15135 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015136 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015137 fi
15138 rm -f conftest.$ac_objext conftest$ac_exeext
15139if { (ac_try="$ac_link"
15140case "(($ac_try" in
15141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15142 *) ac_try_echo=$ac_try;;
15143esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015145 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015146 ac_status=$?
15147 grep -v '^ *+' conftest.er1 >conftest.err
15148 rm -f conftest.er1
15149 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015151 (exit $ac_status); } && {
15152 test -z "$ac_c_werror_flag" ||
15153 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015154 } && test -s conftest$ac_exeext &&
15155 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015156 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015157else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015158 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015159sed 's/^/| /' conftest.$ac_ext >&5
15160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015161
Thomas Wouters477c8d52006-05-27 19:21:47 +000015162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163
15164rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15165 conftest$ac_exeext
15166 if test "${ac_cv_search_sem_init+set}" = set; then
15167 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015169done
15170if test "${ac_cv_search_sem_init+set}" = set; then
15171 :
15172else
15173 ac_cv_search_sem_init=no
15174fi
15175rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015176LIBS=$ac_func_search_save_LIBS
15177fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015178{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15179echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015180ac_res=$ac_cv_search_sem_init
15181if test "$ac_res" != no; then
15182 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015183
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015184fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015185 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015186 # posix4 on Solaris 2.6
15187 # pthread (first!) on Linux
15188fi
15189
Martin v. Löwis19d17342003-06-14 21:03:05 +000015190# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015191{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15192echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015193if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015194 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015195else
15196 ac_check_lib_save_LIBS=$LIBS
15197LIBS="-lintl $LIBS"
15198cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015199/* confdefs.h. */
15200_ACEOF
15201cat confdefs.h >>conftest.$ac_ext
15202cat >>conftest.$ac_ext <<_ACEOF
15203/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015205/* Override any GCC internal prototype to avoid an error.
15206 Use char because int might match the return type of a GCC
15207 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015208#ifdef __cplusplus
15209extern "C"
15210#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015211char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015212int
15213main ()
15214{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015216 ;
15217 return 0;
15218}
15219_ACEOF
15220rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015221if { (ac_try="$ac_link"
15222case "(($ac_try" in
15223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15224 *) ac_try_echo=$ac_try;;
15225esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015227 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015229 grep -v '^ *+' conftest.er1 >conftest.err
15230 rm -f conftest.er1
15231 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233 (exit $ac_status); } && {
15234 test -z "$ac_c_werror_flag" ||
15235 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015236 } && test -s conftest$ac_exeext &&
15237 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015238 ac_cv_lib_intl_textdomain=yes
15239else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015241sed 's/^/| /' conftest.$ac_ext >&5
15242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015243 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015245
15246rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015247 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015248LIBS=$ac_check_lib_save_LIBS
15249fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015250{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15251echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15252if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015253
15254cat >>confdefs.h <<\_ACEOF
15255#define WITH_LIBINTL 1
15256_ACEOF
15257
Brett Cannonc6d936e2009-06-07 20:09:53 +000015258 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015259fi
15260
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015261
15262# checks for system dependent C++ extensions support
15263case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015264 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15265echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015267/* confdefs.h. */
15268_ACEOF
15269cat confdefs.h >>conftest.$ac_ext
15270cat >>conftest.$ac_ext <<_ACEOF
15271/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015272#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015273int
15274main ()
15275{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015276loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015277 ;
15278 return 0;
15279}
15280_ACEOF
15281rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015282if { (ac_try="$ac_link"
15283case "(($ac_try" in
15284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15285 *) ac_try_echo=$ac_try;;
15286esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015288 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015289 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015290 grep -v '^ *+' conftest.er1 >conftest.err
15291 rm -f conftest.er1
15292 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015294 (exit $ac_status); } && {
15295 test -z "$ac_c_werror_flag" ||
15296 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015297 } && test -s conftest$ac_exeext &&
15298 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015299
Martin v. Löwis11437992002-04-12 09:54:03 +000015300cat >>confdefs.h <<\_ACEOF
15301#define AIX_GENUINE_CPLUSPLUS 1
15302_ACEOF
15303
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015304 { echo "$as_me:$LINENO: result: yes" >&5
15305echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015306else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015307 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015308sed 's/^/| /' conftest.$ac_ext >&5
15309
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015310 { echo "$as_me:$LINENO: result: no" >&5
15311echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015313
15314rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015315 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015316 *) ;;
15317esac
15318
Guido van Rossum70c7f481998-03-26 18:44:10 +000015319# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015320{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15321echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015322if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015323 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015324else
Martin v. Löwis11437992002-04-12 09:54:03 +000015325 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015326LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015327cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015328/* confdefs.h. */
15329_ACEOF
15330cat confdefs.h >>conftest.$ac_ext
15331cat >>conftest.$ac_ext <<_ACEOF
15332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015334/* Override any GCC internal prototype to avoid an error.
15335 Use char because int might match the return type of a GCC
15336 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015337#ifdef __cplusplus
15338extern "C"
15339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015340char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015341int
15342main ()
15343{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015344return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015345 ;
15346 return 0;
15347}
15348_ACEOF
15349rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015350if { (ac_try="$ac_link"
15351case "(($ac_try" in
15352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15353 *) ac_try_echo=$ac_try;;
15354esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015356 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015358 grep -v '^ *+' conftest.er1 >conftest.err
15359 rm -f conftest.er1
15360 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015362 (exit $ac_status); } && {
15363 test -z "$ac_c_werror_flag" ||
15364 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015365 } && test -s conftest$ac_exeext &&
15366 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015367 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015368else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015370sed 's/^/| /' conftest.$ac_ext >&5
15371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015372 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015374
15375rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015376 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015377LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015378fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015379{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15380echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15381if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015382 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015383fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015384 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015385{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15386echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015387if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015388 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015389else
Martin v. Löwis11437992002-04-12 09:54:03 +000015390 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015391LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015392cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015393/* confdefs.h. */
15394_ACEOF
15395cat confdefs.h >>conftest.$ac_ext
15396cat >>conftest.$ac_ext <<_ACEOF
15397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015399/* Override any GCC internal prototype to avoid an error.
15400 Use char because int might match the return type of a GCC
15401 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015402#ifdef __cplusplus
15403extern "C"
15404#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015405char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015406int
15407main ()
15408{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015409return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015410 ;
15411 return 0;
15412}
15413_ACEOF
15414rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015415if { (ac_try="$ac_link"
15416case "(($ac_try" in
15417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15418 *) ac_try_echo=$ac_try;;
15419esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015421 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015423 grep -v '^ *+' conftest.er1 >conftest.err
15424 rm -f conftest.er1
15425 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015427 (exit $ac_status); } && {
15428 test -z "$ac_c_werror_flag" ||
15429 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015430 } && test -s conftest$ac_exeext &&
15431 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015432 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015433else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015435sed 's/^/| /' conftest.$ac_ext >&5
15436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015437 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015439
15440rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015441 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015442LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015443fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015444{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15445echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15446if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015447 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015448fi
15449 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015450
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015451{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15452echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015454# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015455if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015456 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015457{ echo "$as_me:$LINENO: result: $withval" >&5
15458echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015459LIBS="$withval $LIBS"
15460
15461else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015462 { echo "$as_me:$LINENO: result: no" >&5
15463echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015464fi
15465
Guido van Rossum7f43da71994-08-01 12:15:30 +000015466
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000015467if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000015468 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15469set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15470{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15471echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15472if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15473 echo $ECHO_N "(cached) $ECHO_C" >&6
15474else
15475 case $PKG_CONFIG in
15476 [\\/]* | ?:[\\/]*)
15477 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15478 ;;
15479 *)
15480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15481for as_dir in $PATH
15482do
15483 IFS=$as_save_IFS
15484 test -z "$as_dir" && as_dir=.
15485 for ac_exec_ext in '' $ac_executable_extensions; do
15486 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15487 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15488 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15489 break 2
15490 fi
15491done
15492done
15493IFS=$as_save_IFS
15494
15495 ;;
15496esac
15497fi
15498PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15499if test -n "$PKG_CONFIG"; then
15500 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15501echo "${ECHO_T}$PKG_CONFIG" >&6; }
15502else
15503 { echo "$as_me:$LINENO: result: no" >&5
15504echo "${ECHO_T}no" >&6; }
15505fi
15506
15507
15508fi
15509if test -z "$ac_cv_path_PKG_CONFIG"; then
15510 ac_pt_PKG_CONFIG=$PKG_CONFIG
15511 # Extract the first word of "pkg-config", so it can be a program name with args.
15512set dummy pkg-config; ac_word=$2
15513{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15514echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15515if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15516 echo $ECHO_N "(cached) $ECHO_C" >&6
15517else
15518 case $ac_pt_PKG_CONFIG in
15519 [\\/]* | ?:[\\/]*)
15520 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15521 ;;
15522 *)
15523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15524for as_dir in $PATH
15525do
15526 IFS=$as_save_IFS
15527 test -z "$as_dir" && as_dir=.
15528 for ac_exec_ext in '' $ac_executable_extensions; do
15529 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15530 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15531 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15532 break 2
15533 fi
15534done
15535done
15536IFS=$as_save_IFS
15537
15538 ;;
15539esac
15540fi
15541ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15542if test -n "$ac_pt_PKG_CONFIG"; then
15543 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15544echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15545else
15546 { echo "$as_me:$LINENO: result: no" >&5
15547echo "${ECHO_T}no" >&6; }
15548fi
15549
15550 if test "x$ac_pt_PKG_CONFIG" = x; then
15551 PKG_CONFIG=""
15552 else
15553 case $cross_compiling:$ac_tool_warned in
15554yes:)
15555{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15556whose name does not start with the host triplet. If you think this
15557configuration is useful to you, please write to autoconf@gnu.org." >&5
15558echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15559whose name does not start with the host triplet. If you think this
15560configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15561ac_tool_warned=yes ;;
15562esac
15563 PKG_CONFIG=$ac_pt_PKG_CONFIG
15564 fi
15565else
15566 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15567fi
15568
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000015569
15570# Check for use of the system expat library
15571{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15572echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15573
15574# Check whether --with-system_expat was given.
15575if test "${with_system_expat+set}" = set; then
15576 withval=$with_system_expat;
15577fi
15578
15579
15580{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15581echo "${ECHO_T}$with_system_expat" >&6; }
15582
15583# Check for use of the system libffi library
15584{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15585echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
15586
15587# Check whether --with-system_ffi was given.
15588if test "${with_system_ffi+set}" = set; then
15589 withval=$with_system_ffi;
15590fi
15591
15592
15593if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000015594 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15595else
15596 LIBFFI_INCLUDEDIR=""
15597fi
15598
15599
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015600{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15601echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015602
Matthias Klose55708cc2009-04-30 08:06:49 +000015603# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015604{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15605echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015606
15607# Check whether --with-dbmliborder was given.
15608if test "${with_dbmliborder+set}" = set; then
15609 withval=$with_dbmliborder;
15610if test x$with_dbmliborder = xyes
15611then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015612{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15613echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015614 { (exit 1); exit 1; }; }
15615else
15616 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15617 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15618 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015619 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15620echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015621 { (exit 1); exit 1; }; }
15622 fi
15623 done
15624fi
15625fi
15626
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015627{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15628echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015629
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015630# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015631
15632
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015633{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15634echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015635
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015636# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015637if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015638 withval=$with_signal_module;
15639fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015640
15641
15642if test -z "$with_signal_module"
15643then with_signal_module="yes"
15644fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015645{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15646echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015647
15648if test "${with_signal_module}" = "yes"; then
15649 USE_SIGNAL_MODULE=""
15650 SIGNAL_OBJS=""
15651else
15652 USE_SIGNAL_MODULE="#"
15653 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15654fi
15655
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015656# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015657
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015658USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015659
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015660{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15661echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015662
Guido van Rossumec2f0731997-01-22 20:54:01 +000015663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015664# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015665if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015666 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015667{ echo "$as_me:$LINENO: result: $withval" >&5
15668echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015669LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015670if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015671 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015672fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015673else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015674 { echo "$as_me:$LINENO: result: no" >&5
15675echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015676fi
15677
Martin v. Löwis11437992002-04-12 09:54:03 +000015678
15679# Templates for things AC_DEFINEd more than once.
15680# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015681
15682
Martin v. Löwis11437992002-04-12 09:54:03 +000015683
15684
15685
15686
15687
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015688{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15689echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015690
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015691# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015692if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015693 withval=$with_threads;
15694fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015695
15696
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015697# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015699# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015700if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015701 withval=$with_thread; with_threads=$with_thread
15702fi
15703
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015704
15705if test -z "$with_threads"
15706then with_threads="yes"
15707fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015708{ echo "$as_me:$LINENO: result: $with_threads" >&5
15709echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015710
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015711
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015712if test "$with_threads" = "no"
15713then
15714 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015715elif test "$ac_cv_pthread_is_default" = yes
15716then
Martin v. Löwis11437992002-04-12 09:54:03 +000015717 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015718#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015719_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015720
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015721 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015722 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015723#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015724_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015725
15726 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015727 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015728elif test "$ac_cv_kpthread" = "yes"
15729then
15730 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015731 if test "$ac_cv_cxx_thread" = "yes"; then
15732 CXX="$CXX -Kpthread"
15733 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015734 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015735#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015736_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015737
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015738 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015739 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015740elif test "$ac_cv_kthread" = "yes"
15741then
15742 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015743 if test "$ac_cv_cxx_thread" = "yes"; then
15744 CXX="$CXX -Kthread"
15745 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015746 cat >>confdefs.h <<\_ACEOF
15747#define WITH_THREAD 1
15748_ACEOF
15749
15750 posix_threads=yes
15751 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015752elif test "$ac_cv_pthread" = "yes"
15753then
15754 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015755 if test "$ac_cv_cxx_thread" = "yes"; then
15756 CXX="$CXX -pthread"
15757 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015758 cat >>confdefs.h <<\_ACEOF
15759#define WITH_THREAD 1
15760_ACEOF
15761
15762 posix_threads=yes
15763 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015764else
15765 if test ! -z "$with_threads" -a -d "$with_threads"
15766 then LDFLAGS="$LDFLAGS -L$with_threads"
15767 fi
15768 if test ! -z "$withval" -a -d "$withval"
15769 then LDFLAGS="$LDFLAGS -L$withval"
15770 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015771
15772 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015773 # define _POSIX_THREADS in unistd.h. Some apparently don't
15774 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015775 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15776echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015777 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015778/* confdefs.h. */
15779_ACEOF
15780cat confdefs.h >>conftest.$ac_ext
15781cat >>conftest.$ac_ext <<_ACEOF
15782/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015783
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015784#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015785#ifdef _POSIX_THREADS
15786yes
15787#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015788
15789_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015790if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015791 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015792 unistd_defines_pthreads=yes
15793else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015794 unistd_defines_pthreads=no
15795fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015796rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015797
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015798 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15799echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015800
Martin v. Löwis11437992002-04-12 09:54:03 +000015801 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015802#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015803_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015804
Martin v. Löwis11437992002-04-12 09:54:03 +000015805 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015806 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15807echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015808if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015809 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015810fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015811{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15812echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015813else
Martin v. Löwis11437992002-04-12 09:54:03 +000015814 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015815{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15816echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015817cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015818/* confdefs.h. */
15819_ACEOF
15820cat confdefs.h >>conftest.$ac_ext
15821cat >>conftest.$ac_ext <<_ACEOF
15822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015823$ac_includes_default
15824#include <cthreads.h>
15825_ACEOF
15826rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015827if { (ac_try="$ac_compile"
15828case "(($ac_try" in
15829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15830 *) ac_try_echo=$ac_try;;
15831esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015835 grep -v '^ *+' conftest.er1 >conftest.err
15836 rm -f conftest.er1
15837 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015839 (exit $ac_status); } && {
15840 test -z "$ac_c_werror_flag" ||
15841 test ! -s conftest.err
15842 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015843 ac_header_compiler=yes
15844else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015846sed 's/^/| /' conftest.$ac_ext >&5
15847
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015848 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015850
15851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015852{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15853echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015854
15855# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015856{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15857echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015858cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015859/* confdefs.h. */
15860_ACEOF
15861cat confdefs.h >>conftest.$ac_ext
15862cat >>conftest.$ac_ext <<_ACEOF
15863/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015864#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015865_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015866if { (ac_try="$ac_cpp conftest.$ac_ext"
15867case "(($ac_try" in
15868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15869 *) ac_try_echo=$ac_try;;
15870esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015872 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015873 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015874 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015875 rm -f conftest.er1
15876 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015878 (exit $ac_status); } >/dev/null && {
15879 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15880 test ! -s conftest.err
15881 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015882 ac_header_preproc=yes
15883else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015884 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015885sed 's/^/| /' conftest.$ac_ext >&5
15886
Martin v. Löwis11437992002-04-12 09:54:03 +000015887 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015889
Martin v. Löwis11437992002-04-12 09:54:03 +000015890rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015891{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15892echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015893
15894# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015895case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15896 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015897 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15898echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15899 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15900echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015901 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015902 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015903 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015904 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15905echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15906 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15907echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15908 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15909echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15910 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15911echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15912 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15913echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15914 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15915echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015916 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015917## -------------------------------------- ##
15918## Report this to http://bugs.python.org/ ##
15919## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015920_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015921 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015922 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015923esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015924{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15925echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015926if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015927 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015928else
15929 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015930fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015931{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15932echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015933
15934fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015935if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015936 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015937#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015938_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015939
Martin v. Löwis11437992002-04-12 09:54:03 +000015940 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015941#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015942_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015943
Martin v. Löwis11437992002-04-12 09:54:03 +000015944
15945cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015946#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015947_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015948
15949 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015950 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015951else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015952
Martin v. Löwis11437992002-04-12 09:54:03 +000015953 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015954 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15955echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015956if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015957 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015958fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015959{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15960echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015961else
Martin v. Löwis11437992002-04-12 09:54:03 +000015962 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015963{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15964echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015965cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015966/* confdefs.h. */
15967_ACEOF
15968cat confdefs.h >>conftest.$ac_ext
15969cat >>conftest.$ac_ext <<_ACEOF
15970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015971$ac_includes_default
15972#include <mach/cthreads.h>
15973_ACEOF
15974rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015975if { (ac_try="$ac_compile"
15976case "(($ac_try" in
15977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15978 *) ac_try_echo=$ac_try;;
15979esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015981 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015983 grep -v '^ *+' conftest.er1 >conftest.err
15984 rm -f conftest.er1
15985 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015987 (exit $ac_status); } && {
15988 test -z "$ac_c_werror_flag" ||
15989 test ! -s conftest.err
15990 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015991 ac_header_compiler=yes
15992else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015994sed 's/^/| /' conftest.$ac_ext >&5
15995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015996 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015998
15999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016000{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16001echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016002
16003# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016004{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
16005echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016006cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016007/* confdefs.h. */
16008_ACEOF
16009cat confdefs.h >>conftest.$ac_ext
16010cat >>conftest.$ac_ext <<_ACEOF
16011/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016012#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016013_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016014if { (ac_try="$ac_cpp conftest.$ac_ext"
16015case "(($ac_try" in
16016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16017 *) ac_try_echo=$ac_try;;
16018esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016020 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016021 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016022 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016023 rm -f conftest.er1
16024 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016026 (exit $ac_status); } >/dev/null && {
16027 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16028 test ! -s conftest.err
16029 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016030 ac_header_preproc=yes
16031else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016033sed 's/^/| /' conftest.$ac_ext >&5
16034
Martin v. Löwis11437992002-04-12 09:54:03 +000016035 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016037
Martin v. Löwis11437992002-04-12 09:54:03 +000016038rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016039{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16040echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016041
16042# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016043case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16044 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016045 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16046echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16047 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
16048echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016049 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016050 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016051 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016052 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
16053echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
16054 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
16055echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
16056 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
16057echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
16058 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16059echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16060 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
16061echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
16062 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
16063echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016064 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000016065## -------------------------------------- ##
16066## Report this to http://bugs.python.org/ ##
16067## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016068_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016069 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016070 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016071esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016072{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16073echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016074if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016075 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016076else
16077 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016078fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016079{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16080echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016081
16082fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016083if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016084 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016085#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016086_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016087
Martin v. Löwis11437992002-04-12 09:54:03 +000016088 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016089#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016090_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016091
Martin v. Löwis11437992002-04-12 09:54:03 +000016092
16093cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016094#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016095_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016096
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016097 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016098else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016099
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016100 # Just looking for pthread_create in libpthread is not enough:
16101 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16102 # So we really have to include pthread.h, and then link.
16103 _libs=$LIBS
16104 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016105 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16106echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016107 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016108/* confdefs.h. */
16109_ACEOF
16110cat confdefs.h >>conftest.$ac_ext
16111cat >>conftest.$ac_ext <<_ACEOF
16112/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016113#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016114
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016115void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016116int
16117main ()
16118{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016119
16120pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016121 ;
16122 return 0;
16123}
16124_ACEOF
16125rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016126if { (ac_try="$ac_link"
16127case "(($ac_try" in
16128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16129 *) ac_try_echo=$ac_try;;
16130esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016132 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016133 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016134 grep -v '^ *+' conftest.er1 >conftest.err
16135 rm -f conftest.er1
16136 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016138 (exit $ac_status); } && {
16139 test -z "$ac_c_werror_flag" ||
16140 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016141 } && test -s conftest$ac_exeext &&
16142 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016143
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016144 { echo "$as_me:$LINENO: result: yes" >&5
16145echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016146 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016147#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016148_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016149
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016150 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016151 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016152else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016154sed 's/^/| /' conftest.$ac_ext >&5
16155
Martin v. Löwis11437992002-04-12 09:54:03 +000016156
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016157 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016158 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16159echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016160if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016161 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016162else
Martin v. Löwis11437992002-04-12 09:54:03 +000016163 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016164/* confdefs.h. */
16165_ACEOF
16166cat confdefs.h >>conftest.$ac_ext
16167cat >>conftest.$ac_ext <<_ACEOF
16168/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016169/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16170 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16171#define pthread_detach innocuous_pthread_detach
16172
Guido van Rossumad678af1998-10-02 14:42:15 +000016173/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016174 which can conflict with char pthread_detach (); below.
16175 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016176 <limits.h> exists even on freestanding compilers. */
16177
16178#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016179# include <limits.h>
16180#else
16181# include <assert.h>
16182#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016183
16184#undef pthread_detach
16185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016186/* Override any GCC internal prototype to avoid an error.
16187 Use char because int might match the return type of a GCC
16188 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016189#ifdef __cplusplus
16190extern "C"
16191#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016192char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016193/* The GNU C library defines this for functions which it implements
16194 to always fail with ENOSYS. Some functions are actually named
16195 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016196#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016197choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016198#endif
16199
Skip Montanaro6dead952003-09-25 14:50:04 +000016200int
16201main ()
16202{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016203return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016204 ;
16205 return 0;
16206}
16207_ACEOF
16208rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016209if { (ac_try="$ac_link"
16210case "(($ac_try" in
16211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16212 *) ac_try_echo=$ac_try;;
16213esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016215 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016217 grep -v '^ *+' conftest.er1 >conftest.err
16218 rm -f conftest.er1
16219 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016221 (exit $ac_status); } && {
16222 test -z "$ac_c_werror_flag" ||
16223 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016224 } && test -s conftest$ac_exeext &&
16225 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016226 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016227else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016229sed 's/^/| /' conftest.$ac_ext >&5
16230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016231 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016233
16234rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016235 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016236fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016237{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16238echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16239if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016240 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016241#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016242_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016243
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016244 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016245 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016246else
Guido van Rossumad678af1998-10-02 14:42:15 +000016247
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016248 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16249echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016250if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016251 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016252else
Martin v. Löwis11437992002-04-12 09:54:03 +000016253 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016254LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016255cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016256/* confdefs.h. */
16257_ACEOF
16258cat confdefs.h >>conftest.$ac_ext
16259cat >>conftest.$ac_ext <<_ACEOF
16260/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016262/* Override any GCC internal prototype to avoid an error.
16263 Use char because int might match the return type of a GCC
16264 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016265#ifdef __cplusplus
16266extern "C"
16267#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016268char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016269int
16270main ()
16271{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016272return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016273 ;
16274 return 0;
16275}
16276_ACEOF
16277rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016278if { (ac_try="$ac_link"
16279case "(($ac_try" in
16280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16281 *) ac_try_echo=$ac_try;;
16282esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016284 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016285 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016286 grep -v '^ *+' conftest.er1 >conftest.err
16287 rm -f conftest.er1
16288 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016290 (exit $ac_status); } && {
16291 test -z "$ac_c_werror_flag" ||
16292 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016293 } && test -s conftest$ac_exeext &&
16294 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016295 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016296else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016298sed 's/^/| /' conftest.$ac_ext >&5
16299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016300 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016302
16303rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016304 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016305LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016306fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016307{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16308echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16309if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016310 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016311#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016312_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016313
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016314 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016315 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016316 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016317else
Greg Steinadf63d62000-07-05 10:38:09 +000016318
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016319 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16320echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016321if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016322 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016323else
Martin v. Löwis11437992002-04-12 09:54:03 +000016324 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016325LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016327/* confdefs.h. */
16328_ACEOF
16329cat confdefs.h >>conftest.$ac_ext
16330cat >>conftest.$ac_ext <<_ACEOF
16331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016333/* Override any GCC internal prototype to avoid an error.
16334 Use char because int might match the return type of a GCC
16335 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016336#ifdef __cplusplus
16337extern "C"
16338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016339char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016340int
16341main ()
16342{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016343return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016344 ;
16345 return 0;
16346}
16347_ACEOF
16348rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016349if { (ac_try="$ac_link"
16350case "(($ac_try" in
16351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16352 *) ac_try_echo=$ac_try;;
16353esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016355 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016357 grep -v '^ *+' conftest.er1 >conftest.err
16358 rm -f conftest.er1
16359 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016361 (exit $ac_status); } && {
16362 test -z "$ac_c_werror_flag" ||
16363 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016364 } && test -s conftest$ac_exeext &&
16365 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016366 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016367else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016369sed 's/^/| /' conftest.$ac_ext >&5
16370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016371 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016373
16374rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016375 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016376LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016377fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016378{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16379echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16380if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016381 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016382#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016383_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016384
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016385 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016386 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016387 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016388else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016389
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016390 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16391echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016392if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016393 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016394else
Martin v. Löwis11437992002-04-12 09:54:03 +000016395 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016396LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016397cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016398/* confdefs.h. */
16399_ACEOF
16400cat confdefs.h >>conftest.$ac_ext
16401cat >>conftest.$ac_ext <<_ACEOF
16402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016403
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016404/* Override any GCC internal prototype to avoid an error.
16405 Use char because int might match the return type of a GCC
16406 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016407#ifdef __cplusplus
16408extern "C"
16409#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016410char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016411int
16412main ()
16413{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016414return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016415 ;
16416 return 0;
16417}
16418_ACEOF
16419rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016420if { (ac_try="$ac_link"
16421case "(($ac_try" in
16422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16423 *) ac_try_echo=$ac_try;;
16424esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016426 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016427 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016428 grep -v '^ *+' conftest.er1 >conftest.err
16429 rm -f conftest.er1
16430 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016432 (exit $ac_status); } && {
16433 test -z "$ac_c_werror_flag" ||
16434 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016435 } && test -s conftest$ac_exeext &&
16436 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016437 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016438else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016440sed 's/^/| /' conftest.$ac_ext >&5
16441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016442 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016444
16445rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016446 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016447LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016448fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016449{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16450echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16451if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016452 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016453#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016454_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016455
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016456 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016457 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016458 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016459else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016460
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016461 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16462echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016463if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016464 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016465else
Martin v. Löwis11437992002-04-12 09:54:03 +000016466 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016467LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016468cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016469/* confdefs.h. */
16470_ACEOF
16471cat confdefs.h >>conftest.$ac_ext
16472cat >>conftest.$ac_ext <<_ACEOF
16473/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016475/* Override any GCC internal prototype to avoid an error.
16476 Use char because int might match the return type of a GCC
16477 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016478#ifdef __cplusplus
16479extern "C"
16480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016481char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016482int
16483main ()
16484{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016485return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016486 ;
16487 return 0;
16488}
16489_ACEOF
16490rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016491if { (ac_try="$ac_link"
16492case "(($ac_try" in
16493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16494 *) ac_try_echo=$ac_try;;
16495esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016497 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016499 grep -v '^ *+' conftest.er1 >conftest.err
16500 rm -f conftest.er1
16501 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016503 (exit $ac_status); } && {
16504 test -z "$ac_c_werror_flag" ||
16505 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016506 } && test -s conftest$ac_exeext &&
16507 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016508 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016509else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016511sed 's/^/| /' conftest.$ac_ext >&5
16512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016513 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016515
16516rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016517 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016518LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016519fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016520{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16521echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16522if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016523 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016524#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016525_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016526
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016527 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016528 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016529 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016530else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016531
Martin v. Löwis130fb172001-07-19 11:00:41 +000016532 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016533fi
16534
Guido van Rossum627b2d71993-12-24 10:39:16 +000016535
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016536fi
16537
Guido van Rossum0be3e491997-05-22 20:33:33 +000016538fi
16539
Guido van Rossum49545951997-12-02 19:28:29 +000016540fi
16541
Guido van Rossumb93a8621998-05-07 13:27:32 +000016542fi
16543
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016545
16546rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016547 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016548fi
16549
Martin v. Löwis11437992002-04-12 09:54:03 +000016550
16551fi
16552
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016553
Michael W. Hudson54241132001-12-07 15:38:26 +000016554
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016555 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16556echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016557if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016558 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016559else
Martin v. Löwis11437992002-04-12 09:54:03 +000016560 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016561LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016562cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016563/* confdefs.h. */
16564_ACEOF
16565cat confdefs.h >>conftest.$ac_ext
16566cat >>conftest.$ac_ext <<_ACEOF
16567/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016569/* Override any GCC internal prototype to avoid an error.
16570 Use char because int might match the return type of a GCC
16571 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016572#ifdef __cplusplus
16573extern "C"
16574#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016575char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016576int
16577main ()
16578{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016579return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016580 ;
16581 return 0;
16582}
16583_ACEOF
16584rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016585if { (ac_try="$ac_link"
16586case "(($ac_try" in
16587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16588 *) ac_try_echo=$ac_try;;
16589esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016591 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016593 grep -v '^ *+' conftest.er1 >conftest.err
16594 rm -f conftest.er1
16595 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016597 (exit $ac_status); } && {
16598 test -z "$ac_c_werror_flag" ||
16599 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016600 } && test -s conftest$ac_exeext &&
16601 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016602 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016603else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016605sed 's/^/| /' conftest.$ac_ext >&5
16606
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016607 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016609
16610rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016611 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016612LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016613fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016614{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16615echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16616if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016617 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016618#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016619_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016620
Martin v. Löwis130fb172001-07-19 11:00:41 +000016621 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016622 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016623 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016624fi
16625
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016626
Neal Norwitza978ab02002-11-02 16:58:05 +000016627 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016628 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16629echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016630if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016631 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016632else
Martin v. Löwis11437992002-04-12 09:54:03 +000016633 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016634LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016635cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016636/* confdefs.h. */
16637_ACEOF
16638cat confdefs.h >>conftest.$ac_ext
16639cat >>conftest.$ac_ext <<_ACEOF
16640/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016642/* Override any GCC internal prototype to avoid an error.
16643 Use char because int might match the return type of a GCC
16644 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016645#ifdef __cplusplus
16646extern "C"
16647#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016648char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016649int
16650main ()
16651{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016652return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016653 ;
16654 return 0;
16655}
16656_ACEOF
16657rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016658if { (ac_try="$ac_link"
16659case "(($ac_try" in
16660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16661 *) ac_try_echo=$ac_try;;
16662esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016664 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016665 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016666 grep -v '^ *+' conftest.er1 >conftest.err
16667 rm -f conftest.er1
16668 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016670 (exit $ac_status); } && {
16671 test -z "$ac_c_werror_flag" ||
16672 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016673 } && test -s conftest$ac_exeext &&
16674 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016675 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016676else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016678sed 's/^/| /' conftest.$ac_ext >&5
16679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016680 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016682
16683rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016684 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016685LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016686fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016687{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16688echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16689if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016690 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016691#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016692_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016693
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016694 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016695 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016696 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016697fi
16698
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016699 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016700
Martin v. Löwis130fb172001-07-19 11:00:41 +000016701 if test "$USE_THREAD_MODULE" != "#"
16702 then
16703 # If the above checks didn't disable threads, (at least) OSF1
16704 # needs this '-threads' argument during linking.
16705 case $ac_sys_system in
16706 OSF1) LDLAST=-threads;;
16707 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016708 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016709fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016710
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016711if test "$posix_threads" = "yes"; then
16712 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016713
16714cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016715#define _POSIX_THREADS 1
16716_ACEOF
16717
16718 fi
16719
16720 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16721 case $ac_sys_system/$ac_sys_release in
16722 SunOS/5.6)
16723cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016724#define HAVE_PTHREAD_DESTRUCTOR 1
16725_ACEOF
16726
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016727 ;;
16728 SunOS/5.8)
16729cat >>confdefs.h <<\_ACEOF
16730#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16731_ACEOF
16732
16733 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016734 AIX/5)
16735cat >>confdefs.h <<\_ACEOF
16736#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16737_ACEOF
16738
16739 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016740 esac
16741
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016742 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16743echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016744 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016745 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016746else
16747 if test "$cross_compiling" = yes; then
16748 ac_cv_pthread_system_supported=no
16749else
16750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016751/* confdefs.h. */
16752_ACEOF
16753cat confdefs.h >>conftest.$ac_ext
16754cat >>conftest.$ac_ext <<_ACEOF
16755/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016756#include <pthread.h>
16757 void *foo(void *parm) {
16758 return NULL;
16759 }
16760 main() {
16761 pthread_attr_t attr;
16762 pthread_t id;
16763 if (pthread_attr_init(&attr)) exit(-1);
16764 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16765 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16766 exit(0);
16767 }
16768_ACEOF
16769rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016770if { (ac_try="$ac_link"
16771case "(($ac_try" in
16772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16773 *) ac_try_echo=$ac_try;;
16774esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016776 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016777 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016779 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016780 { (case "(($ac_try" in
16781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16782 *) ac_try_echo=$ac_try;;
16783esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016785 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016786 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016788 (exit $ac_status); }; }; then
16789 ac_cv_pthread_system_supported=yes
16790else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016791 echo "$as_me: program exited with status $ac_status" >&5
16792echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016793sed 's/^/| /' conftest.$ac_ext >&5
16794
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016795( exit $ac_status )
16796ac_cv_pthread_system_supported=no
16797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016798rm -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 +000016799fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016801
16802
Guido van Rossum627b2d71993-12-24 10:39:16 +000016803fi
16804
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016805 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16806echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016807 if test "$ac_cv_pthread_system_supported" = "yes"; then
16808
16809cat >>confdefs.h <<\_ACEOF
16810#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16811_ACEOF
16812
16813 fi
16814
16815for ac_func in pthread_sigmask
16816do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016817as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16818{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16819echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016820if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016821 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016822else
16823 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öwis4ddc78a2006-01-29 09:53:44 +000016829/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16830 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16831#define $ac_func innocuous_$ac_func
16832
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016833/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016834 which can conflict with char $ac_func (); below.
16835 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016836 <limits.h> exists even on freestanding compilers. */
16837
16838#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016839# include <limits.h>
16840#else
16841# include <assert.h>
16842#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016843
16844#undef $ac_func
16845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016846/* Override any GCC internal prototype to avoid an error.
16847 Use char because int might match the return type of a GCC
16848 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016849#ifdef __cplusplus
16850extern "C"
16851#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016852char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016853/* The GNU C library defines this for functions which it implements
16854 to always fail with ENOSYS. Some functions are actually named
16855 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016856#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016857choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016858#endif
16859
Skip Montanaro6dead952003-09-25 14:50:04 +000016860int
16861main ()
16862{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016863return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016864 ;
16865 return 0;
16866}
16867_ACEOF
16868rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016869if { (ac_try="$ac_link"
16870case "(($ac_try" in
16871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16872 *) ac_try_echo=$ac_try;;
16873esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016875 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016876 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016877 grep -v '^ *+' conftest.er1 >conftest.err
16878 rm -f conftest.er1
16879 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016881 (exit $ac_status); } && {
16882 test -z "$ac_c_werror_flag" ||
16883 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016884 } && test -s conftest$ac_exeext &&
16885 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016886 eval "$as_ac_var=yes"
16887else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016888 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016889sed 's/^/| /' conftest.$ac_ext >&5
16890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016891 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016893
16894rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016895 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016896fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016897ac_res=`eval echo '${'$as_ac_var'}'`
16898 { echo "$as_me:$LINENO: result: $ac_res" >&5
16899echo "${ECHO_T}$ac_res" >&6; }
16900if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016901 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016902#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016903_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016904 case $ac_sys_system in
16905 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016906
Jason Tishlerfac083d2003-07-22 15:20:49 +000016907cat >>confdefs.h <<\_ACEOF
16908#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16909_ACEOF
16910
16911 ;;
16912 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016913fi
16914done
16915
16916fi
16917
16918
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016919# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016920
16921
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016922{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16923echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016924# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016925if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016926 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016927 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016928 { echo "$as_me:$LINENO: result: no" >&5
16929echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016930 ipv6=no
16931 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016932 *) { echo "$as_me:$LINENO: result: yes" >&5
16933echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016934 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016935#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016936_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016937
16938 ipv6=yes
16939 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016940 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016941else
Martin v. Löwis11437992002-04-12 09:54:03 +000016942
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016943 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016944 { echo "$as_me:$LINENO: result: no" >&5
16945echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016946 ipv6=no
16947
16948else
Martin v. Löwis11437992002-04-12 09:54:03 +000016949 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016950/* confdefs.h. */
16951_ACEOF
16952cat confdefs.h >>conftest.$ac_ext
16953cat >>conftest.$ac_ext <<_ACEOF
16954/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016955 /* AF_INET6 available check */
16956#include <sys/types.h>
16957#include <sys/socket.h>
16958main()
16959{
16960 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16961 exit(1);
16962 else
16963 exit(0);
16964}
16965
Martin v. Löwis11437992002-04-12 09:54:03 +000016966_ACEOF
16967rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016968if { (ac_try="$ac_link"
16969case "(($ac_try" in
16970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16971 *) ac_try_echo=$ac_try;;
16972esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016974 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016975 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016977 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016978 { (case "(($ac_try" in
16979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16980 *) ac_try_echo=$ac_try;;
16981esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016983 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016984 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016986 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016987 { echo "$as_me:$LINENO: result: yes" >&5
16988echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016989 ipv6=yes
16990else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016991 echo "$as_me: program exited with status $ac_status" >&5
16992echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016993sed 's/^/| /' conftest.$ac_ext >&5
16994
Martin v. Löwis11437992002-04-12 09:54:03 +000016995( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016996{ echo "$as_me:$LINENO: result: no" >&5
16997echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016998 ipv6=no
16999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017000rm -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 +000017001fi
17002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017003
17004
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017005if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017006 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17007echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017008 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017009/* confdefs.h. */
17010_ACEOF
17011cat confdefs.h >>conftest.$ac_ext
17012cat >>conftest.$ac_ext <<_ACEOF
17013/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017014#include <sys/types.h>
17015#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017016int
17017main ()
17018{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017019struct sockaddr_in6 x;
17020x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017021 ;
17022 return 0;
17023}
17024_ACEOF
17025rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017026if { (ac_try="$ac_compile"
17027case "(($ac_try" in
17028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17029 *) ac_try_echo=$ac_try;;
17030esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017032 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017034 grep -v '^ *+' conftest.er1 >conftest.err
17035 rm -f conftest.er1
17036 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017038 (exit $ac_status); } && {
17039 test -z "$ac_c_werror_flag" ||
17040 test ! -s conftest.err
17041 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017042 { echo "$as_me:$LINENO: result: yes" >&5
17043echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017044 ipv6=yes
17045else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017047sed 's/^/| /' conftest.$ac_ext >&5
17048
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017049 { echo "$as_me:$LINENO: result: no" >&5
17050echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017051 ipv6=no
17052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017053
17054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017055fi
17056
17057if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017058 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017059#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017060_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017061
17062fi
17063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017064fi
17065
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017066
17067ipv6type=unknown
17068ipv6lib=none
17069ipv6trylibc=no
17070
17071if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017072 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17073echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017074 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17075 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017076 case $i in
17077 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017078 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017079/* confdefs.h. */
17080_ACEOF
17081cat confdefs.h >>conftest.$ac_ext
17082cat >>conftest.$ac_ext <<_ACEOF
17083/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017084
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017085#include <netinet/in.h>
17086#ifdef IPV6_INRIA_VERSION
17087yes
17088#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017089_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017090if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017091 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017092 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017093fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000017094rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017095
17096 ;;
17097 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017098 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017099/* confdefs.h. */
17100_ACEOF
17101cat confdefs.h >>conftest.$ac_ext
17102cat >>conftest.$ac_ext <<_ACEOF
17103/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017104
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017105#include <netinet/in.h>
17106#ifdef __KAME__
17107yes
17108#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017109_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017110if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017111 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017112 ipv6type=$i;
17113 ipv6lib=inet6
17114 ipv6libdir=/usr/local/v6/lib
17115 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017116fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000017117rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017118
17119 ;;
17120 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017121 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017122/* confdefs.h. */
17123_ACEOF
17124cat confdefs.h >>conftest.$ac_ext
17125cat >>conftest.$ac_ext <<_ACEOF
17126/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017127
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017128#include <features.h>
17129#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17130yes
17131#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017132_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017133if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017134 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017135 ipv6type=$i;
17136 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017137fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000017138rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017139
17140 ;;
17141 linux-inet6)
17142 if test -d /usr/inet6; then
17143 ipv6type=$i
17144 ipv6lib=inet6
17145 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017146 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017147 fi
17148 ;;
17149 solaris)
17150 if test -f /etc/netconfig; then
17151 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17152 ipv6type=$i
17153 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017154 fi
17155 fi
17156 ;;
17157 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017158 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017159/* confdefs.h. */
17160_ACEOF
17161cat confdefs.h >>conftest.$ac_ext
17162cat >>conftest.$ac_ext <<_ACEOF
17163/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017164
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017165#include <sys/param.h>
17166#ifdef _TOSHIBA_INET6
17167yes
17168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017169_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017170if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017171 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017172 ipv6type=$i;
17173 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017174 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017175fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000017176rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017177
17178 ;;
17179 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017180 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017181/* confdefs.h. */
17182_ACEOF
17183cat confdefs.h >>conftest.$ac_ext
17184cat >>conftest.$ac_ext <<_ACEOF
17185/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017186
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017187#include </usr/local/v6/include/sys/v6config.h>
17188#ifdef __V6D__
17189yes
17190#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017191_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017192if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017193 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017194 ipv6type=$i;
17195 ipv6lib=v6;
17196 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017197 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017198fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000017199rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017200
17201 ;;
17202 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017203 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017204/* confdefs.h. */
17205_ACEOF
17206cat confdefs.h >>conftest.$ac_ext
17207cat >>conftest.$ac_ext <<_ACEOF
17208/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017209
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017210#include <sys/param.h>
17211#ifdef _ZETA_MINAMI_INET6
17212yes
17213#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017214_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017216 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017217 ipv6type=$i;
17218 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017219 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017220fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000017221rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017222
17223 ;;
17224 esac
17225 if test "$ipv6type" != "unknown"; then
17226 break
17227 fi
17228 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017229 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17230echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017231fi
17232
17233if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17234 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17235 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17236 echo "using lib$ipv6lib"
17237 else
17238 if test $ipv6trylibc = "yes"; then
17239 echo "using libc"
17240 else
17241 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17242 echo "You need to fetch lib$ipv6lib.a from appropriate"
17243 echo 'ipv6 kit and compile beforehand.'
17244 exit 1
17245 fi
17246 fi
17247fi
17248
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017249{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17250echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017251cat >conftest.$ac_ext <<_ACEOF
17252/* confdefs.h. */
17253_ACEOF
17254cat confdefs.h >>conftest.$ac_ext
17255cat >>conftest.$ac_ext <<_ACEOF
17256/* end confdefs.h. */
17257#include <Carbon/Carbon.h>
17258int
17259main ()
17260{
17261FSIORefNum fRef = 0
17262 ;
17263 return 0;
17264}
17265_ACEOF
17266rm -f conftest.$ac_objext
17267if { (ac_try="$ac_compile"
17268case "(($ac_try" in
17269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17270 *) ac_try_echo=$ac_try;;
17271esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017273 (eval "$ac_compile") 2>conftest.er1
17274 ac_status=$?
17275 grep -v '^ *+' conftest.er1 >conftest.err
17276 rm -f conftest.er1
17277 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017279 (exit $ac_status); } && {
17280 test -z "$ac_c_werror_flag" ||
17281 test ! -s conftest.err
17282 } && test -s conftest.$ac_objext; then
17283
17284cat >>confdefs.h <<\_ACEOF
17285#define HAVE_OSX105_SDK 1
17286_ACEOF
17287
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017288 { echo "$as_me:$LINENO: result: yes" >&5
17289echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017290else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017291 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017292sed 's/^/| /' conftest.$ac_ext >&5
17293
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017294 { echo "$as_me:$LINENO: result: no" >&5
17295echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017296
17297fi
17298
17299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17300
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017301# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017302{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17303echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017305# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017306if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017307 withval=$with_doc_strings;
17308fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017309
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017310
17311if test -z "$with_doc_strings"
17312then with_doc_strings="yes"
17313fi
17314if test "$with_doc_strings" != "no"
17315then
17316
17317cat >>confdefs.h <<\_ACEOF
17318#define WITH_DOC_STRINGS 1
17319_ACEOF
17320
17321fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017322{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17323echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017324
Neil Schemenauera35c6882001-02-27 04:45:05 +000017325# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017326{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17327echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017328
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017329# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017330if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017331 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017332if test "$withval" != no
17333then
17334
17335cat >>confdefs.h <<\_ACEOF
17336#define WITH_TSC 1
17337_ACEOF
17338
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017339 { echo "$as_me:$LINENO: result: yes" >&5
17340echo "${ECHO_T}yes" >&6; }
17341else { echo "$as_me:$LINENO: result: no" >&5
17342echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017343fi
17344else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017345 { echo "$as_me:$LINENO: result: no" >&5
17346echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017347fi
17348
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017349
17350# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017351{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17352echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017354# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017355if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017356 withval=$with_pymalloc;
17357fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017358
Neil Schemenauera35c6882001-02-27 04:45:05 +000017359
Neil Schemenauer16c22972002-03-22 15:34:49 +000017360if test -z "$with_pymalloc"
17361then with_pymalloc="yes"
17362fi
17363if test "$with_pymalloc" != "no"
17364then
Martin v. Löwis11437992002-04-12 09:54:03 +000017365
17366cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017367#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017368_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017369
17370fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017371{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17372echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017373
Benjamin Peterson05159c42009-12-03 03:01:27 +000017374# Check for Valgrind support
17375{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17376echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17377
17378# Check whether --with-valgrind was given.
17379if test "${with_valgrind+set}" = set; then
17380 withval=$with_valgrind;
17381else
17382 with_valgrind=no
17383fi
17384
17385{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17386echo "${ECHO_T}$with_valgrind" >&6; }
17387if test "$with_valgrind" != no; then
17388 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17389 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17390echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17391if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17392 echo $ECHO_N "(cached) $ECHO_C" >&6
17393fi
17394{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17395echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17396else
17397 # Is the header compilable?
17398{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17399echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17400cat >conftest.$ac_ext <<_ACEOF
17401/* confdefs.h. */
17402_ACEOF
17403cat confdefs.h >>conftest.$ac_ext
17404cat >>conftest.$ac_ext <<_ACEOF
17405/* end confdefs.h. */
17406$ac_includes_default
17407#include <valgrind/valgrind.h>
17408_ACEOF
17409rm -f conftest.$ac_objext
17410if { (ac_try="$ac_compile"
17411case "(($ac_try" in
17412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17413 *) ac_try_echo=$ac_try;;
17414esac
17415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17416 (eval "$ac_compile") 2>conftest.er1
17417 ac_status=$?
17418 grep -v '^ *+' conftest.er1 >conftest.err
17419 rm -f conftest.er1
17420 cat conftest.err >&5
17421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17422 (exit $ac_status); } && {
17423 test -z "$ac_c_werror_flag" ||
17424 test ! -s conftest.err
17425 } && test -s conftest.$ac_objext; then
17426 ac_header_compiler=yes
17427else
17428 echo "$as_me: failed program was:" >&5
17429sed 's/^/| /' conftest.$ac_ext >&5
17430
17431 ac_header_compiler=no
17432fi
17433
17434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17435{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17436echo "${ECHO_T}$ac_header_compiler" >&6; }
17437
17438# Is the header present?
17439{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17440echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17441cat >conftest.$ac_ext <<_ACEOF
17442/* confdefs.h. */
17443_ACEOF
17444cat confdefs.h >>conftest.$ac_ext
17445cat >>conftest.$ac_ext <<_ACEOF
17446/* end confdefs.h. */
17447#include <valgrind/valgrind.h>
17448_ACEOF
17449if { (ac_try="$ac_cpp conftest.$ac_ext"
17450case "(($ac_try" in
17451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17452 *) ac_try_echo=$ac_try;;
17453esac
17454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17455 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17456 ac_status=$?
17457 grep -v '^ *+' conftest.er1 >conftest.err
17458 rm -f conftest.er1
17459 cat conftest.err >&5
17460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17461 (exit $ac_status); } >/dev/null && {
17462 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17463 test ! -s conftest.err
17464 }; then
17465 ac_header_preproc=yes
17466else
17467 echo "$as_me: failed program was:" >&5
17468sed 's/^/| /' conftest.$ac_ext >&5
17469
17470 ac_header_preproc=no
17471fi
17472
17473rm -f conftest.err conftest.$ac_ext
17474{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17475echo "${ECHO_T}$ac_header_preproc" >&6; }
17476
17477# So? What about this header?
17478case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17479 yes:no: )
17480 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17481echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17482 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17483echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17484 ac_header_preproc=yes
17485 ;;
17486 no:yes:* )
17487 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17488echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17489 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17490echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17491 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17492echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17493 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17494echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17495 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17496echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17497 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17498echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17499 ( cat <<\_ASBOX
17500## -------------------------------------- ##
17501## Report this to http://bugs.python.org/ ##
17502## -------------------------------------- ##
17503_ASBOX
17504 ) | sed "s/^/$as_me: WARNING: /" >&2
17505 ;;
17506esac
17507{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17508echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17509if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17510 echo $ECHO_N "(cached) $ECHO_C" >&6
17511else
17512 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17513fi
17514{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17515echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17516
17517fi
17518if test $ac_cv_header_valgrind_valgrind_h = yes; then
17519
17520cat >>confdefs.h <<\_ACEOF
17521#define WITH_VALGRIND 1
17522_ACEOF
17523
17524else
17525 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17526echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17527 { (exit 1); exit 1; }; }
17528
17529fi
17530
17531
17532fi
17533
Barry Warsawef82cd72000-06-30 16:21:01 +000017534# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017535{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17536echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017538# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017539if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017540 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017541if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017542then
17543
17544cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017545#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017546_ACEOF
17547
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017548 { echo "$as_me:$LINENO: result: yes" >&5
17549echo "${ECHO_T}yes" >&6; }
17550else { echo "$as_me:$LINENO: result: no" >&5
17551echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017552fi
17553else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017554 { echo "$as_me:$LINENO: result: no" >&5
17555echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017556fi
17557
Barry Warsawef82cd72000-06-30 16:21:01 +000017558
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017559# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017560
Guido van Rossum98935bf2001-09-05 19:13:16 +000017561DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017562
Guido van Rossume97ee181999-12-20 21:27:22 +000017563# the dlopen() function means we might want to use dynload_shlib.o. some
17564# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017565
Thomas Wouters3a584202000-08-05 23:28:51 +000017566for ac_func in dlopen
17567do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017568as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17569{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17570echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017571if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017572 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017573else
Martin v. Löwis11437992002-04-12 09:54:03 +000017574 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017575/* confdefs.h. */
17576_ACEOF
17577cat confdefs.h >>conftest.$ac_ext
17578cat >>conftest.$ac_ext <<_ACEOF
17579/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017580/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17581 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17582#define $ac_func innocuous_$ac_func
17583
Guido van Rossume97ee181999-12-20 21:27:22 +000017584/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017585 which can conflict with char $ac_func (); below.
17586 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017587 <limits.h> exists even on freestanding compilers. */
17588
17589#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017590# include <limits.h>
17591#else
17592# include <assert.h>
17593#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017594
17595#undef $ac_func
17596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017597/* Override any GCC internal prototype to avoid an error.
17598 Use char because int might match the return type of a GCC
17599 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017600#ifdef __cplusplus
17601extern "C"
17602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017603char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017604/* The GNU C library defines this for functions which it implements
17605 to always fail with ENOSYS. Some functions are actually named
17606 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017607#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017608choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017609#endif
17610
Skip Montanaro6dead952003-09-25 14:50:04 +000017611int
17612main ()
17613{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017614return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017615 ;
17616 return 0;
17617}
17618_ACEOF
17619rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017620if { (ac_try="$ac_link"
17621case "(($ac_try" in
17622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17623 *) ac_try_echo=$ac_try;;
17624esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017626 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017627 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017628 grep -v '^ *+' conftest.er1 >conftest.err
17629 rm -f conftest.er1
17630 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017632 (exit $ac_status); } && {
17633 test -z "$ac_c_werror_flag" ||
17634 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017635 } && test -s conftest$ac_exeext &&
17636 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017637 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017638else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017640sed 's/^/| /' conftest.$ac_ext >&5
17641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017642 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017644
17645rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017646 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017647fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017648ac_res=`eval echo '${'$as_ac_var'}'`
17649 { echo "$as_me:$LINENO: result: $ac_res" >&5
17650echo "${ECHO_T}$ac_res" >&6; }
17651if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017652 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017653#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017654_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017655
Guido van Rossume97ee181999-12-20 21:27:22 +000017656fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017657done
Guido van Rossume97ee181999-12-20 21:27:22 +000017658
Michael W. Hudson54241132001-12-07 15:38:26 +000017659
Guido van Rossume97ee181999-12-20 21:27:22 +000017660# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17661# loading of modules.
17662
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017663{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17664echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017665if test -z "$DYNLOADFILE"
17666then
17667 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017668 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17669 if test "$ac_cv_func_dlopen" = yes
17670 then DYNLOADFILE="dynload_shlib.o"
17671 else DYNLOADFILE="dynload_aix.o"
17672 fi
17673 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017674 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017675 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17676 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017677 *)
17678 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17679 # out any dynamic loading
17680 if test "$ac_cv_func_dlopen" = yes
17681 then DYNLOADFILE="dynload_shlib.o"
17682 else DYNLOADFILE="dynload_stub.o"
17683 fi
17684 ;;
17685 esac
17686fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017687{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17688echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017689if test "$DYNLOADFILE" != "dynload_stub.o"
17690then
Martin v. Löwis11437992002-04-12 09:54:03 +000017691
17692cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017693#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017694_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017695
17696fi
17697
Neil Schemenauer4e425612001-06-19 15:44:15 +000017698# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17699
Michael W. Hudson54241132001-12-07 15:38:26 +000017700
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017701{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17702echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017703if test -z "$MACHDEP_OBJS"
17704then
Jack Jansene578a632001-08-15 01:27:14 +000017705 MACHDEP_OBJS=$extra_machdep_objs
17706else
17707 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017708fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017709{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17710echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017711
Guido van Rossum627b2d71993-12-24 10:39:16 +000017712# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
Martin v. Löwisd6320502004-08-12 13:45:08 +000017784
Martin v. Löwisc3001752005-01-23 09:27:24 +000017785
17786
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017787
17788
Thomas Wouterscf297e42007-02-23 15:07:44 +000017789
17790
Gregory P. Smith25523d22007-09-03 16:44:55 +000017791
Christian Heimes4e30a842007-11-30 22:12:06 +000017792
Martin v. Löwis92fab752008-03-08 10:40:41 +000017793
Martin v. Löwis823725e2008-03-24 13:39:54 +000017794
17795
Benjamin Peterson965ce872009-04-05 21:24:58 +000017796
17797
17798
17799
Martin v. Löwis011e8422009-05-05 04:43:17 +000017800
Martin v. Löwis113a0852009-05-29 17:25:39 +000017801
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017802
17803
17804
17805
Antoine Pitroub7572f02009-12-02 20:46:48 +000017806
Martin v. Löwis823725e2008-03-24 13:39:54 +000017807for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17808 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017809 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017810 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +000017811 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017812 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017813 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017814 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17815 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017816 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
17817 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017818 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017819 truncate uname unsetenv utimes waitpid wait3 wait4 \
17820 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017821do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017822as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17823{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17824echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017825if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017826 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017827else
Martin v. Löwis11437992002-04-12 09:54:03 +000017828 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017829/* confdefs.h. */
17830_ACEOF
17831cat confdefs.h >>conftest.$ac_ext
17832cat >>conftest.$ac_ext <<_ACEOF
17833/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017834/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17835 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17836#define $ac_func innocuous_$ac_func
17837
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017838/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017839 which can conflict with char $ac_func (); below.
17840 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017841 <limits.h> exists even on freestanding compilers. */
17842
17843#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017844# include <limits.h>
17845#else
17846# include <assert.h>
17847#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017848
17849#undef $ac_func
17850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017851/* Override any GCC internal prototype to avoid an error.
17852 Use char because int might match the return type of a GCC
17853 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017854#ifdef __cplusplus
17855extern "C"
17856#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017857char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017858/* The GNU C library defines this for functions which it implements
17859 to always fail with ENOSYS. Some functions are actually named
17860 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017861#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017862choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017863#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017864
Skip Montanaro6dead952003-09-25 14:50:04 +000017865int
17866main ()
17867{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017868return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017869 ;
17870 return 0;
17871}
17872_ACEOF
17873rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017874if { (ac_try="$ac_link"
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
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017880 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017882 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
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017886 (exit $ac_status); } && {
17887 test -z "$ac_c_werror_flag" ||
17888 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017889 } && test -s conftest$ac_exeext &&
17890 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017891 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017892else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017893 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017894sed 's/^/| /' conftest.$ac_ext >&5
17895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017896 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017898
17899rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017900 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017901fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017902ac_res=`eval echo '${'$as_ac_var'}'`
17903 { echo "$as_me:$LINENO: result: $ac_res" >&5
17904echo "${ECHO_T}$ac_res" >&6; }
17905if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017906 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017907#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017908_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017909
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017910fi
17911done
17912
Michael W. Hudson54241132001-12-07 15:38:26 +000017913
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017914# For some functions, having a definition is not sufficient, since
17915# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017916{ echo "$as_me:$LINENO: checking for chroot" >&5
17917echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017918cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017919/* confdefs.h. */
17920_ACEOF
17921cat confdefs.h >>conftest.$ac_ext
17922cat >>conftest.$ac_ext <<_ACEOF
17923/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017924#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017925int
17926main ()
17927{
17928void *x=chroot
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öwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +000017950
17951cat >>confdefs.h <<\_ACEOF
17952#define HAVE_CHROOT 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öwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +000017963
17964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017965
17966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017967{ echo "$as_me:$LINENO: checking for link" >&5
17968echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017969cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017970/* confdefs.h. */
17971_ACEOF
17972cat confdefs.h >>conftest.$ac_ext
17973cat >>conftest.$ac_ext <<_ACEOF
17974/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017975#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017976int
17977main ()
17978{
17979void *x=link
17980 ;
17981 return 0;
17982}
17983_ACEOF
17984rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017985if { (ac_try="$ac_compile"
17986case "(($ac_try" in
17987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17988 *) ac_try_echo=$ac_try;;
17989esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017991 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017993 grep -v '^ *+' conftest.er1 >conftest.err
17994 rm -f conftest.er1
17995 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017997 (exit $ac_status); } && {
17998 test -z "$ac_c_werror_flag" ||
17999 test ! -s conftest.err
18000 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018001
18002cat >>confdefs.h <<\_ACEOF
18003#define HAVE_LINK 1
18004_ACEOF
18005
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018006 { echo "$as_me:$LINENO: result: yes" >&5
18007echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018008else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018010sed 's/^/| /' conftest.$ac_ext >&5
18011
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018012 { echo "$as_me:$LINENO: result: no" >&5
18013echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018014
18015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018016
18017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018018{ echo "$as_me:$LINENO: checking for symlink" >&5
18019echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018020cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018021/* confdefs.h. */
18022_ACEOF
18023cat confdefs.h >>conftest.$ac_ext
18024cat >>conftest.$ac_ext <<_ACEOF
18025/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018026#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018027int
18028main ()
18029{
18030void *x=symlink
18031 ;
18032 return 0;
18033}
18034_ACEOF
18035rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018036if { (ac_try="$ac_compile"
18037case "(($ac_try" in
18038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18039 *) ac_try_echo=$ac_try;;
18040esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018042 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018044 grep -v '^ *+' conftest.er1 >conftest.err
18045 rm -f conftest.er1
18046 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018048 (exit $ac_status); } && {
18049 test -z "$ac_c_werror_flag" ||
18050 test ! -s conftest.err
18051 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018052
18053cat >>confdefs.h <<\_ACEOF
18054#define HAVE_SYMLINK 1
18055_ACEOF
18056
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018057 { echo "$as_me:$LINENO: result: yes" >&5
18058echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018059else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018061sed 's/^/| /' conftest.$ac_ext >&5
18062
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018063 { echo "$as_me:$LINENO: result: no" >&5
18064echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018065
18066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018067
18068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018069{ echo "$as_me:$LINENO: checking for fchdir" >&5
18070echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018071cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018072/* confdefs.h. */
18073_ACEOF
18074cat confdefs.h >>conftest.$ac_ext
18075cat >>conftest.$ac_ext <<_ACEOF
18076/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018077#include <unistd.h>
18078int
18079main ()
18080{
18081void *x=fchdir
18082 ;
18083 return 0;
18084}
18085_ACEOF
18086rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018087if { (ac_try="$ac_compile"
18088case "(($ac_try" in
18089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18090 *) ac_try_echo=$ac_try;;
18091esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018093 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018094 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018095 grep -v '^ *+' conftest.er1 >conftest.err
18096 rm -f conftest.er1
18097 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018099 (exit $ac_status); } && {
18100 test -z "$ac_c_werror_flag" ||
18101 test ! -s conftest.err
18102 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018103
18104cat >>confdefs.h <<\_ACEOF
18105#define HAVE_FCHDIR 1
18106_ACEOF
18107
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018108 { echo "$as_me:$LINENO: result: yes" >&5
18109echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018110else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018112sed 's/^/| /' conftest.$ac_ext >&5
18113
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018114 { echo "$as_me:$LINENO: result: no" >&5
18115echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018116
18117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018118
18119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018120{ echo "$as_me:$LINENO: checking for fsync" >&5
18121echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018122cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018123/* confdefs.h. */
18124_ACEOF
18125cat confdefs.h >>conftest.$ac_ext
18126cat >>conftest.$ac_ext <<_ACEOF
18127/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018128#include <unistd.h>
18129int
18130main ()
18131{
18132void *x=fsync
18133 ;
18134 return 0;
18135}
18136_ACEOF
18137rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018138if { (ac_try="$ac_compile"
18139case "(($ac_try" in
18140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18141 *) ac_try_echo=$ac_try;;
18142esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018144 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018146 grep -v '^ *+' conftest.er1 >conftest.err
18147 rm -f conftest.er1
18148 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018150 (exit $ac_status); } && {
18151 test -z "$ac_c_werror_flag" ||
18152 test ! -s conftest.err
18153 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018154
18155cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018156#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018157_ACEOF
18158
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018159 { echo "$as_me:$LINENO: result: yes" >&5
18160echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018161else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018163sed 's/^/| /' conftest.$ac_ext >&5
18164
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018165 { echo "$as_me:$LINENO: result: no" >&5
18166echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018167
18168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018169
18170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018171{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18172echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018173cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018174/* confdefs.h. */
18175_ACEOF
18176cat confdefs.h >>conftest.$ac_ext
18177cat >>conftest.$ac_ext <<_ACEOF
18178/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018179#include <unistd.h>
18180int
18181main ()
18182{
18183void *x=fdatasync
18184 ;
18185 return 0;
18186}
18187_ACEOF
18188rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018189if { (ac_try="$ac_compile"
18190case "(($ac_try" in
18191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18192 *) ac_try_echo=$ac_try;;
18193esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018195 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018197 grep -v '^ *+' conftest.er1 >conftest.err
18198 rm -f conftest.er1
18199 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018201 (exit $ac_status); } && {
18202 test -z "$ac_c_werror_flag" ||
18203 test ! -s conftest.err
18204 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018205
18206cat >>confdefs.h <<\_ACEOF
18207#define HAVE_FDATASYNC 1
18208_ACEOF
18209
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018210 { echo "$as_me:$LINENO: result: yes" >&5
18211echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018212else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018213 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018214sed 's/^/| /' conftest.$ac_ext >&5
18215
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018216 { echo "$as_me:$LINENO: result: no" >&5
18217echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018218
18219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018220
18221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018222{ echo "$as_me:$LINENO: checking for epoll" >&5
18223echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018224cat >conftest.$ac_ext <<_ACEOF
18225/* confdefs.h. */
18226_ACEOF
18227cat confdefs.h >>conftest.$ac_ext
18228cat >>conftest.$ac_ext <<_ACEOF
18229/* end confdefs.h. */
18230#include <sys/epoll.h>
18231int
18232main ()
18233{
18234void *x=epoll_create
18235 ;
18236 return 0;
18237}
18238_ACEOF
18239rm -f conftest.$ac_objext
18240if { (ac_try="$ac_compile"
18241case "(($ac_try" in
18242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18243 *) ac_try_echo=$ac_try;;
18244esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018246 (eval "$ac_compile") 2>conftest.er1
18247 ac_status=$?
18248 grep -v '^ *+' conftest.er1 >conftest.err
18249 rm -f conftest.er1
18250 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018252 (exit $ac_status); } && {
18253 test -z "$ac_c_werror_flag" ||
18254 test ! -s conftest.err
18255 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018256
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018257cat >>confdefs.h <<\_ACEOF
18258#define HAVE_EPOLL 1
18259_ACEOF
18260
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018261 { echo "$as_me:$LINENO: result: yes" >&5
18262echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018263else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018264 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018265sed 's/^/| /' conftest.$ac_ext >&5
18266
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018267 { echo "$as_me:$LINENO: result: no" >&5
18268echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018269
18270fi
18271
18272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018273{ echo "$as_me:$LINENO: checking for kqueue" >&5
18274echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018275cat >conftest.$ac_ext <<_ACEOF
18276/* confdefs.h. */
18277_ACEOF
18278cat confdefs.h >>conftest.$ac_ext
18279cat >>conftest.$ac_ext <<_ACEOF
18280/* end confdefs.h. */
18281
18282#include <sys/types.h>
18283#include <sys/event.h>
18284
18285int
18286main ()
18287{
18288int x=kqueue()
18289 ;
18290 return 0;
18291}
18292_ACEOF
18293rm -f conftest.$ac_objext
18294if { (ac_try="$ac_compile"
18295case "(($ac_try" in
18296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18297 *) ac_try_echo=$ac_try;;
18298esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018300 (eval "$ac_compile") 2>conftest.er1
18301 ac_status=$?
18302 grep -v '^ *+' conftest.er1 >conftest.err
18303 rm -f conftest.er1
18304 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018306 (exit $ac_status); } && {
18307 test -z "$ac_c_werror_flag" ||
18308 test ! -s conftest.err
18309 } && test -s conftest.$ac_objext; then
18310
18311cat >>confdefs.h <<\_ACEOF
18312#define HAVE_KQUEUE 1
18313_ACEOF
18314
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018315 { echo "$as_me:$LINENO: result: yes" >&5
18316echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018317else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018318 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018319sed 's/^/| /' conftest.$ac_ext >&5
18320
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018321 { echo "$as_me:$LINENO: result: no" >&5
18322echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018323
18324fi
18325
18326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018327# On some systems (eg. FreeBSD 5), we would find a definition of the
18328# functions ctermid_r, setgroups in the library, but no prototype
18329# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18330# address to avoid compiler warnings and potential miscompilations
18331# because of the missing prototypes.
18332
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018333{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18334echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018335cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018336/* confdefs.h. */
18337_ACEOF
18338cat confdefs.h >>conftest.$ac_ext
18339cat >>conftest.$ac_ext <<_ACEOF
18340/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018341
18342#include "confdefs.h"
18343#include <stdio.h>
18344
Martin v. Löwisd5843682002-11-21 20:41:28 +000018345int
18346main ()
18347{
18348void* p = ctermid_r
18349 ;
18350 return 0;
18351}
18352_ACEOF
18353rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018354if { (ac_try="$ac_compile"
18355case "(($ac_try" in
18356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18357 *) ac_try_echo=$ac_try;;
18358esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018360 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018362 grep -v '^ *+' conftest.er1 >conftest.err
18363 rm -f conftest.er1
18364 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018366 (exit $ac_status); } && {
18367 test -z "$ac_c_werror_flag" ||
18368 test ! -s conftest.err
18369 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018370
18371cat >>confdefs.h <<\_ACEOF
18372#define HAVE_CTERMID_R 1
18373_ACEOF
18374
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018375 { echo "$as_me:$LINENO: result: yes" >&5
18376echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018377else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018378 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018379sed 's/^/| /' conftest.$ac_ext >&5
18380
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018381 { echo "$as_me:$LINENO: result: no" >&5
18382echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018383
18384fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18387
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018388{ echo "$as_me:$LINENO: checking for flock" >&5
18389echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018390cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018391/* confdefs.h. */
18392_ACEOF
18393cat confdefs.h >>conftest.$ac_ext
18394cat >>conftest.$ac_ext <<_ACEOF
18395/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018396
18397#include "confdefs.h"
18398#include <sys/file.h>
18399
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018400int
18401main ()
18402{
18403void* p = flock
18404 ;
18405 return 0;
18406}
18407_ACEOF
18408rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018409if { (ac_try="$ac_compile"
18410case "(($ac_try" in
18411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18412 *) ac_try_echo=$ac_try;;
18413esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018415 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018417 grep -v '^ *+' conftest.er1 >conftest.err
18418 rm -f conftest.er1
18419 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018421 (exit $ac_status); } && {
18422 test -z "$ac_c_werror_flag" ||
18423 test ! -s conftest.err
18424 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018425
18426cat >>confdefs.h <<\_ACEOF
18427#define HAVE_FLOCK 1
18428_ACEOF
18429
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018430 { echo "$as_me:$LINENO: result: yes" >&5
18431echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018432else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018434sed 's/^/| /' conftest.$ac_ext >&5
18435
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018436 { echo "$as_me:$LINENO: result: no" >&5
18437echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018438
18439fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18442
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018443{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18444echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018445cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018446/* confdefs.h. */
18447_ACEOF
18448cat confdefs.h >>conftest.$ac_ext
18449cat >>conftest.$ac_ext <<_ACEOF
18450/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018451
18452#include "confdefs.h"
18453#include <unistd.h>
18454
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018455int
18456main ()
18457{
18458void* p = getpagesize
18459 ;
18460 return 0;
18461}
18462_ACEOF
18463rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018464if { (ac_try="$ac_compile"
18465case "(($ac_try" in
18466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18467 *) ac_try_echo=$ac_try;;
18468esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018470 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018471 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018472 grep -v '^ *+' conftest.er1 >conftest.err
18473 rm -f conftest.er1
18474 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018476 (exit $ac_status); } && {
18477 test -z "$ac_c_werror_flag" ||
18478 test ! -s conftest.err
18479 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018480
18481cat >>confdefs.h <<\_ACEOF
18482#define HAVE_GETPAGESIZE 1
18483_ACEOF
18484
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018485 { echo "$as_me:$LINENO: result: yes" >&5
18486echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018487else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018488 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018489sed 's/^/| /' conftest.$ac_ext >&5
18490
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018491 { echo "$as_me:$LINENO: result: no" >&5
18492echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018493
18494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018495
18496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018497
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018498for ac_prog in true
18499do
18500 # Extract the first word of "$ac_prog", so it can be a program name with args.
18501set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018502{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18503echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018504if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018505 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018506else
18507 if test -n "$TRUE"; then
18508 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18509else
18510as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18511for as_dir in $PATH
18512do
18513 IFS=$as_save_IFS
18514 test -z "$as_dir" && as_dir=.
18515 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018516 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 +000018517 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018518 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018519 break 2
18520 fi
18521done
18522done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018523IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018524
18525fi
18526fi
18527TRUE=$ac_cv_prog_TRUE
18528if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018529 { echo "$as_me:$LINENO: result: $TRUE" >&5
18530echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018531else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018532 { echo "$as_me:$LINENO: result: no" >&5
18533echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018534fi
18535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018536
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018537 test -n "$TRUE" && break
18538done
18539test -n "$TRUE" || TRUE="/bin/true"
18540
18541
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018542{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18543echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018544if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018545 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018546else
18547 ac_check_lib_save_LIBS=$LIBS
18548LIBS="-lc $LIBS"
18549cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018550/* confdefs.h. */
18551_ACEOF
18552cat confdefs.h >>conftest.$ac_ext
18553cat >>conftest.$ac_ext <<_ACEOF
18554/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018556/* Override any GCC internal prototype to avoid an error.
18557 Use char because int might match the return type of a GCC
18558 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018559#ifdef __cplusplus
18560extern "C"
18561#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018562char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018563int
18564main ()
18565{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018566return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018567 ;
18568 return 0;
18569}
18570_ACEOF
18571rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018572if { (ac_try="$ac_link"
18573case "(($ac_try" in
18574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18575 *) ac_try_echo=$ac_try;;
18576esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018578 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018580 grep -v '^ *+' conftest.er1 >conftest.err
18581 rm -f conftest.er1
18582 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018584 (exit $ac_status); } && {
18585 test -z "$ac_c_werror_flag" ||
18586 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018587 } && test -s conftest$ac_exeext &&
18588 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018589 ac_cv_lib_c_inet_aton=yes
18590else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018592sed 's/^/| /' conftest.$ac_ext >&5
18593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018594 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018596
18597rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018598 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018599LIBS=$ac_check_lib_save_LIBS
18600fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018601{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18602echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18603if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018604 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018605else
18606
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018607{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18608echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018609if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018610 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018611else
18612 ac_check_lib_save_LIBS=$LIBS
18613LIBS="-lresolv $LIBS"
18614cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018615/* confdefs.h. */
18616_ACEOF
18617cat confdefs.h >>conftest.$ac_ext
18618cat >>conftest.$ac_ext <<_ACEOF
18619/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018621/* Override any GCC internal prototype to avoid an error.
18622 Use char because int might match the return type of a GCC
18623 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018624#ifdef __cplusplus
18625extern "C"
18626#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018627char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018628int
18629main ()
18630{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018631return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018632 ;
18633 return 0;
18634}
18635_ACEOF
18636rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018637if { (ac_try="$ac_link"
18638case "(($ac_try" in
18639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18640 *) ac_try_echo=$ac_try;;
18641esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018643 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018645 grep -v '^ *+' conftest.er1 >conftest.err
18646 rm -f conftest.er1
18647 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018649 (exit $ac_status); } && {
18650 test -z "$ac_c_werror_flag" ||
18651 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018652 } && test -s conftest$ac_exeext &&
18653 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018654 ac_cv_lib_resolv_inet_aton=yes
18655else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018656 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018657sed 's/^/| /' conftest.$ac_ext >&5
18658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018659 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018661
18662rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018663 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018664LIBS=$ac_check_lib_save_LIBS
18665fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018666{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18667echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18668if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018669 cat >>confdefs.h <<_ACEOF
18670#define HAVE_LIBRESOLV 1
18671_ACEOF
18672
18673 LIBS="-lresolv $LIBS"
18674
18675fi
18676
18677
18678fi
18679
18680
Christian Heimesd0764e22007-12-04 15:00:33 +000018681# On Tru64, chflags seems to be present, but calling it will
18682# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018683{ echo "$as_me:$LINENO: checking for chflags" >&5
18684echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018685if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018686 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018687else
18688 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018689 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018690else
18691 cat >conftest.$ac_ext <<_ACEOF
18692/* confdefs.h. */
18693_ACEOF
18694cat confdefs.h >>conftest.$ac_ext
18695cat >>conftest.$ac_ext <<_ACEOF
18696/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018697[
Christian Heimesd0764e22007-12-04 15:00:33 +000018698#include <sys/stat.h>
18699#include <unistd.h>
18700int main(int argc, char*argv[])
18701{
18702 if(chflags(argv[0], 0) != 0)
18703 return 1;
18704 return 0;
18705}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018706]
Christian Heimesd0764e22007-12-04 15:00:33 +000018707_ACEOF
18708rm -f conftest$ac_exeext
18709if { (ac_try="$ac_link"
18710case "(($ac_try" in
18711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18712 *) ac_try_echo=$ac_try;;
18713esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018715 (eval "$ac_link") 2>&5
18716 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018718 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18719 { (case "(($ac_try" in
18720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18721 *) ac_try_echo=$ac_try;;
18722esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018724 (eval "$ac_try") 2>&5
18725 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018727 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018728 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018729else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018730 echo "$as_me: program exited with status $ac_status" >&5
18731echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018732sed 's/^/| /' conftest.$ac_ext >&5
18733
18734( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018735ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018736fi
18737rm -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 +000018738fi
18739
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018740
18741
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018742fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018743{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18744echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018745if test "$ac_cv_have_chflags" = cross ; then
18746 { echo "$as_me:$LINENO: checking for chflags" >&5
18747echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
18748if test "${ac_cv_func_chflags+set}" = set; then
18749 echo $ECHO_N "(cached) $ECHO_C" >&6
18750else
18751 cat >conftest.$ac_ext <<_ACEOF
18752/* confdefs.h. */
18753_ACEOF
18754cat confdefs.h >>conftest.$ac_ext
18755cat >>conftest.$ac_ext <<_ACEOF
18756/* end confdefs.h. */
18757/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
18758 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18759#define chflags innocuous_chflags
18760
18761/* System header to define __stub macros and hopefully few prototypes,
18762 which can conflict with char chflags (); below.
18763 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18764 <limits.h> exists even on freestanding compilers. */
18765
18766#ifdef __STDC__
18767# include <limits.h>
18768#else
18769# include <assert.h>
18770#endif
18771
18772#undef chflags
18773
18774/* Override any GCC internal prototype to avoid an error.
18775 Use char because int might match the return type of a GCC
18776 builtin and then its argument prototype would still apply. */
18777#ifdef __cplusplus
18778extern "C"
18779#endif
18780char chflags ();
18781/* The GNU C library defines this for functions which it implements
18782 to always fail with ENOSYS. Some functions are actually named
18783 something starting with __ and the normal name is an alias. */
18784#if defined __stub_chflags || defined __stub___chflags
18785choke me
18786#endif
18787
18788int
18789main ()
18790{
18791return chflags ();
18792 ;
18793 return 0;
18794}
18795_ACEOF
18796rm -f conftest.$ac_objext conftest$ac_exeext
18797if { (ac_try="$ac_link"
18798case "(($ac_try" in
18799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18800 *) ac_try_echo=$ac_try;;
18801esac
18802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18803 (eval "$ac_link") 2>conftest.er1
18804 ac_status=$?
18805 grep -v '^ *+' conftest.er1 >conftest.err
18806 rm -f conftest.er1
18807 cat conftest.err >&5
18808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18809 (exit $ac_status); } && {
18810 test -z "$ac_c_werror_flag" ||
18811 test ! -s conftest.err
18812 } && test -s conftest$ac_exeext &&
18813 $as_test_x conftest$ac_exeext; then
18814 ac_cv_func_chflags=yes
18815else
18816 echo "$as_me: failed program was:" >&5
18817sed 's/^/| /' conftest.$ac_ext >&5
18818
18819 ac_cv_func_chflags=no
18820fi
18821
18822rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18823 conftest$ac_exeext conftest.$ac_ext
18824fi
18825{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
18826echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
18827if test $ac_cv_func_chflags = yes; then
18828 ac_cv_have_chflags="yes"
18829else
18830 ac_cv_have_chflags="no"
18831fi
18832
18833fi
18834if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018835
18836cat >>confdefs.h <<\_ACEOF
18837#define HAVE_CHFLAGS 1
18838_ACEOF
18839
18840fi
18841
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018842{ echo "$as_me:$LINENO: checking for lchflags" >&5
18843echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018844if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018845 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018846else
18847 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018848 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018849else
18850 cat >conftest.$ac_ext <<_ACEOF
18851/* confdefs.h. */
18852_ACEOF
18853cat confdefs.h >>conftest.$ac_ext
18854cat >>conftest.$ac_ext <<_ACEOF
18855/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018856[
Christian Heimesd0764e22007-12-04 15:00:33 +000018857#include <sys/stat.h>
18858#include <unistd.h>
18859int main(int argc, char*argv[])
18860{
18861 if(lchflags(argv[0], 0) != 0)
18862 return 1;
18863 return 0;
18864}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018865]
Christian Heimesd0764e22007-12-04 15:00:33 +000018866_ACEOF
18867rm -f conftest$ac_exeext
18868if { (ac_try="$ac_link"
18869case "(($ac_try" in
18870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18871 *) ac_try_echo=$ac_try;;
18872esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018874 (eval "$ac_link") 2>&5
18875 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018877 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18878 { (case "(($ac_try" in
18879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18880 *) ac_try_echo=$ac_try;;
18881esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018883 (eval "$ac_try") 2>&5
18884 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018886 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018887 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018888else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018889 echo "$as_me: program exited with status $ac_status" >&5
18890echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018891sed 's/^/| /' conftest.$ac_ext >&5
18892
18893( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018894ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018895fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18897fi
18898
18899
Christian Heimesd0764e22007-12-04 15:00:33 +000018900
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018901fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018902{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18903echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018904if test "$ac_cv_have_lchflags" = cross ; then
18905 { echo "$as_me:$LINENO: checking for lchflags" >&5
18906echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
18907if test "${ac_cv_func_lchflags+set}" = set; then
18908 echo $ECHO_N "(cached) $ECHO_C" >&6
18909else
18910 cat >conftest.$ac_ext <<_ACEOF
18911/* confdefs.h. */
18912_ACEOF
18913cat confdefs.h >>conftest.$ac_ext
18914cat >>conftest.$ac_ext <<_ACEOF
18915/* end confdefs.h. */
18916/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
18917 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18918#define lchflags innocuous_lchflags
18919
18920/* System header to define __stub macros and hopefully few prototypes,
18921 which can conflict with char lchflags (); below.
18922 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18923 <limits.h> exists even on freestanding compilers. */
18924
18925#ifdef __STDC__
18926# include <limits.h>
18927#else
18928# include <assert.h>
18929#endif
18930
18931#undef lchflags
18932
18933/* Override any GCC internal prototype to avoid an error.
18934 Use char because int might match the return type of a GCC
18935 builtin and then its argument prototype would still apply. */
18936#ifdef __cplusplus
18937extern "C"
18938#endif
18939char lchflags ();
18940/* The GNU C library defines this for functions which it implements
18941 to always fail with ENOSYS. Some functions are actually named
18942 something starting with __ and the normal name is an alias. */
18943#if defined __stub_lchflags || defined __stub___lchflags
18944choke me
18945#endif
18946
18947int
18948main ()
18949{
18950return lchflags ();
18951 ;
18952 return 0;
18953}
18954_ACEOF
18955rm -f conftest.$ac_objext conftest$ac_exeext
18956if { (ac_try="$ac_link"
18957case "(($ac_try" in
18958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18959 *) ac_try_echo=$ac_try;;
18960esac
18961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18962 (eval "$ac_link") 2>conftest.er1
18963 ac_status=$?
18964 grep -v '^ *+' conftest.er1 >conftest.err
18965 rm -f conftest.er1
18966 cat conftest.err >&5
18967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18968 (exit $ac_status); } && {
18969 test -z "$ac_c_werror_flag" ||
18970 test ! -s conftest.err
18971 } && test -s conftest$ac_exeext &&
18972 $as_test_x conftest$ac_exeext; then
18973 ac_cv_func_lchflags=yes
18974else
18975 echo "$as_me: failed program was:" >&5
18976sed 's/^/| /' conftest.$ac_ext >&5
18977
18978 ac_cv_func_lchflags=no
18979fi
18980
18981rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18982 conftest$ac_exeext conftest.$ac_ext
18983fi
18984{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
18985echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
18986if test $ac_cv_func_lchflags = yes; then
18987 ac_cv_have_lchflags="yes"
18988else
18989 ac_cv_have_lchflags="no"
18990fi
18991
18992fi
18993if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018994
18995cat >>confdefs.h <<\_ACEOF
18996#define HAVE_LCHFLAGS 1
18997_ACEOF
18998
18999fi
19000
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019001case $ac_sys_system/$ac_sys_release in
19002Darwin/*)
19003 _CUR_CFLAGS="${CFLAGS}"
19004 _CUR_LDFLAGS="${LDFLAGS}"
19005 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
19006 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
19007 ;;
19008esac
19009
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019010{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
19011echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019012if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019013 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019014else
19015 ac_check_lib_save_LIBS=$LIBS
19016LIBS="-lz $LIBS"
19017cat >conftest.$ac_ext <<_ACEOF
19018/* confdefs.h. */
19019_ACEOF
19020cat confdefs.h >>conftest.$ac_ext
19021cat >>conftest.$ac_ext <<_ACEOF
19022/* end confdefs.h. */
19023
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019024/* Override any GCC internal prototype to avoid an error.
19025 Use char because int might match the return type of a GCC
19026 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019027#ifdef __cplusplus
19028extern "C"
19029#endif
19030char inflateCopy ();
19031int
19032main ()
19033{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019034return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019035 ;
19036 return 0;
19037}
19038_ACEOF
19039rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019040if { (ac_try="$ac_link"
19041case "(($ac_try" in
19042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19043 *) ac_try_echo=$ac_try;;
19044esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019046 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019047 ac_status=$?
19048 grep -v '^ *+' conftest.er1 >conftest.err
19049 rm -f conftest.er1
19050 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019052 (exit $ac_status); } && {
19053 test -z "$ac_c_werror_flag" ||
19054 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019055 } && test -s conftest$ac_exeext &&
19056 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019057 ac_cv_lib_z_inflateCopy=yes
19058else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019059 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019060sed 's/^/| /' conftest.$ac_ext >&5
19061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019062 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019064
19065rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019066 conftest$ac_exeext conftest.$ac_ext
19067LIBS=$ac_check_lib_save_LIBS
19068fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019069{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19070echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19071if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019072
19073cat >>confdefs.h <<\_ACEOF
19074#define HAVE_ZLIB_COPY 1
19075_ACEOF
19076
19077fi
19078
19079
19080case $ac_sys_system/$ac_sys_release in
19081Darwin/*)
19082 CFLAGS="${_CUR_CFLAGS}"
19083 LDFLAGS="${_CUR_LDFLAGS}"
19084 ;;
19085esac
19086
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019087{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19088echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019089cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019090/* confdefs.h. */
19091_ACEOF
19092cat confdefs.h >>conftest.$ac_ext
19093cat >>conftest.$ac_ext <<_ACEOF
19094/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019095
19096#include "confdefs.h"
19097#include <netdb.h>
19098
Martin v. Löwise9416172003-05-03 10:12:45 +000019099int
19100main ()
19101{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019102void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019103 ;
19104 return 0;
19105}
19106_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019107rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019108if { (ac_try="$ac_link"
19109case "(($ac_try" in
19110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19111 *) ac_try_echo=$ac_try;;
19112esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019114 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019116 grep -v '^ *+' conftest.er1 >conftest.err
19117 rm -f conftest.er1
19118 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019120 (exit $ac_status); } && {
19121 test -z "$ac_c_werror_flag" ||
19122 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019123 } && test -s conftest$ac_exeext &&
19124 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019125
19126cat >>confdefs.h <<\_ACEOF
19127#define HAVE_HSTRERROR 1
19128_ACEOF
19129
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019130 { echo "$as_me:$LINENO: result: yes" >&5
19131echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019132else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019134sed 's/^/| /' conftest.$ac_ext >&5
19135
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019136 { echo "$as_me:$LINENO: result: no" >&5
19137echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019138
19139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019140
19141rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019142 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019143
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019144{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19145echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019146cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019147/* confdefs.h. */
19148_ACEOF
19149cat confdefs.h >>conftest.$ac_ext
19150cat >>conftest.$ac_ext <<_ACEOF
19151/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019152
19153#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019154#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019155#include <sys/socket.h>
19156#include <netinet/in.h>
19157#include <arpa/inet.h>
19158
Martin v. Löwise9416172003-05-03 10:12:45 +000019159int
19160main ()
19161{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019162void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019163 ;
19164 return 0;
19165}
19166_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019167rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019168if { (ac_try="$ac_link"
19169case "(($ac_try" in
19170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19171 *) ac_try_echo=$ac_try;;
19172esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019174 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019176 grep -v '^ *+' conftest.er1 >conftest.err
19177 rm -f conftest.er1
19178 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019180 (exit $ac_status); } && {
19181 test -z "$ac_c_werror_flag" ||
19182 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019183 } && test -s conftest$ac_exeext &&
19184 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019185
19186cat >>confdefs.h <<\_ACEOF
19187#define HAVE_INET_ATON 1
19188_ACEOF
19189
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019190 { echo "$as_me:$LINENO: result: yes" >&5
19191echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019192else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019193 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019194sed 's/^/| /' conftest.$ac_ext >&5
19195
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019196 { echo "$as_me:$LINENO: result: no" >&5
19197echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019198
19199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019200
19201rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019202 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019203
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019204{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19205echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019206cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019207/* confdefs.h. */
19208_ACEOF
19209cat confdefs.h >>conftest.$ac_ext
19210cat >>conftest.$ac_ext <<_ACEOF
19211/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019212
19213#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019214#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019215#include <sys/socket.h>
19216#include <netinet/in.h>
19217#include <arpa/inet.h>
19218
Martin v. Löwise9416172003-05-03 10:12:45 +000019219int
19220main ()
19221{
19222void* p = inet_pton
19223 ;
19224 return 0;
19225}
19226_ACEOF
19227rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019228if { (ac_try="$ac_compile"
19229case "(($ac_try" in
19230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19231 *) ac_try_echo=$ac_try;;
19232esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019236 grep -v '^ *+' conftest.er1 >conftest.err
19237 rm -f conftest.er1
19238 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019240 (exit $ac_status); } && {
19241 test -z "$ac_c_werror_flag" ||
19242 test ! -s conftest.err
19243 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019244
19245cat >>confdefs.h <<\_ACEOF
19246#define HAVE_INET_PTON 1
19247_ACEOF
19248
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019249 { echo "$as_me:$LINENO: result: yes" >&5
19250echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019251else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019252 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019253sed 's/^/| /' conftest.$ac_ext >&5
19254
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019255 { echo "$as_me:$LINENO: result: no" >&5
19256echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019257
19258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019259
19260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019261
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019262# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019263{ echo "$as_me:$LINENO: checking for setgroups" >&5
19264echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019265cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019266/* confdefs.h. */
19267_ACEOF
19268cat confdefs.h >>conftest.$ac_ext
19269cat >>conftest.$ac_ext <<_ACEOF
19270/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019271
19272#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019273#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019274#ifdef HAVE_GRP_H
19275#include <grp.h>
19276#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019277
Martin v. Löwisd5843682002-11-21 20:41:28 +000019278int
19279main ()
19280{
19281void* p = setgroups
19282 ;
19283 return 0;
19284}
19285_ACEOF
19286rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019287if { (ac_try="$ac_compile"
19288case "(($ac_try" in
19289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19290 *) ac_try_echo=$ac_try;;
19291esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019293 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019294 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019295 grep -v '^ *+' conftest.er1 >conftest.err
19296 rm -f conftest.er1
19297 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019299 (exit $ac_status); } && {
19300 test -z "$ac_c_werror_flag" ||
19301 test ! -s conftest.err
19302 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019303
19304cat >>confdefs.h <<\_ACEOF
19305#define HAVE_SETGROUPS 1
19306_ACEOF
19307
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019308 { echo "$as_me:$LINENO: result: yes" >&5
19309echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019310else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019312sed 's/^/| /' conftest.$ac_ext >&5
19313
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019314 { echo "$as_me:$LINENO: result: no" >&5
19315echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019316
19317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019318
19319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019320
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019321# check for openpty and forkpty
19322
Martin v. Löwis11437992002-04-12 09:54:03 +000019323
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019324for ac_func in openpty
19325do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019326as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19327{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19328echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019329if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019330 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019331else
Martin v. Löwis11437992002-04-12 09:54:03 +000019332 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019333/* confdefs.h. */
19334_ACEOF
19335cat confdefs.h >>conftest.$ac_ext
19336cat >>conftest.$ac_ext <<_ACEOF
19337/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019338/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19339 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19340#define $ac_func innocuous_$ac_func
19341
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019342/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019343 which can conflict with char $ac_func (); below.
19344 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019345 <limits.h> exists even on freestanding compilers. */
19346
19347#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019348# include <limits.h>
19349#else
19350# include <assert.h>
19351#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019352
19353#undef $ac_func
19354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019355/* Override any GCC internal prototype to avoid an error.
19356 Use char because int might match the return type of a GCC
19357 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019358#ifdef __cplusplus
19359extern "C"
19360#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019361char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019362/* The GNU C library defines this for functions which it implements
19363 to always fail with ENOSYS. Some functions are actually named
19364 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019365#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019366choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019367#endif
19368
Skip Montanaro6dead952003-09-25 14:50:04 +000019369int
19370main ()
19371{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019372return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019373 ;
19374 return 0;
19375}
19376_ACEOF
19377rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019378if { (ac_try="$ac_link"
19379case "(($ac_try" in
19380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19381 *) ac_try_echo=$ac_try;;
19382esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019384 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019385 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019386 grep -v '^ *+' conftest.er1 >conftest.err
19387 rm -f conftest.er1
19388 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019390 (exit $ac_status); } && {
19391 test -z "$ac_c_werror_flag" ||
19392 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019393 } && test -s conftest$ac_exeext &&
19394 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019395 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019396else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019398sed 's/^/| /' conftest.$ac_ext >&5
19399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019400 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019402
19403rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019404 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019405fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019406ac_res=`eval echo '${'$as_ac_var'}'`
19407 { echo "$as_me:$LINENO: result: $ac_res" >&5
19408echo "${ECHO_T}$ac_res" >&6; }
19409if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019410 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019411#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019412_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019413
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019414else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019415 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19416echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019417if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019418 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019419else
Martin v. Löwis11437992002-04-12 09:54:03 +000019420 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019421LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019422cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019423/* confdefs.h. */
19424_ACEOF
19425cat confdefs.h >>conftest.$ac_ext
19426cat >>conftest.$ac_ext <<_ACEOF
19427/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019428
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 openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019436int
19437main ()
19438{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019439return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019440 ;
19441 return 0;
19442}
19443_ACEOF
19444rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019445if { (ac_try="$ac_link"
19446case "(($ac_try" in
19447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19448 *) ac_try_echo=$ac_try;;
19449esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019451 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019453 grep -v '^ *+' conftest.er1 >conftest.err
19454 rm -f conftest.er1
19455 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019457 (exit $ac_status); } && {
19458 test -z "$ac_c_werror_flag" ||
19459 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019460 } && test -s conftest$ac_exeext &&
19461 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019462 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019463else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019465sed 's/^/| /' conftest.$ac_ext >&5
19466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019467 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019469
19470rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019471 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019472LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019473fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019474{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19475echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19476if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019477 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019478#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019479_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019480 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019481else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019482 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19483echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019484if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019485 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019486else
19487 ac_check_lib_save_LIBS=$LIBS
19488LIBS="-lbsd $LIBS"
19489cat >conftest.$ac_ext <<_ACEOF
19490/* confdefs.h. */
19491_ACEOF
19492cat confdefs.h >>conftest.$ac_ext
19493cat >>conftest.$ac_ext <<_ACEOF
19494/* end confdefs.h. */
19495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019496/* Override any GCC internal prototype to avoid an error.
19497 Use char because int might match the return type of a GCC
19498 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019499#ifdef __cplusplus
19500extern "C"
19501#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019502char openpty ();
19503int
19504main ()
19505{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019506return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019507 ;
19508 return 0;
19509}
19510_ACEOF
19511rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019512if { (ac_try="$ac_link"
19513case "(($ac_try" in
19514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19515 *) ac_try_echo=$ac_try;;
19516esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019518 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019519 ac_status=$?
19520 grep -v '^ *+' conftest.er1 >conftest.err
19521 rm -f conftest.er1
19522 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019524 (exit $ac_status); } && {
19525 test -z "$ac_c_werror_flag" ||
19526 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019527 } && test -s conftest$ac_exeext &&
19528 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019529 ac_cv_lib_bsd_openpty=yes
19530else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019531 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019532sed 's/^/| /' conftest.$ac_ext >&5
19533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019534 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019536
19537rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019538 conftest$ac_exeext conftest.$ac_ext
19539LIBS=$ac_check_lib_save_LIBS
19540fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019541{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19542echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19543if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019544 cat >>confdefs.h <<\_ACEOF
19545#define HAVE_OPENPTY 1
19546_ACEOF
19547 LIBS="$LIBS -lbsd"
19548fi
19549
19550
19551fi
19552
Fred Drake8cef4cf2000-06-28 16:40:38 +000019553
19554fi
19555done
19556
Martin v. Löwis11437992002-04-12 09:54:03 +000019557
Fred Drake8cef4cf2000-06-28 16:40:38 +000019558for ac_func in forkpty
19559do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019560as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19561{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19562echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019563if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019564 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019565else
Martin v. Löwis11437992002-04-12 09:54:03 +000019566 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019567/* confdefs.h. */
19568_ACEOF
19569cat confdefs.h >>conftest.$ac_ext
19570cat >>conftest.$ac_ext <<_ACEOF
19571/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019572/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19573 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19574#define $ac_func innocuous_$ac_func
19575
Fred Drake8cef4cf2000-06-28 16:40:38 +000019576/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019577 which can conflict with char $ac_func (); below.
19578 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019579 <limits.h> exists even on freestanding compilers. */
19580
19581#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019582# include <limits.h>
19583#else
19584# include <assert.h>
19585#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019586
19587#undef $ac_func
19588
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019589/* Override any GCC internal prototype to avoid an error.
19590 Use char because int might match the return type of a GCC
19591 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019592#ifdef __cplusplus
19593extern "C"
19594#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019595char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019596/* The GNU C library defines this for functions which it implements
19597 to always fail with ENOSYS. Some functions are actually named
19598 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019599#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019600choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019601#endif
19602
Skip Montanaro6dead952003-09-25 14:50:04 +000019603int
19604main ()
19605{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019606return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019607 ;
19608 return 0;
19609}
19610_ACEOF
19611rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019612if { (ac_try="$ac_link"
19613case "(($ac_try" in
19614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19615 *) ac_try_echo=$ac_try;;
19616esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019618 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019620 grep -v '^ *+' conftest.er1 >conftest.err
19621 rm -f conftest.er1
19622 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019624 (exit $ac_status); } && {
19625 test -z "$ac_c_werror_flag" ||
19626 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019627 } && test -s conftest$ac_exeext &&
19628 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019629 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019630else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019632sed 's/^/| /' conftest.$ac_ext >&5
19633
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019634 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019636
19637rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019638 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019639fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019640ac_res=`eval echo '${'$as_ac_var'}'`
19641 { echo "$as_me:$LINENO: result: $ac_res" >&5
19642echo "${ECHO_T}$ac_res" >&6; }
19643if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019644 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019645#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019646_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019647
Fred Drake8cef4cf2000-06-28 16:40:38 +000019648else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019649 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19650echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019651if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019652 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019653else
Martin v. Löwis11437992002-04-12 09:54:03 +000019654 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019655LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019656cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019657/* confdefs.h. */
19658_ACEOF
19659cat confdefs.h >>conftest.$ac_ext
19660cat >>conftest.$ac_ext <<_ACEOF
19661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019663/* Override any GCC internal prototype to avoid an error.
19664 Use char because int might match the return type of a GCC
19665 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019666#ifdef __cplusplus
19667extern "C"
19668#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019669char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019670int
19671main ()
19672{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019673return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019674 ;
19675 return 0;
19676}
19677_ACEOF
19678rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019679if { (ac_try="$ac_link"
19680case "(($ac_try" in
19681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19682 *) ac_try_echo=$ac_try;;
19683esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019685 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019686 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019687 grep -v '^ *+' conftest.er1 >conftest.err
19688 rm -f conftest.er1
19689 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019691 (exit $ac_status); } && {
19692 test -z "$ac_c_werror_flag" ||
19693 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019694 } && test -s conftest$ac_exeext &&
19695 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019696 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019697else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019699sed 's/^/| /' conftest.$ac_ext >&5
19700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019701 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019703
19704rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019705 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019706LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019707fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019708{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19709echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19710if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019711 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019712#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019713_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019714 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019715else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019716 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19717echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019718if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019719 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019720else
19721 ac_check_lib_save_LIBS=$LIBS
19722LIBS="-lbsd $LIBS"
19723cat >conftest.$ac_ext <<_ACEOF
19724/* confdefs.h. */
19725_ACEOF
19726cat confdefs.h >>conftest.$ac_ext
19727cat >>conftest.$ac_ext <<_ACEOF
19728/* end confdefs.h. */
19729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019730/* Override any GCC internal prototype to avoid an error.
19731 Use char because int might match the return type of a GCC
19732 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019733#ifdef __cplusplus
19734extern "C"
19735#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019736char forkpty ();
19737int
19738main ()
19739{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019740return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019741 ;
19742 return 0;
19743}
19744_ACEOF
19745rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019746if { (ac_try="$ac_link"
19747case "(($ac_try" in
19748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19749 *) ac_try_echo=$ac_try;;
19750esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019752 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019753 ac_status=$?
19754 grep -v '^ *+' conftest.er1 >conftest.err
19755 rm -f conftest.er1
19756 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019758 (exit $ac_status); } && {
19759 test -z "$ac_c_werror_flag" ||
19760 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019761 } && test -s conftest$ac_exeext &&
19762 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019763 ac_cv_lib_bsd_forkpty=yes
19764else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019765 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019766sed 's/^/| /' conftest.$ac_ext >&5
19767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019768 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019770
19771rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019772 conftest$ac_exeext conftest.$ac_ext
19773LIBS=$ac_check_lib_save_LIBS
19774fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019775{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19776echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19777if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019778 cat >>confdefs.h <<\_ACEOF
19779#define HAVE_FORKPTY 1
19780_ACEOF
19781 LIBS="$LIBS -lbsd"
19782fi
19783
19784
19785fi
19786
Fred Drake8cef4cf2000-06-28 16:40:38 +000019787
19788fi
19789done
19790
Jack Jansendd19cf82001-12-06 22:36:17 +000019791
Christian Heimesb186d002008-03-18 15:15:01 +000019792# Stuff for expat.
19793
19794for ac_func in memmove
19795do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019796as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19797{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19798echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019799if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019800 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019801else
19802 cat >conftest.$ac_ext <<_ACEOF
19803/* confdefs.h. */
19804_ACEOF
19805cat confdefs.h >>conftest.$ac_ext
19806cat >>conftest.$ac_ext <<_ACEOF
19807/* end confdefs.h. */
19808/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19809 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19810#define $ac_func innocuous_$ac_func
19811
19812/* System header to define __stub macros and hopefully few prototypes,
19813 which can conflict with char $ac_func (); below.
19814 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19815 <limits.h> exists even on freestanding compilers. */
19816
19817#ifdef __STDC__
19818# include <limits.h>
19819#else
19820# include <assert.h>
19821#endif
19822
19823#undef $ac_func
19824
19825/* Override any GCC internal prototype to avoid an error.
19826 Use char because int might match the return type of a GCC
19827 builtin and then its argument prototype would still apply. */
19828#ifdef __cplusplus
19829extern "C"
19830#endif
19831char $ac_func ();
19832/* The GNU C library defines this for functions which it implements
19833 to always fail with ENOSYS. Some functions are actually named
19834 something starting with __ and the normal name is an alias. */
19835#if defined __stub_$ac_func || defined __stub___$ac_func
19836choke me
19837#endif
19838
19839int
19840main ()
19841{
19842return $ac_func ();
19843 ;
19844 return 0;
19845}
19846_ACEOF
19847rm -f conftest.$ac_objext conftest$ac_exeext
19848if { (ac_try="$ac_link"
19849case "(($ac_try" in
19850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19851 *) ac_try_echo=$ac_try;;
19852esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019854 (eval "$ac_link") 2>conftest.er1
19855 ac_status=$?
19856 grep -v '^ *+' conftest.er1 >conftest.err
19857 rm -f conftest.er1
19858 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019860 (exit $ac_status); } && {
19861 test -z "$ac_c_werror_flag" ||
19862 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019863 } && test -s conftest$ac_exeext &&
19864 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019865 eval "$as_ac_var=yes"
19866else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019867 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019868sed 's/^/| /' conftest.$ac_ext >&5
19869
19870 eval "$as_ac_var=no"
19871fi
19872
19873rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19874 conftest$ac_exeext conftest.$ac_ext
19875fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019876ac_res=`eval echo '${'$as_ac_var'}'`
19877 { echo "$as_me:$LINENO: result: $ac_res" >&5
19878echo "${ECHO_T}$ac_res" >&6; }
19879if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019880 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019881#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019882_ACEOF
19883
19884fi
19885done
19886
19887
Michael W. Hudson54241132001-12-07 15:38:26 +000019888# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019889
19890
19891
19892
19893
19894
Fred Drake8cef4cf2000-06-28 16:40:38 +000019895for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19896do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019897as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19898{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19899echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019900if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019901 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019902else
Martin v. Löwis11437992002-04-12 09:54:03 +000019903 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019904/* confdefs.h. */
19905_ACEOF
19906cat confdefs.h >>conftest.$ac_ext
19907cat >>conftest.$ac_ext <<_ACEOF
19908/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019909/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19910 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19911#define $ac_func innocuous_$ac_func
19912
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019913/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019914 which can conflict with char $ac_func (); below.
19915 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019916 <limits.h> exists even on freestanding compilers. */
19917
19918#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019919# include <limits.h>
19920#else
19921# include <assert.h>
19922#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019923
19924#undef $ac_func
19925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019926/* Override any GCC internal prototype to avoid an error.
19927 Use char because int might match the return type of a GCC
19928 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019929#ifdef __cplusplus
19930extern "C"
19931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019932char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019933/* The GNU C library defines this for functions which it implements
19934 to always fail with ENOSYS. Some functions are actually named
19935 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019936#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019937choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019938#endif
19939
Skip Montanaro6dead952003-09-25 14:50:04 +000019940int
19941main ()
19942{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019943return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019944 ;
19945 return 0;
19946}
19947_ACEOF
19948rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019949if { (ac_try="$ac_link"
19950case "(($ac_try" in
19951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19952 *) ac_try_echo=$ac_try;;
19953esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019955 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019957 grep -v '^ *+' conftest.er1 >conftest.err
19958 rm -f conftest.er1
19959 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019961 (exit $ac_status); } && {
19962 test -z "$ac_c_werror_flag" ||
19963 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019964 } && test -s conftest$ac_exeext &&
19965 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019966 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019967else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019969sed 's/^/| /' conftest.$ac_ext >&5
19970
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019971 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019973
19974rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019975 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019976fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019977ac_res=`eval echo '${'$as_ac_var'}'`
19978 { echo "$as_me:$LINENO: result: $ac_res" >&5
19979echo "${ECHO_T}$ac_res" >&6; }
19980if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019981 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019982#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019983_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019984
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019985fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019986done
19987
Michael W. Hudson54241132001-12-07 15:38:26 +000019988
Martin v. Löwis11437992002-04-12 09:54:03 +000019989
19990
19991
Christian Heimesb186d002008-03-18 15:15:01 +000019992for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019993do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019994as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19995{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19996echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019997if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019998 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019999else
Martin v. Löwis11437992002-04-12 09:54:03 +000020000 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020001/* confdefs.h. */
20002_ACEOF
20003cat confdefs.h >>conftest.$ac_ext
20004cat >>conftest.$ac_ext <<_ACEOF
20005/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020006/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20007 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20008#define $ac_func innocuous_$ac_func
20009
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020010/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020011 which can conflict with char $ac_func (); below.
20012 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020013 <limits.h> exists even on freestanding compilers. */
20014
20015#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020016# include <limits.h>
20017#else
20018# include <assert.h>
20019#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020020
20021#undef $ac_func
20022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020023/* Override any GCC internal prototype to avoid an error.
20024 Use char because int might match the return type of a GCC
20025 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020026#ifdef __cplusplus
20027extern "C"
20028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020029char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020030/* The GNU C library defines this for functions which it implements
20031 to always fail with ENOSYS. Some functions are actually named
20032 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020033#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020034choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020035#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020036
Skip Montanaro6dead952003-09-25 14:50:04 +000020037int
20038main ()
20039{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020040return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020041 ;
20042 return 0;
20043}
20044_ACEOF
20045rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020046if { (ac_try="$ac_link"
20047case "(($ac_try" in
20048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20049 *) ac_try_echo=$ac_try;;
20050esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020052 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020054 grep -v '^ *+' conftest.er1 >conftest.err
20055 rm -f conftest.er1
20056 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020058 (exit $ac_status); } && {
20059 test -z "$ac_c_werror_flag" ||
20060 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020061 } && test -s conftest$ac_exeext &&
20062 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020063 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020064else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020066sed 's/^/| /' conftest.$ac_ext >&5
20067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020068 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020070
20071rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020072 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020073fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020074ac_res=`eval echo '${'$as_ac_var'}'`
20075 { echo "$as_me:$LINENO: result: $ac_res" >&5
20076echo "${ECHO_T}$ac_res" >&6; }
20077if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020078 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020079#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020080_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020081
Martin v. Löwis1142de32002-03-29 16:28:31 +000020082else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020083 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020084 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020085 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20086 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020087esac
20088
Martin v. Löwis1142de32002-03-29 16:28:31 +000020089fi
20090done
20091
20092
Martin v. Löwis11437992002-04-12 09:54:03 +000020093
Martin v. Löwis1142de32002-03-29 16:28:31 +000020094for ac_func in getpgrp
20095do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020096as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20097{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20098echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020099if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020100 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020101else
Martin v. Löwis11437992002-04-12 09:54:03 +000020102 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020103/* confdefs.h. */
20104_ACEOF
20105cat confdefs.h >>conftest.$ac_ext
20106cat >>conftest.$ac_ext <<_ACEOF
20107/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020108/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20109 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20110#define $ac_func innocuous_$ac_func
20111
Martin v. Löwis1142de32002-03-29 16:28:31 +000020112/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020113 which can conflict with char $ac_func (); below.
20114 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020115 <limits.h> exists even on freestanding compilers. */
20116
20117#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020118# include <limits.h>
20119#else
20120# include <assert.h>
20121#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020122
20123#undef $ac_func
20124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020125/* Override any GCC internal prototype to avoid an error.
20126 Use char because int might match the return type of a GCC
20127 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020128#ifdef __cplusplus
20129extern "C"
20130#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020131char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020132/* The GNU C library defines this for functions which it implements
20133 to always fail with ENOSYS. Some functions are actually named
20134 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020135#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020136choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020137#endif
20138
Skip Montanaro6dead952003-09-25 14:50:04 +000020139int
20140main ()
20141{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020142return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020143 ;
20144 return 0;
20145}
20146_ACEOF
20147rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020148if { (ac_try="$ac_link"
20149case "(($ac_try" in
20150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20151 *) ac_try_echo=$ac_try;;
20152esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020154 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020155 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020156 grep -v '^ *+' conftest.er1 >conftest.err
20157 rm -f conftest.er1
20158 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020160 (exit $ac_status); } && {
20161 test -z "$ac_c_werror_flag" ||
20162 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020163 } && test -s conftest$ac_exeext &&
20164 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020165 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020166else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020168sed 's/^/| /' conftest.$ac_ext >&5
20169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020170 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020172
20173rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020174 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020175fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020176ac_res=`eval echo '${'$as_ac_var'}'`
20177 { echo "$as_me:$LINENO: result: $ac_res" >&5
20178echo "${ECHO_T}$ac_res" >&6; }
20179if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020180 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020181#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020182_ACEOF
20183 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020184/* confdefs.h. */
20185_ACEOF
20186cat confdefs.h >>conftest.$ac_ext
20187cat >>conftest.$ac_ext <<_ACEOF
20188/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020189#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020190int
20191main ()
20192{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020193getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020194 ;
20195 return 0;
20196}
20197_ACEOF
20198rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020199if { (ac_try="$ac_compile"
20200case "(($ac_try" in
20201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20202 *) ac_try_echo=$ac_try;;
20203esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020205 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020207 grep -v '^ *+' conftest.er1 >conftest.err
20208 rm -f conftest.er1
20209 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020211 (exit $ac_status); } && {
20212 test -z "$ac_c_werror_flag" ||
20213 test ! -s conftest.err
20214 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020215
20216cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020217#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020218_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020219
Martin v. Löwis11437992002-04-12 09:54:03 +000020220
Guido van Rossumf78abae1997-01-21 22:02:36 +000020221else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020223sed 's/^/| /' conftest.$ac_ext >&5
20224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020225
Guido van Rossum627b2d71993-12-24 10:39:16 +000020226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020227
20228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020229
Guido van Rossum627b2d71993-12-24 10:39:16 +000020230fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020231done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020232
Jack Jansen150753c2003-03-29 22:07:47 +000020233
20234for ac_func in setpgrp
20235do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020236as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20237{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20238echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020239if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020240 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020241else
Martin v. Löwis11437992002-04-12 09:54:03 +000020242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020243/* confdefs.h. */
20244_ACEOF
20245cat confdefs.h >>conftest.$ac_ext
20246cat >>conftest.$ac_ext <<_ACEOF
20247/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020248/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20249 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20250#define $ac_func innocuous_$ac_func
20251
Jack Jansen150753c2003-03-29 22:07:47 +000020252/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020253 which can conflict with char $ac_func (); below.
20254 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020255 <limits.h> exists even on freestanding compilers. */
20256
20257#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020258# include <limits.h>
20259#else
20260# include <assert.h>
20261#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020262
20263#undef $ac_func
20264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020265/* Override any GCC internal prototype to avoid an error.
20266 Use char because int might match the return type of a GCC
20267 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020268#ifdef __cplusplus
20269extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020270#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020271char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020272/* The GNU C library defines this for functions which it implements
20273 to always fail with ENOSYS. Some functions are actually named
20274 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020275#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020276choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020277#endif
20278
Skip Montanaro6dead952003-09-25 14:50:04 +000020279int
20280main ()
20281{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020282return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020283 ;
20284 return 0;
20285}
20286_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020287rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020288if { (ac_try="$ac_link"
20289case "(($ac_try" in
20290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20291 *) ac_try_echo=$ac_try;;
20292esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020294 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020295 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020296 grep -v '^ *+' conftest.er1 >conftest.err
20297 rm -f conftest.er1
20298 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020300 (exit $ac_status); } && {
20301 test -z "$ac_c_werror_flag" ||
20302 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020303 } && test -s conftest$ac_exeext &&
20304 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020305 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020306else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020307 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020308sed 's/^/| /' conftest.$ac_ext >&5
20309
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020310 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020312
20313rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020314 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020315fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020316ac_res=`eval echo '${'$as_ac_var'}'`
20317 { echo "$as_me:$LINENO: result: $ac_res" >&5
20318echo "${ECHO_T}$ac_res" >&6; }
20319if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020320 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020321#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020322_ACEOF
20323 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020324/* confdefs.h. */
20325_ACEOF
20326cat confdefs.h >>conftest.$ac_ext
20327cat >>conftest.$ac_ext <<_ACEOF
20328/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020329#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020330int
20331main ()
20332{
20333setpgrp(0,0);
20334 ;
20335 return 0;
20336}
20337_ACEOF
20338rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020339if { (ac_try="$ac_compile"
20340case "(($ac_try" in
20341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20342 *) ac_try_echo=$ac_try;;
20343esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020345 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020347 grep -v '^ *+' conftest.er1 >conftest.err
20348 rm -f conftest.er1
20349 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020351 (exit $ac_status); } && {
20352 test -z "$ac_c_werror_flag" ||
20353 test ! -s conftest.err
20354 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020355
20356cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020357#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020358_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020359
Jack Jansen150753c2003-03-29 22:07:47 +000020360
20361else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020363sed 's/^/| /' conftest.$ac_ext >&5
20364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020365
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020367
20368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020369
20370fi
20371done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020372
Martin v. Löwis11437992002-04-12 09:54:03 +000020373
Thomas Wouters3a584202000-08-05 23:28:51 +000020374for ac_func in gettimeofday
20375do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020376as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20377{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20378echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020379if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020380 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020381else
Martin v. Löwis11437992002-04-12 09:54:03 +000020382 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020383/* confdefs.h. */
20384_ACEOF
20385cat confdefs.h >>conftest.$ac_ext
20386cat >>conftest.$ac_ext <<_ACEOF
20387/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020388/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20389 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20390#define $ac_func innocuous_$ac_func
20391
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020392/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020393 which can conflict with char $ac_func (); below.
20394 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020395 <limits.h> exists even on freestanding compilers. */
20396
20397#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020398# include <limits.h>
20399#else
20400# include <assert.h>
20401#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020402
20403#undef $ac_func
20404
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020405/* Override any GCC internal prototype to avoid an error.
20406 Use char because int might match the return type of a GCC
20407 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020408#ifdef __cplusplus
20409extern "C"
20410#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020411char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020412/* The GNU C library defines this for functions which it implements
20413 to always fail with ENOSYS. Some functions are actually named
20414 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020415#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020416choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020417#endif
20418
Skip Montanaro6dead952003-09-25 14:50:04 +000020419int
20420main ()
20421{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020422return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020423 ;
20424 return 0;
20425}
20426_ACEOF
20427rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020428if { (ac_try="$ac_link"
20429case "(($ac_try" in
20430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20431 *) ac_try_echo=$ac_try;;
20432esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020434 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020435 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020436 grep -v '^ *+' conftest.er1 >conftest.err
20437 rm -f conftest.er1
20438 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020440 (exit $ac_status); } && {
20441 test -z "$ac_c_werror_flag" ||
20442 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020443 } && test -s conftest$ac_exeext &&
20444 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020445 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020446else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020448sed 's/^/| /' conftest.$ac_ext >&5
20449
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020450 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020452
20453rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020454 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020455fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020456ac_res=`eval echo '${'$as_ac_var'}'`
20457 { echo "$as_me:$LINENO: result: $ac_res" >&5
20458echo "${ECHO_T}$ac_res" >&6; }
20459if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020460 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020461#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020462_ACEOF
20463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020464/* confdefs.h. */
20465_ACEOF
20466cat confdefs.h >>conftest.$ac_ext
20467cat >>conftest.$ac_ext <<_ACEOF
20468/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020469#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020470int
20471main ()
20472{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020473gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020474 ;
20475 return 0;
20476}
20477_ACEOF
20478rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020479if { (ac_try="$ac_compile"
20480case "(($ac_try" in
20481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20482 *) ac_try_echo=$ac_try;;
20483esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020485 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020487 grep -v '^ *+' conftest.er1 >conftest.err
20488 rm -f conftest.er1
20489 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020491 (exit $ac_status); } && {
20492 test -z "$ac_c_werror_flag" ||
20493 test ! -s conftest.err
20494 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020495 :
20496else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020498sed 's/^/| /' conftest.$ac_ext >&5
20499
Martin v. Löwis11437992002-04-12 09:54:03 +000020500
20501cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020502#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020503_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020504
Martin v. Löwis11437992002-04-12 09:54:03 +000020505
Guido van Rossum627b2d71993-12-24 10:39:16 +000020506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020507
20508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020509
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020510fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020511done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020512
Michael W. Hudson54241132001-12-07 15:38:26 +000020513
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020514{ echo "$as_me:$LINENO: checking for major" >&5
20515echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020516cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020517/* confdefs.h. */
20518_ACEOF
20519cat confdefs.h >>conftest.$ac_ext
20520cat >>conftest.$ac_ext <<_ACEOF
20521/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020522
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020523#if defined(MAJOR_IN_MKDEV)
20524#include <sys/mkdev.h>
20525#elif defined(MAJOR_IN_SYSMACROS)
20526#include <sys/sysmacros.h>
20527#else
20528#include <sys/types.h>
20529#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020530
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020531int
20532main ()
20533{
20534
20535 makedev(major(0),minor(0));
20536
20537 ;
20538 return 0;
20539}
20540_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020541rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020542if { (ac_try="$ac_link"
20543case "(($ac_try" in
20544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20545 *) ac_try_echo=$ac_try;;
20546esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020548 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020549 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020550 grep -v '^ *+' conftest.er1 >conftest.err
20551 rm -f conftest.er1
20552 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020554 (exit $ac_status); } && {
20555 test -z "$ac_c_werror_flag" ||
20556 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020557 } && test -s conftest$ac_exeext &&
20558 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020559
20560
20561cat >>confdefs.h <<\_ACEOF
20562#define HAVE_DEVICE_MACROS 1
20563_ACEOF
20564
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020565 { echo "$as_me:$LINENO: result: yes" >&5
20566echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020567
20568else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020569 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020570sed 's/^/| /' conftest.$ac_ext >&5
20571
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020572
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020573 { echo "$as_me:$LINENO: result: no" >&5
20574echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020575
20576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020577
20578rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020579 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020580
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020581# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020582# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020583{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20584echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020585cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020586/* confdefs.h. */
20587_ACEOF
20588cat confdefs.h >>conftest.$ac_ext
20589cat >>conftest.$ac_ext <<_ACEOF
20590/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020591
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020592#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020593#include <sys/socket.h>
20594#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020595#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020596
Martin v. Löwis11437992002-04-12 09:54:03 +000020597int
20598main ()
20599{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020600getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020601 ;
20602 return 0;
20603}
20604_ACEOF
20605rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020606if { (ac_try="$ac_link"
20607case "(($ac_try" in
20608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20609 *) ac_try_echo=$ac_try;;
20610esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020612 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020614 grep -v '^ *+' conftest.er1 >conftest.err
20615 rm -f conftest.er1
20616 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020618 (exit $ac_status); } && {
20619 test -z "$ac_c_werror_flag" ||
20620 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020621 } && test -s conftest$ac_exeext &&
20622 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020623 have_getaddrinfo=yes
20624else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020625 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020626sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020627
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020628 have_getaddrinfo=no
20629fi
20630
20631rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20632 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020633{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20634echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020635if test $have_getaddrinfo = yes
20636then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020637 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20638echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020639 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020640 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020641else
20642 if test "$cross_compiling" = yes; then
20643 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020644else
Martin v. Löwis11437992002-04-12 09:54:03 +000020645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020646/* confdefs.h. */
20647_ACEOF
20648cat confdefs.h >>conftest.$ac_ext
20649cat >>conftest.$ac_ext <<_ACEOF
20650/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020651
20652#include <sys/types.h>
20653#include <netdb.h>
20654#include <string.h>
20655#include <sys/socket.h>
20656#include <netinet/in.h>
20657
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020658int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020659{
20660 int passive, gaierr, inet4 = 0, inet6 = 0;
20661 struct addrinfo hints, *ai, *aitop;
20662 char straddr[INET6_ADDRSTRLEN], strport[16];
20663
20664 for (passive = 0; passive <= 1; passive++) {
20665 memset(&hints, 0, sizeof(hints));
20666 hints.ai_family = AF_UNSPEC;
20667 hints.ai_flags = passive ? AI_PASSIVE : 0;
20668 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020669 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020670 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20671 (void)gai_strerror(gaierr);
20672 goto bad;
20673 }
20674 for (ai = aitop; ai; ai = ai->ai_next) {
20675 if (ai->ai_addr == NULL ||
20676 ai->ai_addrlen == 0 ||
20677 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20678 straddr, sizeof(straddr), strport, sizeof(strport),
20679 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20680 goto bad;
20681 }
20682 switch (ai->ai_family) {
20683 case AF_INET:
20684 if (strcmp(strport, "54321") != 0) {
20685 goto bad;
20686 }
20687 if (passive) {
20688 if (strcmp(straddr, "0.0.0.0") != 0) {
20689 goto bad;
20690 }
20691 } else {
20692 if (strcmp(straddr, "127.0.0.1") != 0) {
20693 goto bad;
20694 }
20695 }
20696 inet4++;
20697 break;
20698 case AF_INET6:
20699 if (strcmp(strport, "54321") != 0) {
20700 goto bad;
20701 }
20702 if (passive) {
20703 if (strcmp(straddr, "::") != 0) {
20704 goto bad;
20705 }
20706 } else {
20707 if (strcmp(straddr, "::1") != 0) {
20708 goto bad;
20709 }
20710 }
20711 inet6++;
20712 break;
20713 case AF_UNSPEC:
20714 goto bad;
20715 break;
20716 default:
20717 /* another family support? */
20718 break;
20719 }
20720 }
20721 }
20722
20723 if (!(inet4 == 0 || inet4 == 2))
20724 goto bad;
20725 if (!(inet6 == 0 || inet6 == 2))
20726 goto bad;
20727
20728 if (aitop)
20729 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020730 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020731
20732 bad:
20733 if (aitop)
20734 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020735 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020736}
20737
Martin v. Löwis11437992002-04-12 09:54:03 +000020738_ACEOF
20739rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020740if { (ac_try="$ac_link"
20741case "(($ac_try" in
20742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20743 *) ac_try_echo=$ac_try;;
20744esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020746 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020747 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020749 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020750 { (case "(($ac_try" in
20751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20752 *) ac_try_echo=$ac_try;;
20753esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020755 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020756 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020758 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020759 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020760else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020761 echo "$as_me: program exited with status $ac_status" >&5
20762echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020763sed 's/^/| /' conftest.$ac_ext >&5
20764
Martin v. Löwis11437992002-04-12 09:54:03 +000020765( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020766ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020768rm -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 +000020769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020770
20771
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020772fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020773
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020775
Mark Dickinson2df5d282009-12-31 21:22:50 +000020776if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020777then
20778 if test $ipv6 = yes
20779 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020780 echo 'Fatal: You must get working getaddrinfo() function.'
20781 echo ' or you can specify "--disable-ipv6"'.
20782 exit 1
20783 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020784else
Martin v. Löwis11437992002-04-12 09:54:03 +000020785
20786cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020787#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020788_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020789
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020790fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020791
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020792for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020793do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020794as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20795{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20796echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020797if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020798 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020799else
Martin v. Löwis11437992002-04-12 09:54:03 +000020800 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020801/* confdefs.h. */
20802_ACEOF
20803cat confdefs.h >>conftest.$ac_ext
20804cat >>conftest.$ac_ext <<_ACEOF
20805/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020806/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20807 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20808#define $ac_func innocuous_$ac_func
20809
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020810/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020811 which can conflict with char $ac_func (); below.
20812 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020813 <limits.h> exists even on freestanding compilers. */
20814
20815#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020816# include <limits.h>
20817#else
20818# include <assert.h>
20819#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020820
20821#undef $ac_func
20822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020823/* Override any GCC internal prototype to avoid an error.
20824 Use char because int might match the return type of a GCC
20825 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020826#ifdef __cplusplus
20827extern "C"
20828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020829char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020830/* The GNU C library defines this for functions which it implements
20831 to always fail with ENOSYS. Some functions are actually named
20832 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020833#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020834choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020835#endif
20836
Skip Montanaro6dead952003-09-25 14:50:04 +000020837int
20838main ()
20839{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020840return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020841 ;
20842 return 0;
20843}
20844_ACEOF
20845rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020846if { (ac_try="$ac_link"
20847case "(($ac_try" in
20848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20849 *) ac_try_echo=$ac_try;;
20850esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020852 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020853 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020854 grep -v '^ *+' conftest.er1 >conftest.err
20855 rm -f conftest.er1
20856 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020858 (exit $ac_status); } && {
20859 test -z "$ac_c_werror_flag" ||
20860 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020861 } && test -s conftest$ac_exeext &&
20862 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020863 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020864else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020866sed 's/^/| /' conftest.$ac_ext >&5
20867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020868 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020870
20871rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020872 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020873fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020874ac_res=`eval echo '${'$as_ac_var'}'`
20875 { echo "$as_me:$LINENO: result: $ac_res" >&5
20876echo "${ECHO_T}$ac_res" >&6; }
20877if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020878 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020879#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020880_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020881
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020882fi
20883done
20884
Michael W. Hudson54241132001-12-07 15:38:26 +000020885
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020886# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020887{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20888echo $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 +000020889if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020890 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020891else
Martin v. Löwis11437992002-04-12 09:54:03 +000020892 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020893/* confdefs.h. */
20894_ACEOF
20895cat confdefs.h >>conftest.$ac_ext
20896cat >>conftest.$ac_ext <<_ACEOF
20897/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020898#include <sys/types.h>
20899#include <sys/time.h>
20900#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020901
Martin v. Löwis11437992002-04-12 09:54:03 +000020902int
20903main ()
20904{
20905if ((struct tm *) 0)
20906return 0;
20907 ;
20908 return 0;
20909}
20910_ACEOF
20911rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020912if { (ac_try="$ac_compile"
20913case "(($ac_try" in
20914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20915 *) ac_try_echo=$ac_try;;
20916esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020918 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020920 grep -v '^ *+' conftest.er1 >conftest.err
20921 rm -f conftest.er1
20922 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020924 (exit $ac_status); } && {
20925 test -z "$ac_c_werror_flag" ||
20926 test ! -s conftest.err
20927 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020928 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020929else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020930 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020931sed 's/^/| /' conftest.$ac_ext >&5
20932
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020933 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020935
20936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020937fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020938{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20939echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020940if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020941
20942cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020943#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020944_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020945
20946fi
20947
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020948{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20949echo $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 +000020950if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020951 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020952else
Martin v. Löwis11437992002-04-12 09:54:03 +000020953 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020954/* confdefs.h. */
20955_ACEOF
20956cat confdefs.h >>conftest.$ac_ext
20957cat >>conftest.$ac_ext <<_ACEOF
20958/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020959#include <sys/types.h>
20960#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020961
Martin v. Löwis11437992002-04-12 09:54:03 +000020962int
20963main ()
20964{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020965struct tm tm;
20966 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020967 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020968 ;
20969 return 0;
20970}
20971_ACEOF
20972rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020973if { (ac_try="$ac_compile"
20974case "(($ac_try" in
20975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20976 *) ac_try_echo=$ac_try;;
20977esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020979 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020981 grep -v '^ *+' conftest.er1 >conftest.err
20982 rm -f conftest.er1
20983 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020985 (exit $ac_status); } && {
20986 test -z "$ac_c_werror_flag" ||
20987 test ! -s conftest.err
20988 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020989 ac_cv_struct_tm=time.h
20990else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020992sed 's/^/| /' conftest.$ac_ext >&5
20993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020994 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020996
20997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020998fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020999{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
21000echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021001if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021002
21003cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021004#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021005_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021006
21007fi
21008
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021009{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21010echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021011if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021012 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021013else
Martin v. Löwis11437992002-04-12 09:54:03 +000021014 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021015/* confdefs.h. */
21016_ACEOF
21017cat confdefs.h >>conftest.$ac_ext
21018cat >>conftest.$ac_ext <<_ACEOF
21019/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021020#include <sys/types.h>
21021#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021022
21023
Martin v. Löwis11437992002-04-12 09:54:03 +000021024int
21025main ()
21026{
21027static struct tm ac_aggr;
21028if (ac_aggr.tm_zone)
21029return 0;
21030 ;
21031 return 0;
21032}
21033_ACEOF
21034rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021035if { (ac_try="$ac_compile"
21036case "(($ac_try" in
21037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21038 *) ac_try_echo=$ac_try;;
21039esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021041 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021042 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021043 grep -v '^ *+' conftest.er1 >conftest.err
21044 rm -f conftest.er1
21045 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021047 (exit $ac_status); } && {
21048 test -z "$ac_c_werror_flag" ||
21049 test ! -s conftest.err
21050 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021051 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021052else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021054sed 's/^/| /' conftest.$ac_ext >&5
21055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021056 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021057/* confdefs.h. */
21058_ACEOF
21059cat confdefs.h >>conftest.$ac_ext
21060cat >>conftest.$ac_ext <<_ACEOF
21061/* end confdefs.h. */
21062#include <sys/types.h>
21063#include <$ac_cv_struct_tm>
21064
21065
21066int
21067main ()
21068{
21069static struct tm ac_aggr;
21070if (sizeof ac_aggr.tm_zone)
21071return 0;
21072 ;
21073 return 0;
21074}
21075_ACEOF
21076rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021077if { (ac_try="$ac_compile"
21078case "(($ac_try" in
21079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21080 *) ac_try_echo=$ac_try;;
21081esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021083 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021085 grep -v '^ *+' conftest.er1 >conftest.err
21086 rm -f conftest.er1
21087 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021089 (exit $ac_status); } && {
21090 test -z "$ac_c_werror_flag" ||
21091 test ! -s conftest.err
21092 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021093 ac_cv_member_struct_tm_tm_zone=yes
21094else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021096sed 's/^/| /' conftest.$ac_ext >&5
21097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021098 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021100
21101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021103
21104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021105fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021106{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21107echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21108if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021109
21110cat >>confdefs.h <<_ACEOF
21111#define HAVE_STRUCT_TM_TM_ZONE 1
21112_ACEOF
21113
21114
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021115fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021116
Martin v. Löwis11437992002-04-12 09:54:03 +000021117if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21118
21119cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021120#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021121_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021122
21123else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021124 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21125echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021126if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021127 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021128else
21129 cat >conftest.$ac_ext <<_ACEOF
21130/* confdefs.h. */
21131_ACEOF
21132cat confdefs.h >>conftest.$ac_ext
21133cat >>conftest.$ac_ext <<_ACEOF
21134/* end confdefs.h. */
21135#include <time.h>
21136
21137int
21138main ()
21139{
21140#ifndef tzname
21141 (void) tzname;
21142#endif
21143
21144 ;
21145 return 0;
21146}
21147_ACEOF
21148rm -f conftest.$ac_objext
21149if { (ac_try="$ac_compile"
21150case "(($ac_try" in
21151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21152 *) ac_try_echo=$ac_try;;
21153esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021155 (eval "$ac_compile") 2>conftest.er1
21156 ac_status=$?
21157 grep -v '^ *+' conftest.er1 >conftest.err
21158 rm -f conftest.er1
21159 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021161 (exit $ac_status); } && {
21162 test -z "$ac_c_werror_flag" ||
21163 test ! -s conftest.err
21164 } && test -s conftest.$ac_objext; then
21165 ac_cv_have_decl_tzname=yes
21166else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021167 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021168sed 's/^/| /' conftest.$ac_ext >&5
21169
21170 ac_cv_have_decl_tzname=no
21171fi
21172
21173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21174fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021175{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21176echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21177if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021178
21179cat >>confdefs.h <<_ACEOF
21180#define HAVE_DECL_TZNAME 1
21181_ACEOF
21182
21183
21184else
21185 cat >>confdefs.h <<_ACEOF
21186#define HAVE_DECL_TZNAME 0
21187_ACEOF
21188
21189
21190fi
21191
21192
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021193 { echo "$as_me:$LINENO: checking for tzname" >&5
21194echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021195if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021196 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021197else
Martin v. Löwis11437992002-04-12 09:54:03 +000021198 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021199/* confdefs.h. */
21200_ACEOF
21201cat confdefs.h >>conftest.$ac_ext
21202cat >>conftest.$ac_ext <<_ACEOF
21203/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021204#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021205#if !HAVE_DECL_TZNAME
21206extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021207#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021208
Martin v. Löwis11437992002-04-12 09:54:03 +000021209int
21210main ()
21211{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021212return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021213 ;
21214 return 0;
21215}
21216_ACEOF
21217rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021218if { (ac_try="$ac_link"
21219case "(($ac_try" in
21220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21221 *) ac_try_echo=$ac_try;;
21222esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021224 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021226 grep -v '^ *+' conftest.er1 >conftest.err
21227 rm -f conftest.er1
21228 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021230 (exit $ac_status); } && {
21231 test -z "$ac_c_werror_flag" ||
21232 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021233 } && test -s conftest$ac_exeext &&
21234 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021235 ac_cv_var_tzname=yes
21236else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021238sed 's/^/| /' conftest.$ac_ext >&5
21239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021240 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021242
21243rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021244 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021245fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021246{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21247echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021248 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021249
21250cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021251#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021252_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021253
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021254 fi
21255fi
21256
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021257{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21258echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021259if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021260 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021261else
21262 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021263/* confdefs.h. */
21264_ACEOF
21265cat confdefs.h >>conftest.$ac_ext
21266cat >>conftest.$ac_ext <<_ACEOF
21267/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021268$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021269int
21270main ()
21271{
21272static struct stat ac_aggr;
21273if (ac_aggr.st_rdev)
21274return 0;
21275 ;
21276 return 0;
21277}
21278_ACEOF
21279rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021280if { (ac_try="$ac_compile"
21281case "(($ac_try" in
21282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21283 *) ac_try_echo=$ac_try;;
21284esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021286 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021288 grep -v '^ *+' conftest.er1 >conftest.err
21289 rm -f conftest.er1
21290 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021292 (exit $ac_status); } && {
21293 test -z "$ac_c_werror_flag" ||
21294 test ! -s conftest.err
21295 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021296 ac_cv_member_struct_stat_st_rdev=yes
21297else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021299sed 's/^/| /' conftest.$ac_ext >&5
21300
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021301 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021302/* confdefs.h. */
21303_ACEOF
21304cat confdefs.h >>conftest.$ac_ext
21305cat >>conftest.$ac_ext <<_ACEOF
21306/* end confdefs.h. */
21307$ac_includes_default
21308int
21309main ()
21310{
21311static struct stat ac_aggr;
21312if (sizeof ac_aggr.st_rdev)
21313return 0;
21314 ;
21315 return 0;
21316}
21317_ACEOF
21318rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021319if { (ac_try="$ac_compile"
21320case "(($ac_try" in
21321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21322 *) ac_try_echo=$ac_try;;
21323esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021325 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021327 grep -v '^ *+' conftest.er1 >conftest.err
21328 rm -f conftest.er1
21329 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021331 (exit $ac_status); } && {
21332 test -z "$ac_c_werror_flag" ||
21333 test ! -s conftest.err
21334 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021335 ac_cv_member_struct_stat_st_rdev=yes
21336else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021338sed 's/^/| /' conftest.$ac_ext >&5
21339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021340 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021342
21343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021345
21346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021347fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021348{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21349echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21350if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021351
21352cat >>confdefs.h <<_ACEOF
21353#define HAVE_STRUCT_STAT_ST_RDEV 1
21354_ACEOF
21355
21356
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021357fi
21358
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021359{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21360echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021361if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021362 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021363else
Martin v. Löwis11437992002-04-12 09:54:03 +000021364 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021365/* confdefs.h. */
21366_ACEOF
21367cat confdefs.h >>conftest.$ac_ext
21368cat >>conftest.$ac_ext <<_ACEOF
21369/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021370$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021371int
21372main ()
21373{
21374static struct stat ac_aggr;
21375if (ac_aggr.st_blksize)
21376return 0;
21377 ;
21378 return 0;
21379}
21380_ACEOF
21381rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021382if { (ac_try="$ac_compile"
21383case "(($ac_try" in
21384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21385 *) ac_try_echo=$ac_try;;
21386esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021390 grep -v '^ *+' conftest.er1 >conftest.err
21391 rm -f conftest.er1
21392 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021394 (exit $ac_status); } && {
21395 test -z "$ac_c_werror_flag" ||
21396 test ! -s conftest.err
21397 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021398 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021399else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021401sed 's/^/| /' conftest.$ac_ext >&5
21402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021403 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021404/* confdefs.h. */
21405_ACEOF
21406cat confdefs.h >>conftest.$ac_ext
21407cat >>conftest.$ac_ext <<_ACEOF
21408/* end confdefs.h. */
21409$ac_includes_default
21410int
21411main ()
21412{
21413static struct stat ac_aggr;
21414if (sizeof ac_aggr.st_blksize)
21415return 0;
21416 ;
21417 return 0;
21418}
21419_ACEOF
21420rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021421if { (ac_try="$ac_compile"
21422case "(($ac_try" in
21423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21424 *) ac_try_echo=$ac_try;;
21425esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021427 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021428 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021429 grep -v '^ *+' conftest.er1 >conftest.err
21430 rm -f conftest.er1
21431 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021433 (exit $ac_status); } && {
21434 test -z "$ac_c_werror_flag" ||
21435 test ! -s conftest.err
21436 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021437 ac_cv_member_struct_stat_st_blksize=yes
21438else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021440sed 's/^/| /' conftest.$ac_ext >&5
21441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021442 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021444
21445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021447
21448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021449fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021450{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21451echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21452if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021453
Martin v. Löwis11437992002-04-12 09:54:03 +000021454cat >>confdefs.h <<_ACEOF
21455#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21456_ACEOF
21457
21458
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021459fi
21460
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021461{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21462echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021463if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021464 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021465else
21466 cat >conftest.$ac_ext <<_ACEOF
21467/* confdefs.h. */
21468_ACEOF
21469cat confdefs.h >>conftest.$ac_ext
21470cat >>conftest.$ac_ext <<_ACEOF
21471/* end confdefs.h. */
21472$ac_includes_default
21473int
21474main ()
21475{
21476static struct stat ac_aggr;
21477if (ac_aggr.st_flags)
21478return 0;
21479 ;
21480 return 0;
21481}
21482_ACEOF
21483rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021484if { (ac_try="$ac_compile"
21485case "(($ac_try" in
21486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21487 *) ac_try_echo=$ac_try;;
21488esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021490 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021491 ac_status=$?
21492 grep -v '^ *+' conftest.er1 >conftest.err
21493 rm -f conftest.er1
21494 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021496 (exit $ac_status); } && {
21497 test -z "$ac_c_werror_flag" ||
21498 test ! -s conftest.err
21499 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021500 ac_cv_member_struct_stat_st_flags=yes
21501else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021502 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021503sed 's/^/| /' conftest.$ac_ext >&5
21504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021505 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021506/* confdefs.h. */
21507_ACEOF
21508cat confdefs.h >>conftest.$ac_ext
21509cat >>conftest.$ac_ext <<_ACEOF
21510/* end confdefs.h. */
21511$ac_includes_default
21512int
21513main ()
21514{
21515static struct stat ac_aggr;
21516if (sizeof ac_aggr.st_flags)
21517return 0;
21518 ;
21519 return 0;
21520}
21521_ACEOF
21522rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021523if { (ac_try="$ac_compile"
21524case "(($ac_try" in
21525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21526 *) ac_try_echo=$ac_try;;
21527esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021529 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021530 ac_status=$?
21531 grep -v '^ *+' conftest.er1 >conftest.err
21532 rm -f conftest.er1
21533 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021535 (exit $ac_status); } && {
21536 test -z "$ac_c_werror_flag" ||
21537 test ! -s conftest.err
21538 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021539 ac_cv_member_struct_stat_st_flags=yes
21540else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021541 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021542sed 's/^/| /' conftest.$ac_ext >&5
21543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021544 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021546
21547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021549
21550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021551fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021552{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21553echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21554if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021555
21556cat >>confdefs.h <<_ACEOF
21557#define HAVE_STRUCT_STAT_ST_FLAGS 1
21558_ACEOF
21559
21560
21561fi
21562
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021563{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21564echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021565if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021566 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021567else
21568 cat >conftest.$ac_ext <<_ACEOF
21569/* confdefs.h. */
21570_ACEOF
21571cat confdefs.h >>conftest.$ac_ext
21572cat >>conftest.$ac_ext <<_ACEOF
21573/* end confdefs.h. */
21574$ac_includes_default
21575int
21576main ()
21577{
21578static struct stat ac_aggr;
21579if (ac_aggr.st_gen)
21580return 0;
21581 ;
21582 return 0;
21583}
21584_ACEOF
21585rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021586if { (ac_try="$ac_compile"
21587case "(($ac_try" in
21588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21589 *) ac_try_echo=$ac_try;;
21590esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021592 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021593 ac_status=$?
21594 grep -v '^ *+' conftest.er1 >conftest.err
21595 rm -f conftest.er1
21596 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021598 (exit $ac_status); } && {
21599 test -z "$ac_c_werror_flag" ||
21600 test ! -s conftest.err
21601 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021602 ac_cv_member_struct_stat_st_gen=yes
21603else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021604 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021605sed 's/^/| /' conftest.$ac_ext >&5
21606
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021607 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021608/* confdefs.h. */
21609_ACEOF
21610cat confdefs.h >>conftest.$ac_ext
21611cat >>conftest.$ac_ext <<_ACEOF
21612/* end confdefs.h. */
21613$ac_includes_default
21614int
21615main ()
21616{
21617static struct stat ac_aggr;
21618if (sizeof ac_aggr.st_gen)
21619return 0;
21620 ;
21621 return 0;
21622}
21623_ACEOF
21624rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021625if { (ac_try="$ac_compile"
21626case "(($ac_try" in
21627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21628 *) ac_try_echo=$ac_try;;
21629esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021631 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021632 ac_status=$?
21633 grep -v '^ *+' conftest.er1 >conftest.err
21634 rm -f conftest.er1
21635 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021637 (exit $ac_status); } && {
21638 test -z "$ac_c_werror_flag" ||
21639 test ! -s conftest.err
21640 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021641 ac_cv_member_struct_stat_st_gen=yes
21642else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021643 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021644sed 's/^/| /' conftest.$ac_ext >&5
21645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021646 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021648
21649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021651
21652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021653fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021654{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21655echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21656if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021657
21658cat >>confdefs.h <<_ACEOF
21659#define HAVE_STRUCT_STAT_ST_GEN 1
21660_ACEOF
21661
21662
21663fi
21664
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021665{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21666echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021667if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021668 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021669else
21670 cat >conftest.$ac_ext <<_ACEOF
21671/* confdefs.h. */
21672_ACEOF
21673cat confdefs.h >>conftest.$ac_ext
21674cat >>conftest.$ac_ext <<_ACEOF
21675/* end confdefs.h. */
21676$ac_includes_default
21677int
21678main ()
21679{
21680static struct stat ac_aggr;
21681if (ac_aggr.st_birthtime)
21682return 0;
21683 ;
21684 return 0;
21685}
21686_ACEOF
21687rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021688if { (ac_try="$ac_compile"
21689case "(($ac_try" in
21690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21691 *) ac_try_echo=$ac_try;;
21692esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021694 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021695 ac_status=$?
21696 grep -v '^ *+' conftest.er1 >conftest.err
21697 rm -f conftest.er1
21698 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021700 (exit $ac_status); } && {
21701 test -z "$ac_c_werror_flag" ||
21702 test ! -s conftest.err
21703 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021704 ac_cv_member_struct_stat_st_birthtime=yes
21705else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021706 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021707sed 's/^/| /' conftest.$ac_ext >&5
21708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021709 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021710/* confdefs.h. */
21711_ACEOF
21712cat confdefs.h >>conftest.$ac_ext
21713cat >>conftest.$ac_ext <<_ACEOF
21714/* end confdefs.h. */
21715$ac_includes_default
21716int
21717main ()
21718{
21719static struct stat ac_aggr;
21720if (sizeof ac_aggr.st_birthtime)
21721return 0;
21722 ;
21723 return 0;
21724}
21725_ACEOF
21726rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021727if { (ac_try="$ac_compile"
21728case "(($ac_try" in
21729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21730 *) ac_try_echo=$ac_try;;
21731esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021734 ac_status=$?
21735 grep -v '^ *+' conftest.er1 >conftest.err
21736 rm -f conftest.er1
21737 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021739 (exit $ac_status); } && {
21740 test -z "$ac_c_werror_flag" ||
21741 test ! -s conftest.err
21742 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021743 ac_cv_member_struct_stat_st_birthtime=yes
21744else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021745 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021746sed 's/^/| /' conftest.$ac_ext >&5
21747
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021748 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021750
21751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021753
21754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021755fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021756{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21757echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21758if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021759
21760cat >>confdefs.h <<_ACEOF
21761#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21762_ACEOF
21763
21764
21765fi
21766
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021767{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21768echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021769if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021770 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021771else
Martin v. Löwis11437992002-04-12 09:54:03 +000021772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021773/* confdefs.h. */
21774_ACEOF
21775cat confdefs.h >>conftest.$ac_ext
21776cat >>conftest.$ac_ext <<_ACEOF
21777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021778$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021779int
21780main ()
21781{
21782static struct stat ac_aggr;
21783if (ac_aggr.st_blocks)
21784return 0;
21785 ;
21786 return 0;
21787}
21788_ACEOF
21789rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021790if { (ac_try="$ac_compile"
21791case "(($ac_try" in
21792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21793 *) ac_try_echo=$ac_try;;
21794esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021796 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021797 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021798 grep -v '^ *+' conftest.er1 >conftest.err
21799 rm -f conftest.er1
21800 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021802 (exit $ac_status); } && {
21803 test -z "$ac_c_werror_flag" ||
21804 test ! -s conftest.err
21805 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021806 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021807else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021808 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021809sed 's/^/| /' conftest.$ac_ext >&5
21810
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021812/* confdefs.h. */
21813_ACEOF
21814cat confdefs.h >>conftest.$ac_ext
21815cat >>conftest.$ac_ext <<_ACEOF
21816/* end confdefs.h. */
21817$ac_includes_default
21818int
21819main ()
21820{
21821static struct stat ac_aggr;
21822if (sizeof ac_aggr.st_blocks)
21823return 0;
21824 ;
21825 return 0;
21826}
21827_ACEOF
21828rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021829if { (ac_try="$ac_compile"
21830case "(($ac_try" in
21831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21832 *) ac_try_echo=$ac_try;;
21833esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021835 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021836 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021837 grep -v '^ *+' conftest.er1 >conftest.err
21838 rm -f conftest.er1
21839 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021841 (exit $ac_status); } && {
21842 test -z "$ac_c_werror_flag" ||
21843 test ! -s conftest.err
21844 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021845 ac_cv_member_struct_stat_st_blocks=yes
21846else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021848sed 's/^/| /' conftest.$ac_ext >&5
21849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021850 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021852
21853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021855
21856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021857fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021858{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21859echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21860if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021861
Martin v. Löwis11437992002-04-12 09:54:03 +000021862cat >>confdefs.h <<_ACEOF
21863#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21864_ACEOF
21865
21866
21867cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021868#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021869_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021870
21871else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021872 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021873 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021874 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21875 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021876esac
21877
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021878fi
21879
Michael W. Hudson54241132001-12-07 15:38:26 +000021880
Martin v. Löwis11437992002-04-12 09:54:03 +000021881
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021882{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21883echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021884if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021885 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021886else
Martin v. Löwis11437992002-04-12 09:54:03 +000021887 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021888/* confdefs.h. */
21889_ACEOF
21890cat confdefs.h >>conftest.$ac_ext
21891cat >>conftest.$ac_ext <<_ACEOF
21892/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021893#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021894int
21895main ()
21896{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021897return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021898 ;
21899 return 0;
21900}
21901_ACEOF
21902rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021903if { (ac_try="$ac_compile"
21904case "(($ac_try" in
21905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21906 *) ac_try_echo=$ac_try;;
21907esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021909 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021911 grep -v '^ *+' conftest.er1 >conftest.err
21912 rm -f conftest.er1
21913 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021915 (exit $ac_status); } && {
21916 test -z "$ac_c_werror_flag" ||
21917 test ! -s conftest.err
21918 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021919 ac_cv_header_time_altzone=yes
21920else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021922sed 's/^/| /' conftest.$ac_ext >&5
21923
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021924 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021925fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21928fi
21929
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021930{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21931echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021932if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021933
21934cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021935#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021936_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021937
21938fi
21939
Guido van Rossumda88dad1995-01-26 00:46:29 +000021940was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021941{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21942echo $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 +000021943cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021944/* confdefs.h. */
21945_ACEOF
21946cat confdefs.h >>conftest.$ac_ext
21947cat >>conftest.$ac_ext <<_ACEOF
21948/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021949
21950#include <sys/types.h>
21951#include <sys/select.h>
21952#include <sys/time.h>
21953
Martin v. Löwis11437992002-04-12 09:54:03 +000021954int
21955main ()
21956{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021957;
Martin v. Löwis11437992002-04-12 09:54:03 +000021958 ;
21959 return 0;
21960}
21961_ACEOF
21962rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021963if { (ac_try="$ac_compile"
21964case "(($ac_try" in
21965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21966 *) ac_try_echo=$ac_try;;
21967esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021969 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021971 grep -v '^ *+' conftest.er1 >conftest.err
21972 rm -f conftest.er1
21973 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021975 (exit $ac_status); } && {
21976 test -z "$ac_c_werror_flag" ||
21977 test ! -s conftest.err
21978 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021979
21980
21981cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021982#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021983_ACEOF
21984
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021985 was_it_defined=yes
21986
Guido van Rossumf78abae1997-01-21 22:02:36 +000021987else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021988 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021989sed 's/^/| /' conftest.$ac_ext >&5
21990
Thomas Wouters477c8d52006-05-27 19:21:47 +000021991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021992fi
21993
21994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021995{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21996echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021997
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021998{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21999echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022000if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022001 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022002else
Martin v. Löwis11437992002-04-12 09:54:03 +000022003 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022004/* confdefs.h. */
22005_ACEOF
22006cat confdefs.h >>conftest.$ac_ext
22007cat >>conftest.$ac_ext <<_ACEOF
22008/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022009
22010# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022011int
22012main ()
22013{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022014struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000022015 ;
22016 return 0;
22017}
22018_ACEOF
22019rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022020if { (ac_try="$ac_compile"
22021case "(($ac_try" in
22022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22023 *) ac_try_echo=$ac_try;;
22024esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022026 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022028 grep -v '^ *+' conftest.er1 >conftest.err
22029 rm -f conftest.er1
22030 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022032 (exit $ac_status); } && {
22033 test -z "$ac_c_werror_flag" ||
22034 test ! -s conftest.err
22035 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022036 ac_cv_struct_addrinfo=yes
22037else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022039sed 's/^/| /' conftest.$ac_ext >&5
22040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022041 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022042fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22045fi
22046
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022047{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22048echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022049if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022050
22051cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022052#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022053_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022054
22055fi
22056
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022057{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22058echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022059if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022060 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022061else
Martin v. Löwis11437992002-04-12 09:54:03 +000022062 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022063/* confdefs.h. */
22064_ACEOF
22065cat confdefs.h >>conftest.$ac_ext
22066cat >>conftest.$ac_ext <<_ACEOF
22067/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022068
22069# include <sys/types.h>
22070# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022071int
22072main ()
22073{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022074struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022075 ;
22076 return 0;
22077}
22078_ACEOF
22079rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022080if { (ac_try="$ac_compile"
22081case "(($ac_try" in
22082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22083 *) ac_try_echo=$ac_try;;
22084esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022086 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022087 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022088 grep -v '^ *+' conftest.er1 >conftest.err
22089 rm -f conftest.er1
22090 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022092 (exit $ac_status); } && {
22093 test -z "$ac_c_werror_flag" ||
22094 test ! -s conftest.err
22095 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022096 ac_cv_struct_sockaddr_storage=yes
22097else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022099sed 's/^/| /' conftest.$ac_ext >&5
22100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022101 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022102fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22105fi
22106
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022107{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22108echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022109if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022110
22111cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022112#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022113_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022114
22115fi
22116
Guido van Rossum627b2d71993-12-24 10:39:16 +000022117# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022118
Michael W. Hudson54241132001-12-07 15:38:26 +000022119
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022120{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22121echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022122if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022123 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022124else
Martin v. Löwis11437992002-04-12 09:54:03 +000022125 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022126/* confdefs.h. */
22127_ACEOF
22128cat confdefs.h >>conftest.$ac_ext
22129cat >>conftest.$ac_ext <<_ACEOF
22130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022131$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022132int
22133main ()
22134{
22135static int test_array [1 - 2 * !(((char) -1) < 0)];
22136test_array [0] = 0
22137
22138 ;
22139 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022140}
Martin v. Löwis11437992002-04-12 09:54:03 +000022141_ACEOF
22142rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022143if { (ac_try="$ac_compile"
22144case "(($ac_try" in
22145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22146 *) ac_try_echo=$ac_try;;
22147esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022149 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022151 grep -v '^ *+' conftest.er1 >conftest.err
22152 rm -f conftest.er1
22153 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022155 (exit $ac_status); } && {
22156 test -z "$ac_c_werror_flag" ||
22157 test ! -s conftest.err
22158 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022159 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022160else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022162sed 's/^/| /' conftest.$ac_ext >&5
22163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022164 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022166
22167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022168fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022169{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22170echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022171if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022172 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022173#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022174_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022175
22176fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022177
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022178{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22179echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022180if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022181 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022182else
22183 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022184/* confdefs.h. */
22185_ACEOF
22186cat confdefs.h >>conftest.$ac_ext
22187cat >>conftest.$ac_ext <<_ACEOF
22188/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022189
Martin v. Löwis11437992002-04-12 09:54:03 +000022190int
22191main ()
22192{
22193/* FIXME: Include the comments suggested by Paul. */
22194#ifndef __cplusplus
22195 /* Ultrix mips cc rejects this. */
22196 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022197 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022198 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022199 char const *const *pcpcc;
22200 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022201 /* NEC SVR4.0.2 mips cc rejects this. */
22202 struct point {int x, y;};
22203 static struct point const zero = {0,0};
22204 /* AIX XL C 1.02.0.0 rejects this.
22205 It does not let you subtract one const X* pointer from another in
22206 an arm of an if-expression whose if-part is not a constant
22207 expression */
22208 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022209 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022210 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022211 ++pcpcc;
22212 ppc = (char**) pcpcc;
22213 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022214 { /* SCO 3.2v4 cc rejects this. */
22215 char *t;
22216 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022217
Martin v. Löwis11437992002-04-12 09:54:03 +000022218 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022219 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022220 }
22221 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22222 int x[] = {25, 17};
22223 const int *foo = &x[0];
22224 ++foo;
22225 }
22226 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22227 typedef const int *iptr;
22228 iptr p = 0;
22229 ++p;
22230 }
22231 { /* AIX XL C 1.02.0.0 rejects this saying
22232 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22233 struct s { int j; const int *ap[3]; };
22234 struct s *b; b->j = 5;
22235 }
22236 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22237 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022238 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022239 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022240 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022241#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022242
Martin v. Löwis11437992002-04-12 09:54:03 +000022243 ;
22244 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022245}
Martin v. Löwis11437992002-04-12 09:54:03 +000022246_ACEOF
22247rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022248if { (ac_try="$ac_compile"
22249case "(($ac_try" in
22250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22251 *) ac_try_echo=$ac_try;;
22252esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022254 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022255 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022256 grep -v '^ *+' conftest.er1 >conftest.err
22257 rm -f conftest.er1
22258 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022260 (exit $ac_status); } && {
22261 test -z "$ac_c_werror_flag" ||
22262 test ! -s conftest.err
22263 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022264 ac_cv_c_const=yes
22265else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022267sed 's/^/| /' conftest.$ac_ext >&5
22268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022269 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022271
22272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022273fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022274{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22275echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022276if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022277
22278cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022279#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022280_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022281
22282fi
22283
Michael W. Hudson54241132001-12-07 15:38:26 +000022284
Guido van Rossumda88dad1995-01-26 00:46:29 +000022285works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022286{ echo "$as_me:$LINENO: checking for working volatile" >&5
22287echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022288cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022289/* confdefs.h. */
22290_ACEOF
22291cat confdefs.h >>conftest.$ac_ext
22292cat >>conftest.$ac_ext <<_ACEOF
22293/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022294
Martin v. Löwis11437992002-04-12 09:54:03 +000022295int
22296main ()
22297{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022298volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022299 ;
22300 return 0;
22301}
22302_ACEOF
22303rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022304if { (ac_try="$ac_compile"
22305case "(($ac_try" in
22306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22307 *) ac_try_echo=$ac_try;;
22308esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022310 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022311 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022312 grep -v '^ *+' conftest.er1 >conftest.err
22313 rm -f conftest.er1
22314 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022316 (exit $ac_status); } && {
22317 test -z "$ac_c_werror_flag" ||
22318 test ! -s conftest.err
22319 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022320 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022321else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022322 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022323sed 's/^/| /' conftest.$ac_ext >&5
22324
Martin v. Löwis11437992002-04-12 09:54:03 +000022325
22326cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022327#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022328_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022329
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022330
Guido van Rossum627b2d71993-12-24 10:39:16 +000022331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022332
22333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022334{ echo "$as_me:$LINENO: result: $works" >&5
22335echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022336
Guido van Rossumda88dad1995-01-26 00:46:29 +000022337works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022338{ echo "$as_me:$LINENO: checking for working signed char" >&5
22339echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022340cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022341/* confdefs.h. */
22342_ACEOF
22343cat confdefs.h >>conftest.$ac_ext
22344cat >>conftest.$ac_ext <<_ACEOF
22345/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022346
Martin v. Löwis11437992002-04-12 09:54:03 +000022347int
22348main ()
22349{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022350signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022351 ;
22352 return 0;
22353}
22354_ACEOF
22355rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022356if { (ac_try="$ac_compile"
22357case "(($ac_try" in
22358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22359 *) ac_try_echo=$ac_try;;
22360esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022362 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022364 grep -v '^ *+' conftest.er1 >conftest.err
22365 rm -f conftest.er1
22366 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022368 (exit $ac_status); } && {
22369 test -z "$ac_c_werror_flag" ||
22370 test ! -s conftest.err
22371 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022372 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022373else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022375sed 's/^/| /' conftest.$ac_ext >&5
22376
Martin v. Löwis11437992002-04-12 09:54:03 +000022377
22378cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022379#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022380_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022381
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022382
Guido van Rossum7f43da71994-08-01 12:15:30 +000022383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022384
22385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022386{ echo "$as_me:$LINENO: result: $works" >&5
22387echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022388
Guido van Rossumda88dad1995-01-26 00:46:29 +000022389have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022390{ echo "$as_me:$LINENO: checking for prototypes" >&5
22391echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022392cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022393/* confdefs.h. */
22394_ACEOF
22395cat confdefs.h >>conftest.$ac_ext
22396cat >>conftest.$ac_ext <<_ACEOF
22397/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022398int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022399int
22400main ()
22401{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022402return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022403 ;
22404 return 0;
22405}
22406_ACEOF
22407rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022408if { (ac_try="$ac_compile"
22409case "(($ac_try" in
22410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22411 *) ac_try_echo=$ac_try;;
22412esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022414 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022415 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022416 grep -v '^ *+' conftest.er1 >conftest.err
22417 rm -f conftest.er1
22418 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022420 (exit $ac_status); } && {
22421 test -z "$ac_c_werror_flag" ||
22422 test ! -s conftest.err
22423 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022424
22425
22426cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022427#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022428_ACEOF
22429
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022430 have_prototypes=yes
22431
Guido van Rossumf78abae1997-01-21 22:02:36 +000022432else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022434sed 's/^/| /' conftest.$ac_ext >&5
22435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022436
Guido van Rossum7f43da71994-08-01 12:15:30 +000022437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022438
22439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022440{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22441echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022442
Guido van Rossumda88dad1995-01-26 00:46:29 +000022443works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022444{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22445echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022446cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022447/* confdefs.h. */
22448_ACEOF
22449cat confdefs.h >>conftest.$ac_ext
22450cat >>conftest.$ac_ext <<_ACEOF
22451/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022452
22453#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022454int foo(int x, ...) {
22455 va_list va;
22456 va_start(va, x);
22457 va_arg(va, int);
22458 va_arg(va, char *);
22459 va_arg(va, double);
22460 return 0;
22461}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022462
Martin v. Löwis11437992002-04-12 09:54:03 +000022463int
22464main ()
22465{
Guido van Rossum90eea071996-08-30 20:58:57 +000022466return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022467 ;
22468 return 0;
22469}
22470_ACEOF
22471rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022472if { (ac_try="$ac_compile"
22473case "(($ac_try" in
22474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22475 *) ac_try_echo=$ac_try;;
22476esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022478 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022479 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022480 grep -v '^ *+' conftest.er1 >conftest.err
22481 rm -f conftest.er1
22482 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022484 (exit $ac_status); } && {
22485 test -z "$ac_c_werror_flag" ||
22486 test ! -s conftest.err
22487 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022488
22489
22490cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022491#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022492_ACEOF
22493
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022494 works=yes
22495
Guido van Rossumf78abae1997-01-21 22:02:36 +000022496else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022498sed 's/^/| /' conftest.$ac_ext >&5
22499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022500
Guido van Rossum627b2d71993-12-24 10:39:16 +000022501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022502
22503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022504{ echo "$as_me:$LINENO: result: $works" >&5
22505echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022506
Martin v. Löwisd6320502004-08-12 13:45:08 +000022507# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022508{ echo "$as_me:$LINENO: checking for socketpair" >&5
22509echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022510cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022511/* confdefs.h. */
22512_ACEOF
22513cat confdefs.h >>conftest.$ac_ext
22514cat >>conftest.$ac_ext <<_ACEOF
22515/* end confdefs.h. */
22516
22517#include <sys/types.h>
22518#include <sys/socket.h>
22519
22520int
22521main ()
22522{
22523void *x=socketpair
22524 ;
22525 return 0;
22526}
22527_ACEOF
22528rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022529if { (ac_try="$ac_compile"
22530case "(($ac_try" in
22531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22532 *) ac_try_echo=$ac_try;;
22533esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022535 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022537 grep -v '^ *+' conftest.er1 >conftest.err
22538 rm -f conftest.er1
22539 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022541 (exit $ac_status); } && {
22542 test -z "$ac_c_werror_flag" ||
22543 test ! -s conftest.err
22544 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022545
22546cat >>confdefs.h <<\_ACEOF
22547#define HAVE_SOCKETPAIR 1
22548_ACEOF
22549
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022550 { echo "$as_me:$LINENO: result: yes" >&5
22551echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022552else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022553 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022554sed 's/^/| /' conftest.$ac_ext >&5
22555
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022556 { echo "$as_me:$LINENO: result: no" >&5
22557echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022558
22559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022560
22561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022562
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022563# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022564{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22565echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022566cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022567/* confdefs.h. */
22568_ACEOF
22569cat confdefs.h >>conftest.$ac_ext
22570cat >>conftest.$ac_ext <<_ACEOF
22571/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022572#include <sys/types.h>
22573#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022574int
22575main ()
22576{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022577struct sockaddr x;
22578x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022579 ;
22580 return 0;
22581}
22582_ACEOF
22583rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022584if { (ac_try="$ac_compile"
22585case "(($ac_try" in
22586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22587 *) ac_try_echo=$ac_try;;
22588esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022590 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022591 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022592 grep -v '^ *+' conftest.er1 >conftest.err
22593 rm -f conftest.er1
22594 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022596 (exit $ac_status); } && {
22597 test -z "$ac_c_werror_flag" ||
22598 test ! -s conftest.err
22599 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022600 { echo "$as_me:$LINENO: result: yes" >&5
22601echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022602
22603cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022604#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022605_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022606
22607else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022609sed 's/^/| /' conftest.$ac_ext >&5
22610
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022611 { echo "$as_me:$LINENO: result: no" >&5
22612echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022614
22615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022616
Guido van Rossumda88dad1995-01-26 00:46:29 +000022617va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022618{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22619echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022620cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022621/* confdefs.h. */
22622_ACEOF
22623cat confdefs.h >>conftest.$ac_ext
22624cat >>conftest.$ac_ext <<_ACEOF
22625/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022626
22627#ifdef HAVE_STDARG_PROTOTYPES
22628#include <stdarg.h>
22629#else
22630#include <varargs.h>
22631#endif
22632
Martin v. Löwis11437992002-04-12 09:54:03 +000022633int
22634main ()
22635{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022636va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022637 ;
22638 return 0;
22639}
22640_ACEOF
22641rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022642if { (ac_try="$ac_compile"
22643case "(($ac_try" in
22644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22645 *) ac_try_echo=$ac_try;;
22646esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022648 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022649 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022650 grep -v '^ *+' conftest.er1 >conftest.err
22651 rm -f conftest.er1
22652 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022654 (exit $ac_status); } && {
22655 test -z "$ac_c_werror_flag" ||
22656 test ! -s conftest.err
22657 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022658 :
22659else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022661sed 's/^/| /' conftest.$ac_ext >&5
22662
Martin v. Löwis11437992002-04-12 09:54:03 +000022663
22664
22665cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022666#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022667_ACEOF
22668
Guido van Rossumda88dad1995-01-26 00:46:29 +000022669 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022670
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022672
22673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022674{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22675echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022676
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022677# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022678
22679
22680
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022681{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22682echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022683if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022684 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022685else
Martin v. Löwis11437992002-04-12 09:54:03 +000022686 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022687/* confdefs.h. */
22688_ACEOF
22689cat confdefs.h >>conftest.$ac_ext
22690cat >>conftest.$ac_ext <<_ACEOF
22691/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022692/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22693 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22694#define gethostbyname_r innocuous_gethostbyname_r
22695
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022696/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022697 which can conflict with char gethostbyname_r (); below.
22698 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022699 <limits.h> exists even on freestanding compilers. */
22700
22701#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022702# include <limits.h>
22703#else
22704# include <assert.h>
22705#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022706
22707#undef gethostbyname_r
22708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022709/* Override any GCC internal prototype to avoid an error.
22710 Use char because int might match the return type of a GCC
22711 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022712#ifdef __cplusplus
22713extern "C"
22714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022715char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022716/* The GNU C library defines this for functions which it implements
22717 to always fail with ENOSYS. Some functions are actually named
22718 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022719#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022720choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022721#endif
22722
Skip Montanaro6dead952003-09-25 14:50:04 +000022723int
22724main ()
22725{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022726return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022727 ;
22728 return 0;
22729}
22730_ACEOF
22731rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022732if { (ac_try="$ac_link"
22733case "(($ac_try" in
22734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22735 *) ac_try_echo=$ac_try;;
22736esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022738 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022740 grep -v '^ *+' conftest.er1 >conftest.err
22741 rm -f conftest.er1
22742 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022744 (exit $ac_status); } && {
22745 test -z "$ac_c_werror_flag" ||
22746 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022747 } && test -s conftest$ac_exeext &&
22748 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022749 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022750else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022752sed 's/^/| /' conftest.$ac_ext >&5
22753
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022754 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022756
22757rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022758 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022759fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022760{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22761echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22762if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022763
Martin v. Löwis11437992002-04-12 09:54:03 +000022764 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022765#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022766_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022767
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022768 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22769echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022770 OLD_CFLAGS=$CFLAGS
22771 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022773/* confdefs.h. */
22774_ACEOF
22775cat confdefs.h >>conftest.$ac_ext
22776cat >>conftest.$ac_ext <<_ACEOF
22777/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022778
22779# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022780
Martin v. Löwis11437992002-04-12 09:54:03 +000022781int
22782main ()
22783{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022784
22785 char *name;
22786 struct hostent *he, *res;
22787 char buffer[2048];
22788 int buflen = 2048;
22789 int h_errnop;
22790
22791 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022792
22793 ;
22794 return 0;
22795}
22796_ACEOF
22797rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022798if { (ac_try="$ac_compile"
22799case "(($ac_try" in
22800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22801 *) ac_try_echo=$ac_try;;
22802esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022806 grep -v '^ *+' conftest.er1 >conftest.err
22807 rm -f conftest.er1
22808 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022810 (exit $ac_status); } && {
22811 test -z "$ac_c_werror_flag" ||
22812 test ! -s conftest.err
22813 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022814
22815 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022816#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022817_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022818
Martin v. Löwis11437992002-04-12 09:54:03 +000022819
22820cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022821#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022822_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022823
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022824 { echo "$as_me:$LINENO: result: yes" >&5
22825echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022826
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022827else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022829sed 's/^/| /' conftest.$ac_ext >&5
22830
Martin v. Löwis11437992002-04-12 09:54:03 +000022831
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022832 { echo "$as_me:$LINENO: result: no" >&5
22833echo "${ECHO_T}no" >&6; }
22834 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22835echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022837/* confdefs.h. */
22838_ACEOF
22839cat confdefs.h >>conftest.$ac_ext
22840cat >>conftest.$ac_ext <<_ACEOF
22841/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022842
22843# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022844
Martin v. Löwis11437992002-04-12 09:54:03 +000022845int
22846main ()
22847{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022848
22849 char *name;
22850 struct hostent *he;
22851 char buffer[2048];
22852 int buflen = 2048;
22853 int h_errnop;
22854
22855 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022856
22857 ;
22858 return 0;
22859}
22860_ACEOF
22861rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022862if { (ac_try="$ac_compile"
22863case "(($ac_try" in
22864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22865 *) ac_try_echo=$ac_try;;
22866esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022868 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022870 grep -v '^ *+' conftest.er1 >conftest.err
22871 rm -f conftest.er1
22872 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022874 (exit $ac_status); } && {
22875 test -z "$ac_c_werror_flag" ||
22876 test ! -s conftest.err
22877 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022878
22879 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022880#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022881_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022882
Martin v. Löwis11437992002-04-12 09:54:03 +000022883
22884cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022885#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022886_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022887
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022888 { echo "$as_me:$LINENO: result: yes" >&5
22889echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022890
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022891else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022893sed 's/^/| /' conftest.$ac_ext >&5
22894
Martin v. Löwis11437992002-04-12 09:54:03 +000022895
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022896 { echo "$as_me:$LINENO: result: no" >&5
22897echo "${ECHO_T}no" >&6; }
22898 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22899echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022901/* confdefs.h. */
22902_ACEOF
22903cat confdefs.h >>conftest.$ac_ext
22904cat >>conftest.$ac_ext <<_ACEOF
22905/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022906
22907# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022908
Martin v. Löwis11437992002-04-12 09:54:03 +000022909int
22910main ()
22911{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022912
22913 char *name;
22914 struct hostent *he;
22915 struct hostent_data data;
22916
22917 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022918
22919 ;
22920 return 0;
22921}
22922_ACEOF
22923rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022924if { (ac_try="$ac_compile"
22925case "(($ac_try" in
22926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22927 *) ac_try_echo=$ac_try;;
22928esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022930 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022931 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022932 grep -v '^ *+' conftest.er1 >conftest.err
22933 rm -f conftest.er1
22934 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022936 (exit $ac_status); } && {
22937 test -z "$ac_c_werror_flag" ||
22938 test ! -s conftest.err
22939 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022940
22941 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022942#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022943_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022944
Martin v. Löwis11437992002-04-12 09:54:03 +000022945
22946cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022947#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022948_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022949
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022950 { echo "$as_me:$LINENO: result: yes" >&5
22951echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022952
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022953else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022955sed 's/^/| /' conftest.$ac_ext >&5
22956
Martin v. Löwis11437992002-04-12 09:54:03 +000022957
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022958 { echo "$as_me:$LINENO: result: no" >&5
22959echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022960
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022962
22963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022964
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022966
22967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022968
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022970
22971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022972 CFLAGS=$OLD_CFLAGS
22973
22974else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022975
Martin v. Löwis11437992002-04-12 09:54:03 +000022976
22977for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022978do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022979as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22980{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22981echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022982if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022983 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022984else
Martin v. Löwis11437992002-04-12 09:54:03 +000022985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022986/* confdefs.h. */
22987_ACEOF
22988cat confdefs.h >>conftest.$ac_ext
22989cat >>conftest.$ac_ext <<_ACEOF
22990/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022991/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22992 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22993#define $ac_func innocuous_$ac_func
22994
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022995/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022996 which can conflict with char $ac_func (); below.
22997 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022998 <limits.h> exists even on freestanding compilers. */
22999
23000#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023001# include <limits.h>
23002#else
23003# include <assert.h>
23004#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023005
23006#undef $ac_func
23007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023008/* Override any GCC internal prototype to avoid an error.
23009 Use char because int might match the return type of a GCC
23010 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023011#ifdef __cplusplus
23012extern "C"
23013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023014char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023015/* The GNU C library defines this for functions which it implements
23016 to always fail with ENOSYS. Some functions are actually named
23017 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023018#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023019choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023020#endif
23021
Skip Montanaro6dead952003-09-25 14:50:04 +000023022int
23023main ()
23024{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023025return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023026 ;
23027 return 0;
23028}
23029_ACEOF
23030rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023031if { (ac_try="$ac_link"
23032case "(($ac_try" in
23033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23034 *) ac_try_echo=$ac_try;;
23035esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023037 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023039 grep -v '^ *+' conftest.er1 >conftest.err
23040 rm -f conftest.er1
23041 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023043 (exit $ac_status); } && {
23044 test -z "$ac_c_werror_flag" ||
23045 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023046 } && test -s conftest$ac_exeext &&
23047 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023048 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023049else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023051sed 's/^/| /' conftest.$ac_ext >&5
23052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023053 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023055
23056rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023057 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023058fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023059ac_res=`eval echo '${'$as_ac_var'}'`
23060 { echo "$as_me:$LINENO: result: $ac_res" >&5
23061echo "${ECHO_T}$ac_res" >&6; }
23062if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023063 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023064#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023065_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023066
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023067fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023068done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023069
Michael W. Hudson54241132001-12-07 15:38:26 +000023070
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023071fi
23072
Michael W. Hudson54241132001-12-07 15:38:26 +000023073
23074
23075
23076
23077
23078
Guido van Rossum627b2d71993-12-24 10:39:16 +000023079# checks for system services
23080# (none yet)
23081
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023082# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023083{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23084echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023085if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023086 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023087else
Martin v. Löwis11437992002-04-12 09:54:03 +000023088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023089/* confdefs.h. */
23090_ACEOF
23091cat confdefs.h >>conftest.$ac_ext
23092cat >>conftest.$ac_ext <<_ACEOF
23093/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023094/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23095 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23096#define __fpu_control innocuous___fpu_control
23097
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023098/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023099 which can conflict with char __fpu_control (); below.
23100 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023101 <limits.h> exists even on freestanding compilers. */
23102
23103#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023104# include <limits.h>
23105#else
23106# include <assert.h>
23107#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023108
23109#undef __fpu_control
23110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023111/* Override any GCC internal prototype to avoid an error.
23112 Use char because int might match the return type of a GCC
23113 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023114#ifdef __cplusplus
23115extern "C"
23116#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023117char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023118/* The GNU C library defines this for functions which it implements
23119 to always fail with ENOSYS. Some functions are actually named
23120 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023121#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023122choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023123#endif
23124
Skip Montanaro6dead952003-09-25 14:50:04 +000023125int
23126main ()
23127{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023128return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023129 ;
23130 return 0;
23131}
23132_ACEOF
23133rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023134if { (ac_try="$ac_link"
23135case "(($ac_try" in
23136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23137 *) ac_try_echo=$ac_try;;
23138esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023140 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023142 grep -v '^ *+' conftest.er1 >conftest.err
23143 rm -f conftest.er1
23144 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023146 (exit $ac_status); } && {
23147 test -z "$ac_c_werror_flag" ||
23148 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023149 } && test -s conftest$ac_exeext &&
23150 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023151 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023152else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023154sed 's/^/| /' conftest.$ac_ext >&5
23155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023156 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023158
23159rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023160 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023161fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023162{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23163echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23164if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023165 :
23166else
Martin v. Löwis11437992002-04-12 09:54:03 +000023167
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023168{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23169echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023170if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023171 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023172else
Martin v. Löwis11437992002-04-12 09:54:03 +000023173 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023174LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023175cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023176/* confdefs.h. */
23177_ACEOF
23178cat confdefs.h >>conftest.$ac_ext
23179cat >>conftest.$ac_ext <<_ACEOF
23180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023182/* Override any GCC internal prototype to avoid an error.
23183 Use char because int might match the return type of a GCC
23184 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023185#ifdef __cplusplus
23186extern "C"
23187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023188char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023189int
23190main ()
23191{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023192return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023193 ;
23194 return 0;
23195}
23196_ACEOF
23197rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023198if { (ac_try="$ac_link"
23199case "(($ac_try" in
23200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23201 *) ac_try_echo=$ac_try;;
23202esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023204 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023206 grep -v '^ *+' conftest.er1 >conftest.err
23207 rm -f conftest.er1
23208 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023210 (exit $ac_status); } && {
23211 test -z "$ac_c_werror_flag" ||
23212 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023213 } && test -s conftest$ac_exeext &&
23214 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023215 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023216else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023218sed 's/^/| /' conftest.$ac_ext >&5
23219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023220 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023222
23223rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023224 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023225LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023226fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023227{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23228echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23229if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023230 cat >>confdefs.h <<_ACEOF
23231#define HAVE_LIBIEEE 1
23232_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023233
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023234 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023235
Guido van Rossum627b2d71993-12-24 10:39:16 +000023236fi
23237
Michael W. Hudson54241132001-12-07 15:38:26 +000023238
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023239fi
23240
Michael W. Hudson54241132001-12-07 15:38:26 +000023241
Guido van Rossum7f253911997-05-09 02:42:48 +000023242# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023243{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23244echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023246# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023247if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023248 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023249if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023250then
23251
23252cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023253#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023254_ACEOF
23255
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023256 { echo "$as_me:$LINENO: result: yes" >&5
23257echo "${ECHO_T}yes" >&6; }
23258else { echo "$as_me:$LINENO: result: no" >&5
23259echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023260fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023261else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023262 { echo "$as_me:$LINENO: result: no" >&5
23263echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023264fi
23265
Guido van Rossum7f253911997-05-09 02:42:48 +000023266
Guido van Rossum7f43da71994-08-01 12:15:30 +000023267# check for --with-libm=...
23268
Guido van Rossum563e7081996-09-10 18:20:48 +000023269case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023270Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023271*) LIBM=-lm
23272esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023273{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23274echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023276# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023277if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023278 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023279if test "$withval" = no
23280then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023281 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23282echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023283elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023284then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023285 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23286echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23287else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23288echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023289 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023290fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023291else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023292 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23293echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023294fi
23295
Guido van Rossum7f43da71994-08-01 12:15:30 +000023296
23297# check for --with-libc=...
23298
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023299{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23300echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023302# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023303if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023304 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023305if test "$withval" = no
23306then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023307 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23308echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023309elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023310then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023311 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23312echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23313else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23314echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023315 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023316fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023317else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023318 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23319echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023320fi
23321
Guido van Rossum7f43da71994-08-01 12:15:30 +000023322
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023323# **************************************************
23324# * Check for various properties of floating point *
23325# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023326
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023327{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23328echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023329if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023330 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023331else
23332
23333if test "$cross_compiling" = yes; then
23334 ac_cv_little_endian_double=no
23335else
23336 cat >conftest.$ac_ext <<_ACEOF
23337/* confdefs.h. */
23338_ACEOF
23339cat confdefs.h >>conftest.$ac_ext
23340cat >>conftest.$ac_ext <<_ACEOF
23341/* end confdefs.h. */
23342
23343#include <string.h>
23344int main() {
23345 double x = 9006104071832581.0;
23346 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23347 return 0;
23348 else
23349 return 1;
23350}
23351
23352_ACEOF
23353rm -f conftest$ac_exeext
23354if { (ac_try="$ac_link"
23355case "(($ac_try" in
23356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23357 *) ac_try_echo=$ac_try;;
23358esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023360 (eval "$ac_link") 2>&5
23361 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023363 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23364 { (case "(($ac_try" in
23365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23366 *) ac_try_echo=$ac_try;;
23367esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023369 (eval "$ac_try") 2>&5
23370 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023372 (exit $ac_status); }; }; then
23373 ac_cv_little_endian_double=yes
23374else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023375 echo "$as_me: program exited with status $ac_status" >&5
23376echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023377sed 's/^/| /' conftest.$ac_ext >&5
23378
23379( exit $ac_status )
23380ac_cv_little_endian_double=no
23381fi
23382rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23383fi
23384
23385
23386fi
23387
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023388{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23389echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023390if test "$ac_cv_little_endian_double" = yes
23391then
23392
23393cat >>confdefs.h <<\_ACEOF
23394#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23395_ACEOF
23396
23397fi
23398
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023399{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23400echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023401if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023402 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023403else
23404
23405if test "$cross_compiling" = yes; then
23406 ac_cv_big_endian_double=no
23407else
23408 cat >conftest.$ac_ext <<_ACEOF
23409/* confdefs.h. */
23410_ACEOF
23411cat confdefs.h >>conftest.$ac_ext
23412cat >>conftest.$ac_ext <<_ACEOF
23413/* end confdefs.h. */
23414
23415#include <string.h>
23416int main() {
23417 double x = 9006104071832581.0;
23418 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23419 return 0;
23420 else
23421 return 1;
23422}
23423
23424_ACEOF
23425rm -f conftest$ac_exeext
23426if { (ac_try="$ac_link"
23427case "(($ac_try" in
23428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23429 *) ac_try_echo=$ac_try;;
23430esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023432 (eval "$ac_link") 2>&5
23433 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023435 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23436 { (case "(($ac_try" in
23437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23438 *) ac_try_echo=$ac_try;;
23439esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023441 (eval "$ac_try") 2>&5
23442 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023444 (exit $ac_status); }; }; then
23445 ac_cv_big_endian_double=yes
23446else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023447 echo "$as_me: program exited with status $ac_status" >&5
23448echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023449sed 's/^/| /' conftest.$ac_ext >&5
23450
23451( exit $ac_status )
23452ac_cv_big_endian_double=no
23453fi
23454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23455fi
23456
23457
23458fi
23459
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023460{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23461echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023462if test "$ac_cv_big_endian_double" = yes
23463then
23464
23465cat >>confdefs.h <<\_ACEOF
23466#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23467_ACEOF
23468
23469fi
23470
23471# Some ARM platforms use a mixed-endian representation for doubles.
23472# While Python doesn't currently have full support for these platforms
23473# (see e.g., issue 1762561), we can at least make sure that float <-> string
23474# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023475{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23476echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023477if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023478 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023479else
23480
23481if test "$cross_compiling" = yes; then
23482 ac_cv_mixed_endian_double=no
23483else
23484 cat >conftest.$ac_ext <<_ACEOF
23485/* confdefs.h. */
23486_ACEOF
23487cat confdefs.h >>conftest.$ac_ext
23488cat >>conftest.$ac_ext <<_ACEOF
23489/* end confdefs.h. */
23490
23491#include <string.h>
23492int main() {
23493 double x = 9006104071832581.0;
23494 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23495 return 0;
23496 else
23497 return 1;
23498}
23499
23500_ACEOF
23501rm -f conftest$ac_exeext
23502if { (ac_try="$ac_link"
23503case "(($ac_try" in
23504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23505 *) ac_try_echo=$ac_try;;
23506esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023508 (eval "$ac_link") 2>&5
23509 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023511 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23512 { (case "(($ac_try" in
23513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23514 *) ac_try_echo=$ac_try;;
23515esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023517 (eval "$ac_try") 2>&5
23518 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023520 (exit $ac_status); }; }; then
23521 ac_cv_mixed_endian_double=yes
23522else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023523 echo "$as_me: program exited with status $ac_status" >&5
23524echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023525sed 's/^/| /' conftest.$ac_ext >&5
23526
23527( exit $ac_status )
23528ac_cv_mixed_endian_double=no
23529fi
23530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23531fi
23532
23533
23534fi
23535
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023536{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23537echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023538if test "$ac_cv_mixed_endian_double" = yes
23539then
23540
23541cat >>confdefs.h <<\_ACEOF
23542#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23543_ACEOF
23544
23545fi
23546
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023547# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023548# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023549# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023550# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023551# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000023552# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023553
23554# This inline assembler syntax may also work for suncc and icc,
23555# so we try it on all platforms.
23556
23557{ echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023558echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023559cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023560/* confdefs.h. */
23561_ACEOF
23562cat confdefs.h >>conftest.$ac_ext
23563cat >>conftest.$ac_ext <<_ACEOF
23564/* end confdefs.h. */
23565
23566int
23567main ()
23568{
23569
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023570 unsigned short cw;
23571 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23572 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023573
23574 ;
23575 return 0;
23576}
23577_ACEOF
23578rm -f conftest.$ac_objext
23579if { (ac_try="$ac_compile"
23580case "(($ac_try" in
23581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23582 *) ac_try_echo=$ac_try;;
23583esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023585 (eval "$ac_compile") 2>conftest.er1
23586 ac_status=$?
23587 grep -v '^ *+' conftest.er1 >conftest.err
23588 rm -f conftest.er1
23589 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023591 (exit $ac_status); } && {
23592 test -z "$ac_c_werror_flag" ||
23593 test ! -s conftest.err
23594 } && test -s conftest.$ac_objext; then
23595 have_gcc_asm_for_x87=yes
23596else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023597 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023598sed 's/^/| /' conftest.$ac_ext >&5
23599
23600 have_gcc_asm_for_x87=no
23601fi
23602
23603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023604{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023605echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023606if test "$have_gcc_asm_for_x87" = yes
23607then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023608
23609cat >>confdefs.h <<\_ACEOF
23610#define HAVE_GCC_ASM_FOR_X87 1
23611_ACEOF
23612
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023613fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023614
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023615# Detect whether system arithmetic is subject to x87-style double
23616# rounding issues. The result of this test has little meaning on non
23617# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23618# mode is round-to-nearest and double rounding issues are present, and
23619# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023620{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23621echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023622# $BASECFLAGS may affect the result
23623ac_save_cc="$CC"
23624CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023625if test "$cross_compiling" = yes; then
23626 ac_cv_x87_double_rounding=no
23627else
23628 cat >conftest.$ac_ext <<_ACEOF
23629/* confdefs.h. */
23630_ACEOF
23631cat confdefs.h >>conftest.$ac_ext
23632cat >>conftest.$ac_ext <<_ACEOF
23633/* end confdefs.h. */
23634
23635#include <stdlib.h>
23636#include <math.h>
23637int main() {
23638 volatile double x, y, z;
23639 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23640 x = 0.99999999999999989; /* 1-2**-53 */
23641 y = 1./x;
23642 if (y != 1.)
23643 exit(0);
23644 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23645 x = 1e16;
23646 y = 2.99999;
23647 z = x + y;
23648 if (z != 1e16+4.)
23649 exit(0);
23650 /* both tests show evidence of double rounding */
23651 exit(1);
23652}
23653
23654_ACEOF
23655rm -f conftest$ac_exeext
23656if { (ac_try="$ac_link"
23657case "(($ac_try" in
23658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23659 *) ac_try_echo=$ac_try;;
23660esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023662 (eval "$ac_link") 2>&5
23663 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023665 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23666 { (case "(($ac_try" in
23667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23668 *) ac_try_echo=$ac_try;;
23669esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023671 (eval "$ac_try") 2>&5
23672 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023674 (exit $ac_status); }; }; then
23675 ac_cv_x87_double_rounding=no
23676else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023677 echo "$as_me: program exited with status $ac_status" >&5
23678echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023679sed 's/^/| /' conftest.$ac_ext >&5
23680
23681( exit $ac_status )
23682ac_cv_x87_double_rounding=yes
23683fi
23684rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23685fi
23686
23687
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023688CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023689{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23690echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023691if test "$ac_cv_x87_double_rounding" = yes
23692then
23693
23694cat >>confdefs.h <<\_ACEOF
23695#define X87_DOUBLE_ROUNDING 1
23696_ACEOF
23697
23698fi
23699
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023700# ************************************
23701# * Check for mathematical functions *
23702# ************************************
23703
23704LIBS_SAVE=$LIBS
23705LIBS="$LIBS $LIBM"
23706
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023707# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23708# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023709{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23710echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023711if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023712 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023713else
23714
23715if test "$cross_compiling" = yes; then
23716 ac_cv_tanh_preserves_zero_sign=no
23717else
23718 cat >conftest.$ac_ext <<_ACEOF
23719/* confdefs.h. */
23720_ACEOF
23721cat confdefs.h >>conftest.$ac_ext
23722cat >>conftest.$ac_ext <<_ACEOF
23723/* end confdefs.h. */
23724
23725#include <math.h>
23726#include <stdlib.h>
23727int main() {
23728 /* return 0 if either negative zeros don't exist
23729 on this platform or if negative zeros exist
23730 and tanh(-0.) == -0. */
23731 if (atan2(0., -1.) == atan2(-0., -1.) ||
23732 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23733 else exit(1);
23734}
23735
23736_ACEOF
23737rm -f conftest$ac_exeext
23738if { (ac_try="$ac_link"
23739case "(($ac_try" in
23740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23741 *) ac_try_echo=$ac_try;;
23742esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023744 (eval "$ac_link") 2>&5
23745 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023747 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23748 { (case "(($ac_try" in
23749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23750 *) ac_try_echo=$ac_try;;
23751esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023753 (eval "$ac_try") 2>&5
23754 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023756 (exit $ac_status); }; }; then
23757 ac_cv_tanh_preserves_zero_sign=yes
23758else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023759 echo "$as_me: program exited with status $ac_status" >&5
23760echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023761sed 's/^/| /' conftest.$ac_ext >&5
23762
23763( exit $ac_status )
23764ac_cv_tanh_preserves_zero_sign=no
23765fi
23766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23767fi
23768
23769
23770fi
23771
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023772{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23773echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023774if test "$ac_cv_tanh_preserves_zero_sign" = yes
23775then
23776
23777cat >>confdefs.h <<\_ACEOF
23778#define TANH_PRESERVES_ZERO_SIGN 1
23779_ACEOF
23780
23781fi
23782
23783
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023784
Michael W. Hudson54241132001-12-07 15:38:26 +000023785
Christian Heimes99170a52007-12-19 02:07:34 +000023786
23787
23788
23789
23790
Mark Dickinsonf2537862009-04-18 13:58:18 +000023791
Mark Dickinson9c113362009-09-05 10:36:23 +000023792for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23793do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023794as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23795{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23796echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023797if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023798 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023799else
23800 cat >conftest.$ac_ext <<_ACEOF
23801/* confdefs.h. */
23802_ACEOF
23803cat confdefs.h >>conftest.$ac_ext
23804cat >>conftest.$ac_ext <<_ACEOF
23805/* end confdefs.h. */
23806/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23807 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23808#define $ac_func innocuous_$ac_func
23809
23810/* System header to define __stub macros and hopefully few prototypes,
23811 which can conflict with char $ac_func (); below.
23812 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23813 <limits.h> exists even on freestanding compilers. */
23814
23815#ifdef __STDC__
23816# include <limits.h>
23817#else
23818# include <assert.h>
23819#endif
23820
23821#undef $ac_func
23822
23823/* Override any GCC internal prototype to avoid an error.
23824 Use char because int might match the return type of a GCC
23825 builtin and then its argument prototype would still apply. */
23826#ifdef __cplusplus
23827extern "C"
23828#endif
23829char $ac_func ();
23830/* The GNU C library defines this for functions which it implements
23831 to always fail with ENOSYS. Some functions are actually named
23832 something starting with __ and the normal name is an alias. */
23833#if defined __stub_$ac_func || defined __stub___$ac_func
23834choke me
23835#endif
23836
23837int
23838main ()
23839{
23840return $ac_func ();
23841 ;
23842 return 0;
23843}
23844_ACEOF
23845rm -f conftest.$ac_objext conftest$ac_exeext
23846if { (ac_try="$ac_link"
23847case "(($ac_try" in
23848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23849 *) ac_try_echo=$ac_try;;
23850esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023852 (eval "$ac_link") 2>conftest.er1
23853 ac_status=$?
23854 grep -v '^ *+' conftest.er1 >conftest.err
23855 rm -f conftest.er1
23856 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023858 (exit $ac_status); } && {
23859 test -z "$ac_c_werror_flag" ||
23860 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023861 } && test -s conftest$ac_exeext &&
23862 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023863 eval "$as_ac_var=yes"
23864else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023865 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023866sed 's/^/| /' conftest.$ac_ext >&5
23867
23868 eval "$as_ac_var=no"
23869fi
23870
23871rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23872 conftest$ac_exeext conftest.$ac_ext
23873fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023874ac_res=`eval echo '${'$as_ac_var'}'`
23875 { echo "$as_me:$LINENO: result: $ac_res" >&5
23876echo "${ECHO_T}$ac_res" >&6; }
23877if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023878 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023879#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023880_ACEOF
23881
23882fi
23883done
23884
23885
23886
23887
23888
23889
23890for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023891do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023892as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23893{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23894echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023895if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023896 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023897else
23898 cat >conftest.$ac_ext <<_ACEOF
23899/* confdefs.h. */
23900_ACEOF
23901cat confdefs.h >>conftest.$ac_ext
23902cat >>conftest.$ac_ext <<_ACEOF
23903/* end confdefs.h. */
23904/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23905 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23906#define $ac_func innocuous_$ac_func
23907
23908/* System header to define __stub macros and hopefully few prototypes,
23909 which can conflict with char $ac_func (); below.
23910 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23911 <limits.h> exists even on freestanding compilers. */
23912
23913#ifdef __STDC__
23914# include <limits.h>
23915#else
23916# include <assert.h>
23917#endif
23918
23919#undef $ac_func
23920
23921/* Override any GCC internal prototype to avoid an error.
23922 Use char because int might match the return type of a GCC
23923 builtin and then its argument prototype would still apply. */
23924#ifdef __cplusplus
23925extern "C"
23926#endif
23927char $ac_func ();
23928/* The GNU C library defines this for functions which it implements
23929 to always fail with ENOSYS. Some functions are actually named
23930 something starting with __ and the normal name is an alias. */
23931#if defined __stub_$ac_func || defined __stub___$ac_func
23932choke me
23933#endif
23934
23935int
23936main ()
23937{
23938return $ac_func ();
23939 ;
23940 return 0;
23941}
23942_ACEOF
23943rm -f conftest.$ac_objext conftest$ac_exeext
23944if { (ac_try="$ac_link"
23945case "(($ac_try" in
23946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23947 *) ac_try_echo=$ac_try;;
23948esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023950 (eval "$ac_link") 2>conftest.er1
23951 ac_status=$?
23952 grep -v '^ *+' conftest.er1 >conftest.err
23953 rm -f conftest.er1
23954 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023956 (exit $ac_status); } && {
23957 test -z "$ac_c_werror_flag" ||
23958 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023959 } && test -s conftest$ac_exeext &&
23960 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023961 eval "$as_ac_var=yes"
23962else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023963 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023964sed 's/^/| /' conftest.$ac_ext >&5
23965
23966 eval "$as_ac_var=no"
23967fi
23968
23969rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23970 conftest$ac_exeext conftest.$ac_ext
23971fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023972ac_res=`eval echo '${'$as_ac_var'}'`
23973 { echo "$as_me:$LINENO: result: $ac_res" >&5
23974echo "${ECHO_T}$ac_res" >&6; }
23975if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023976 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023977#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023978_ACEOF
23979
23980fi
23981done
23982
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023983{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23984echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023985if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023986 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023987else
23988 cat >conftest.$ac_ext <<_ACEOF
23989/* confdefs.h. */
23990_ACEOF
23991cat confdefs.h >>conftest.$ac_ext
23992cat >>conftest.$ac_ext <<_ACEOF
23993/* end confdefs.h. */
23994#include <math.h>
23995
23996int
23997main ()
23998{
23999#ifndef isinf
24000 (void) isinf;
24001#endif
24002
24003 ;
24004 return 0;
24005}
24006_ACEOF
24007rm -f conftest.$ac_objext
24008if { (ac_try="$ac_compile"
24009case "(($ac_try" in
24010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24011 *) ac_try_echo=$ac_try;;
24012esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024014 (eval "$ac_compile") 2>conftest.er1
24015 ac_status=$?
24016 grep -v '^ *+' conftest.er1 >conftest.err
24017 rm -f conftest.er1
24018 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024020 (exit $ac_status); } && {
24021 test -z "$ac_c_werror_flag" ||
24022 test ! -s conftest.err
24023 } && test -s conftest.$ac_objext; then
24024 ac_cv_have_decl_isinf=yes
24025else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024026 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024027sed 's/^/| /' conftest.$ac_ext >&5
24028
24029 ac_cv_have_decl_isinf=no
24030fi
24031
24032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24033fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024034{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24035echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24036if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024037
24038cat >>confdefs.h <<_ACEOF
24039#define HAVE_DECL_ISINF 1
24040_ACEOF
24041
24042
24043else
24044 cat >>confdefs.h <<_ACEOF
24045#define HAVE_DECL_ISINF 0
24046_ACEOF
24047
24048
24049fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024050{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24051echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024052if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024053 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024054else
24055 cat >conftest.$ac_ext <<_ACEOF
24056/* confdefs.h. */
24057_ACEOF
24058cat confdefs.h >>conftest.$ac_ext
24059cat >>conftest.$ac_ext <<_ACEOF
24060/* end confdefs.h. */
24061#include <math.h>
24062
24063int
24064main ()
24065{
24066#ifndef isnan
24067 (void) isnan;
24068#endif
24069
24070 ;
24071 return 0;
24072}
24073_ACEOF
24074rm -f conftest.$ac_objext
24075if { (ac_try="$ac_compile"
24076case "(($ac_try" in
24077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24078 *) ac_try_echo=$ac_try;;
24079esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024081 (eval "$ac_compile") 2>conftest.er1
24082 ac_status=$?
24083 grep -v '^ *+' conftest.er1 >conftest.err
24084 rm -f conftest.er1
24085 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024087 (exit $ac_status); } && {
24088 test -z "$ac_c_werror_flag" ||
24089 test ! -s conftest.err
24090 } && test -s conftest.$ac_objext; then
24091 ac_cv_have_decl_isnan=yes
24092else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024093 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024094sed 's/^/| /' conftest.$ac_ext >&5
24095
24096 ac_cv_have_decl_isnan=no
24097fi
24098
24099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24100fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024101{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24102echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24103if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024104
24105cat >>confdefs.h <<_ACEOF
24106#define HAVE_DECL_ISNAN 1
24107_ACEOF
24108
24109
24110else
24111 cat >>confdefs.h <<_ACEOF
24112#define HAVE_DECL_ISNAN 0
24113_ACEOF
24114
24115
24116fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024117{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24118echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024119if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024120 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024121else
24122 cat >conftest.$ac_ext <<_ACEOF
24123/* confdefs.h. */
24124_ACEOF
24125cat confdefs.h >>conftest.$ac_ext
24126cat >>conftest.$ac_ext <<_ACEOF
24127/* end confdefs.h. */
24128#include <math.h>
24129
24130int
24131main ()
24132{
24133#ifndef isfinite
24134 (void) isfinite;
24135#endif
24136
24137 ;
24138 return 0;
24139}
24140_ACEOF
24141rm -f conftest.$ac_objext
24142if { (ac_try="$ac_compile"
24143case "(($ac_try" in
24144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24145 *) ac_try_echo=$ac_try;;
24146esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024148 (eval "$ac_compile") 2>conftest.er1
24149 ac_status=$?
24150 grep -v '^ *+' conftest.er1 >conftest.err
24151 rm -f conftest.er1
24152 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024154 (exit $ac_status); } && {
24155 test -z "$ac_c_werror_flag" ||
24156 test ! -s conftest.err
24157 } && test -s conftest.$ac_objext; then
24158 ac_cv_have_decl_isfinite=yes
24159else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024160 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024161sed 's/^/| /' conftest.$ac_ext >&5
24162
24163 ac_cv_have_decl_isfinite=no
24164fi
24165
24166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24167fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024168{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24169echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24170if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024171
24172cat >>confdefs.h <<_ACEOF
24173#define HAVE_DECL_ISFINITE 1
24174_ACEOF
24175
24176
24177else
24178 cat >>confdefs.h <<_ACEOF
24179#define HAVE_DECL_ISFINITE 0
24180_ACEOF
24181
24182
24183fi
24184
24185
Christian Heimes99170a52007-12-19 02:07:34 +000024186
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024187LIBS=$LIBS_SAVE
24188
Mark Dickinsona614f042009-11-28 12:48:43 +000024189# For multiprocessing module, check that sem_open
24190# actually works. For FreeBSD versions <= 7.2,
24191# the kernel module that provides POSIX semaphores
24192# isn't loaded by default, so an attempt to call
24193# sem_open results in a 'Signal 12' error.
24194{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24195echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24196if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24197 echo $ECHO_N "(cached) $ECHO_C" >&6
24198else
24199 if test "$cross_compiling" = yes; then
24200 ac_cv_posix_semaphores_enabled=yes
24201else
24202 cat >conftest.$ac_ext <<_ACEOF
24203/* confdefs.h. */
24204_ACEOF
24205cat confdefs.h >>conftest.$ac_ext
24206cat >>conftest.$ac_ext <<_ACEOF
24207/* end confdefs.h. */
24208
24209#include <unistd.h>
24210#include <fcntl.h>
24211#include <stdio.h>
24212#include <semaphore.h>
24213#include <sys/stat.h>
24214
24215int main(void) {
24216 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24217 if (a == SEM_FAILED) {
24218 perror("sem_open");
24219 return 1;
24220 }
24221 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024222 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000024223 return 0;
24224}
24225
24226_ACEOF
24227rm -f conftest$ac_exeext
24228if { (ac_try="$ac_link"
24229case "(($ac_try" in
24230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24231 *) ac_try_echo=$ac_try;;
24232esac
24233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24234 (eval "$ac_link") 2>&5
24235 ac_status=$?
24236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24237 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24238 { (case "(($ac_try" in
24239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24240 *) ac_try_echo=$ac_try;;
24241esac
24242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24243 (eval "$ac_try") 2>&5
24244 ac_status=$?
24245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24246 (exit $ac_status); }; }; then
24247 ac_cv_posix_semaphores_enabled=yes
24248else
24249 echo "$as_me: program exited with status $ac_status" >&5
24250echo "$as_me: failed program was:" >&5
24251sed 's/^/| /' conftest.$ac_ext >&5
24252
24253( exit $ac_status )
24254ac_cv_posix_semaphores_enabled=no
24255fi
24256rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24257fi
24258
24259
24260
24261fi
24262
24263{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24264echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24265if test $ac_cv_posix_semaphores_enabled = no
24266then
24267
24268cat >>confdefs.h <<\_ACEOF
24269#define POSIX_SEMAPHORES_NOT_ENABLED 1
24270_ACEOF
24271
24272fi
24273
Mark Dickinson10683072009-04-18 21:18:19 +000024274# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024275{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24276echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024277if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024278 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024279else
24280 if test "$cross_compiling" = yes; then
24281 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000024282else
24283 cat >conftest.$ac_ext <<_ACEOF
24284/* confdefs.h. */
24285_ACEOF
24286cat confdefs.h >>conftest.$ac_ext
24287cat >>conftest.$ac_ext <<_ACEOF
24288/* end confdefs.h. */
24289
24290#include <unistd.h>
24291#include <fcntl.h>
24292#include <stdio.h>
24293#include <semaphore.h>
24294#include <sys/stat.h>
24295
24296int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000024297 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000024298 int count;
24299 int res;
24300 if(a==SEM_FAILED){
24301 perror("sem_open");
24302 return 1;
24303
24304 }
24305 res = sem_getvalue(a, &count);
24306 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024307 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000024308 return res==-1 ? 1 : 0;
24309}
24310
Mark Dickinson10683072009-04-18 21:18:19 +000024311_ACEOF
24312rm -f conftest$ac_exeext
24313if { (ac_try="$ac_link"
24314case "(($ac_try" in
24315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24316 *) ac_try_echo=$ac_try;;
24317esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024319 (eval "$ac_link") 2>&5
24320 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024322 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24323 { (case "(($ac_try" in
24324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24325 *) ac_try_echo=$ac_try;;
24326esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024328 (eval "$ac_try") 2>&5
24329 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024331 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024332 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000024333else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024334 echo "$as_me: program exited with status $ac_status" >&5
24335echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024336sed 's/^/| /' conftest.$ac_ext >&5
24337
24338( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024339ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024340fi
24341rm -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 +000024342fi
24343
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024344
24345
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024346fi
24347
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024348{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24349echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024350if test $ac_cv_broken_sem_getvalue = yes
24351then
24352
24353cat >>confdefs.h <<\_ACEOF
24354#define HAVE_BROKEN_SEM_GETVALUE 1
24355_ACEOF
24356
24357fi
24358
Mark Dickinsonbd792642009-03-18 20:06:12 +000024359# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024360{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24361echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024362# Check whether --enable-big-digits was given.
24363if test "${enable_big_digits+set}" = set; then
24364 enableval=$enable_big_digits; case $enable_big_digits in
24365yes)
24366 enable_big_digits=30 ;;
24367no)
24368 enable_big_digits=15 ;;
2436915|30)
24370 ;;
24371*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024372 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24373echo "$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 +000024374 { (exit 1); exit 1; }; } ;;
24375esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024376{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24377echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024378
24379cat >>confdefs.h <<_ACEOF
24380#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24381_ACEOF
24382
24383
24384else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024385 { echo "$as_me:$LINENO: result: no value specified" >&5
24386echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024387fi
24388
24389
Guido van Rossumef2255b2000-03-10 22:30:29 +000024390# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024391if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024392 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24393echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024394if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024395 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024396fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024397{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24398echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024399else
Martin v. Löwis11437992002-04-12 09:54:03 +000024400 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024401{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24402echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024403cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024404/* confdefs.h. */
24405_ACEOF
24406cat confdefs.h >>conftest.$ac_ext
24407cat >>conftest.$ac_ext <<_ACEOF
24408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024409$ac_includes_default
24410#include <wchar.h>
24411_ACEOF
24412rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024413if { (ac_try="$ac_compile"
24414case "(($ac_try" in
24415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24416 *) ac_try_echo=$ac_try;;
24417esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024419 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024420 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024421 grep -v '^ *+' conftest.er1 >conftest.err
24422 rm -f conftest.er1
24423 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024425 (exit $ac_status); } && {
24426 test -z "$ac_c_werror_flag" ||
24427 test ! -s conftest.err
24428 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024429 ac_header_compiler=yes
24430else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024432sed 's/^/| /' conftest.$ac_ext >&5
24433
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024434 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024436
24437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024438{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24439echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024440
24441# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024442{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24443echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024444cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024445/* confdefs.h. */
24446_ACEOF
24447cat confdefs.h >>conftest.$ac_ext
24448cat >>conftest.$ac_ext <<_ACEOF
24449/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024450#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024451_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024452if { (ac_try="$ac_cpp conftest.$ac_ext"
24453case "(($ac_try" in
24454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24455 *) ac_try_echo=$ac_try;;
24456esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024458 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024459 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024460 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024461 rm -f conftest.er1
24462 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024464 (exit $ac_status); } >/dev/null && {
24465 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24466 test ! -s conftest.err
24467 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024468 ac_header_preproc=yes
24469else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024471sed 's/^/| /' conftest.$ac_ext >&5
24472
Martin v. Löwis11437992002-04-12 09:54:03 +000024473 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024475
Martin v. Löwis11437992002-04-12 09:54:03 +000024476rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024477{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24478echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024479
24480# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024481case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24482 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024483 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24484echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24485 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24486echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024487 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024488 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024489 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024490 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24491echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24492 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24493echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24494 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24495echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24496 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24497echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24498 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24499echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24500 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24501echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024502 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024503## -------------------------------------- ##
24504## Report this to http://bugs.python.org/ ##
24505## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024506_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024507 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024508 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024509esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024510{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24511echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024512if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024513 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024514else
24515 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024516fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024517{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24518echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024519
24520fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024521if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024522
24523
24524cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024525#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024526_ACEOF
24527
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024528 wchar_h="yes"
24529
Guido van Rossumef2255b2000-03-10 22:30:29 +000024530else
Martin v. Löwis11437992002-04-12 09:54:03 +000024531 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024532
24533fi
24534
Michael W. Hudson54241132001-12-07 15:38:26 +000024535
Martin v. Löwis11437992002-04-12 09:54:03 +000024536
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024537# determine wchar_t size
24538if test "$wchar_h" = yes
24539then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024540 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24541echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24542if test "${ac_cv_type_wchar_t+set}" = set; then
24543 echo $ECHO_N "(cached) $ECHO_C" >&6
24544else
24545 cat >conftest.$ac_ext <<_ACEOF
24546/* confdefs.h. */
24547_ACEOF
24548cat confdefs.h >>conftest.$ac_ext
24549cat >>conftest.$ac_ext <<_ACEOF
24550/* end confdefs.h. */
24551#include <wchar.h>
24552
24553typedef wchar_t ac__type_new_;
24554int
24555main ()
24556{
24557if ((ac__type_new_ *) 0)
24558 return 0;
24559if (sizeof (ac__type_new_))
24560 return 0;
24561 ;
24562 return 0;
24563}
24564_ACEOF
24565rm -f conftest.$ac_objext
24566if { (ac_try="$ac_compile"
24567case "(($ac_try" in
24568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24569 *) ac_try_echo=$ac_try;;
24570esac
24571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24572 (eval "$ac_compile") 2>conftest.er1
24573 ac_status=$?
24574 grep -v '^ *+' conftest.er1 >conftest.err
24575 rm -f conftest.er1
24576 cat conftest.err >&5
24577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24578 (exit $ac_status); } && {
24579 test -z "$ac_c_werror_flag" ||
24580 test ! -s conftest.err
24581 } && test -s conftest.$ac_objext; then
24582 ac_cv_type_wchar_t=yes
24583else
24584 echo "$as_me: failed program was:" >&5
24585sed 's/^/| /' conftest.$ac_ext >&5
24586
24587 ac_cv_type_wchar_t=no
24588fi
24589
24590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24591fi
24592{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24593echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24594
24595# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024596# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24597# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24598# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024599{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24600echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024601if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024602 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024603else
Martin v. Löwis11437992002-04-12 09:54:03 +000024604 if test "$cross_compiling" = yes; then
24605 # Depending upon the size, compute the lo and hi bounds.
24606cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024607/* confdefs.h. */
24608_ACEOF
24609cat confdefs.h >>conftest.$ac_ext
24610cat >>conftest.$ac_ext <<_ACEOF
24611/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024612#include <wchar.h>
24613
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024614 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024615int
24616main ()
24617{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024618static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024619test_array [0] = 0
24620
24621 ;
24622 return 0;
24623}
24624_ACEOF
24625rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024626if { (ac_try="$ac_compile"
24627case "(($ac_try" in
24628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24629 *) ac_try_echo=$ac_try;;
24630esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024632 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024634 grep -v '^ *+' conftest.er1 >conftest.err
24635 rm -f conftest.er1
24636 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024638 (exit $ac_status); } && {
24639 test -z "$ac_c_werror_flag" ||
24640 test ! -s conftest.err
24641 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024642 ac_lo=0 ac_mid=0
24643 while :; do
24644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024645/* confdefs.h. */
24646_ACEOF
24647cat confdefs.h >>conftest.$ac_ext
24648cat >>conftest.$ac_ext <<_ACEOF
24649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024650#include <wchar.h>
24651
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024652 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024653int
24654main ()
24655{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024656static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024657test_array [0] = 0
24658
24659 ;
24660 return 0;
24661}
24662_ACEOF
24663rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024664if { (ac_try="$ac_compile"
24665case "(($ac_try" in
24666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24667 *) ac_try_echo=$ac_try;;
24668esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024672 grep -v '^ *+' conftest.er1 >conftest.err
24673 rm -f conftest.er1
24674 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024676 (exit $ac_status); } && {
24677 test -z "$ac_c_werror_flag" ||
24678 test ! -s conftest.err
24679 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024680 ac_hi=$ac_mid; break
24681else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024683sed 's/^/| /' conftest.$ac_ext >&5
24684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024685 ac_lo=`expr $ac_mid + 1`
24686 if test $ac_lo -le $ac_mid; then
24687 ac_lo= ac_hi=
24688 break
24689 fi
24690 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024692
24693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024694 done
24695else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024697sed 's/^/| /' conftest.$ac_ext >&5
24698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024700/* confdefs.h. */
24701_ACEOF
24702cat confdefs.h >>conftest.$ac_ext
24703cat >>conftest.$ac_ext <<_ACEOF
24704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024705#include <wchar.h>
24706
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024707 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024708int
24709main ()
24710{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024711static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024712test_array [0] = 0
24713
24714 ;
24715 return 0;
24716}
24717_ACEOF
24718rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024719if { (ac_try="$ac_compile"
24720case "(($ac_try" in
24721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24722 *) ac_try_echo=$ac_try;;
24723esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024725 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024727 grep -v '^ *+' conftest.er1 >conftest.err
24728 rm -f conftest.er1
24729 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024731 (exit $ac_status); } && {
24732 test -z "$ac_c_werror_flag" ||
24733 test ! -s conftest.err
24734 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024735 ac_hi=-1 ac_mid=-1
24736 while :; do
24737 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024738/* confdefs.h. */
24739_ACEOF
24740cat confdefs.h >>conftest.$ac_ext
24741cat >>conftest.$ac_ext <<_ACEOF
24742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024743#include <wchar.h>
24744
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024745 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024746int
24747main ()
24748{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024749static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024750test_array [0] = 0
24751
24752 ;
24753 return 0;
24754}
24755_ACEOF
24756rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024757if { (ac_try="$ac_compile"
24758case "(($ac_try" in
24759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24760 *) ac_try_echo=$ac_try;;
24761esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024763 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024765 grep -v '^ *+' conftest.er1 >conftest.err
24766 rm -f conftest.er1
24767 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024769 (exit $ac_status); } && {
24770 test -z "$ac_c_werror_flag" ||
24771 test ! -s conftest.err
24772 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024773 ac_lo=$ac_mid; break
24774else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024776sed 's/^/| /' conftest.$ac_ext >&5
24777
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024778 ac_hi=`expr '(' $ac_mid ')' - 1`
24779 if test $ac_mid -le $ac_hi; then
24780 ac_lo= ac_hi=
24781 break
24782 fi
24783 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024785
24786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024787 done
24788else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024790sed 's/^/| /' conftest.$ac_ext >&5
24791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024792 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024794
24795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024797
24798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024799# Binary search between lo and hi bounds.
24800while test "x$ac_lo" != "x$ac_hi"; do
24801 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24802 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024803/* confdefs.h. */
24804_ACEOF
24805cat confdefs.h >>conftest.$ac_ext
24806cat >>conftest.$ac_ext <<_ACEOF
24807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024808#include <wchar.h>
24809
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024810 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024811int
24812main ()
24813{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024814static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024815test_array [0] = 0
24816
24817 ;
24818 return 0;
24819}
24820_ACEOF
24821rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024822if { (ac_try="$ac_compile"
24823case "(($ac_try" in
24824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24825 *) ac_try_echo=$ac_try;;
24826esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024828 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024830 grep -v '^ *+' conftest.er1 >conftest.err
24831 rm -f conftest.er1
24832 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024834 (exit $ac_status); } && {
24835 test -z "$ac_c_werror_flag" ||
24836 test ! -s conftest.err
24837 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024838 ac_hi=$ac_mid
24839else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024841sed 's/^/| /' conftest.$ac_ext >&5
24842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024843 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024845
24846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024847done
24848case $ac_lo in
24849?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024850'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024851 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024852See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024853echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024854See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024855 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024856 else
24857 ac_cv_sizeof_wchar_t=0
24858 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024859esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024860else
Martin v. Löwis11437992002-04-12 09:54:03 +000024861 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024862/* confdefs.h. */
24863_ACEOF
24864cat confdefs.h >>conftest.$ac_ext
24865cat >>conftest.$ac_ext <<_ACEOF
24866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024867#include <wchar.h>
24868
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024869 typedef wchar_t ac__type_sizeof_;
24870static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24871static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024872#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024873#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024874int
24875main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024876{
Martin v. Löwis11437992002-04-12 09:54:03 +000024877
24878 FILE *f = fopen ("conftest.val", "w");
24879 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024880 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024881 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024882 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024883 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024884 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024885 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024886 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024887 }
24888 else
24889 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024890 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024891 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024892 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024893 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024894 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024895 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024896
24897 ;
24898 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024899}
Martin v. Löwis11437992002-04-12 09:54:03 +000024900_ACEOF
24901rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024902if { (ac_try="$ac_link"
24903case "(($ac_try" in
24904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24905 *) ac_try_echo=$ac_try;;
24906esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024908 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024909 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024911 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024912 { (case "(($ac_try" in
24913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24914 *) ac_try_echo=$ac_try;;
24915esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024917 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024918 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024920 (exit $ac_status); }; }; then
24921 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024922else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024923 echo "$as_me: program exited with status $ac_status" >&5
24924echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024925sed 's/^/| /' conftest.$ac_ext >&5
24926
Martin v. Löwis11437992002-04-12 09:54:03 +000024927( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024928if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024929 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024930See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024931echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024932See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024933 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024934 else
24935 ac_cv_sizeof_wchar_t=0
24936 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024938rm -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 +000024939fi
24940rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024941fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024942{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24943echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024944
24945
24946
Martin v. Löwis11437992002-04-12 09:54:03 +000024947cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024948#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024949_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024950
Michael W. Hudson54241132001-12-07 15:38:26 +000024951
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024952fi
24953
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024954{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24955echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024956have_ucs4_tcl=no
24957cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024958/* confdefs.h. */
24959_ACEOF
24960cat confdefs.h >>conftest.$ac_ext
24961cat >>conftest.$ac_ext <<_ACEOF
24962/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024963
24964#include <tcl.h>
24965#if TCL_UTF_MAX != 6
24966# error "NOT UCS4_TCL"
24967#endif
24968int
24969main ()
24970{
24971
24972 ;
24973 return 0;
24974}
24975_ACEOF
24976rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024977if { (ac_try="$ac_compile"
24978case "(($ac_try" in
24979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24980 *) ac_try_echo=$ac_try;;
24981esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024983 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024985 grep -v '^ *+' conftest.er1 >conftest.err
24986 rm -f conftest.er1
24987 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024989 (exit $ac_status); } && {
24990 test -z "$ac_c_werror_flag" ||
24991 test ! -s conftest.err
24992 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024993
24994
24995cat >>confdefs.h <<\_ACEOF
24996#define HAVE_UCS4_TCL 1
24997_ACEOF
24998
24999 have_ucs4_tcl=yes
25000
25001else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025003sed 's/^/| /' conftest.$ac_ext >&5
25004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025005
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025007
25008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025009{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
25010echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025011
Skip Montanaro6dead952003-09-25 14:50:04 +000025012# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025013if test "$wchar_h" = yes
25014then
25015 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025016 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
25017echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025018 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025019 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025020else
25021
25022 if test "$cross_compiling" = yes; then
25023 ac_cv_wchar_t_signed=yes
25024else
25025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025026/* confdefs.h. */
25027_ACEOF
25028cat confdefs.h >>conftest.$ac_ext
25029cat >>conftest.$ac_ext <<_ACEOF
25030/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025031
25032 #include <wchar.h>
25033 int main()
25034 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000025035 /* Success: exit code 0 */
25036 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025037 }
25038
25039_ACEOF
25040rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025041if { (ac_try="$ac_link"
25042case "(($ac_try" in
25043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25044 *) ac_try_echo=$ac_try;;
25045esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025047 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025048 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025050 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025051 { (case "(($ac_try" in
25052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25053 *) ac_try_echo=$ac_try;;
25054esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025056 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025057 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025059 (exit $ac_status); }; }; then
25060 ac_cv_wchar_t_signed=yes
25061else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025062 echo "$as_me: program exited with status $ac_status" >&5
25063echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025064sed 's/^/| /' conftest.$ac_ext >&5
25065
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025066( exit $ac_status )
25067ac_cv_wchar_t_signed=no
25068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025069rm -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 +000025070fi
25071
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025072
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025073fi
25074
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025075 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25076echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025077fi
25078
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025079{ echo "$as_me:$LINENO: checking what type to use for str" >&5
25080echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000025081
25082# Check whether --with-wide-unicode was given.
25083if test "${with_wide_unicode+set}" = set; then
25084 withval=$with_wide_unicode;
25085if test "$withval" != no
25086then unicode_size="4"
25087else unicode_size="2"
25088fi
25089
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025090else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025091
Georg Brandl52d168a2008-01-07 18:10:24 +000025092case "$have_ucs4_tcl" in
25093 yes) unicode_size="4" ;;
25094 *) unicode_size="2" ;;
25095esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025096
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025097fi
25098
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025099
25100
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025101
Georg Brandl52d168a2008-01-07 18:10:24 +000025102case "$unicode_size" in
25103 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025104#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025105_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000025106 ;;
25107 *) cat >>confdefs.h <<\_ACEOF
25108#define Py_UNICODE_SIZE 2
25109_ACEOF
25110 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025111esac
25112
Michael W. Hudson54241132001-12-07 15:38:26 +000025113
Martin v. Löwis11437992002-04-12 09:54:03 +000025114
25115
Georg Brandl52d168a2008-01-07 18:10:24 +000025116# wchar_t is only usable if it maps to an unsigned type
25117if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025118 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000025119then
25120 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025121
Martin v. Löwis11437992002-04-12 09:54:03 +000025122cat >>confdefs.h <<\_ACEOF
25123#define HAVE_USABLE_WCHAR_T 1
25124_ACEOF
25125
Georg Brandl52d168a2008-01-07 18:10:24 +000025126 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025127#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025128_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025129
Georg Brandl52d168a2008-01-07 18:10:24 +000025130elif test "$ac_cv_sizeof_short" = "$unicode_size"
25131then
25132 PY_UNICODE_TYPE="unsigned short"
25133 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025134#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025135_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025136
Georg Brandl52d168a2008-01-07 18:10:24 +000025137elif test "$ac_cv_sizeof_long" = "$unicode_size"
25138then
25139 PY_UNICODE_TYPE="unsigned long"
25140 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025141#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025142_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025143
Georg Brandl52d168a2008-01-07 18:10:24 +000025144else
25145 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025146fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025147{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25148echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000025149
25150# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025151{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25152echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025153if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025154 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025155else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025156 # See if sys/param.h defines the BYTE_ORDER macro.
25157cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025158/* confdefs.h. */
25159_ACEOF
25160cat confdefs.h >>conftest.$ac_ext
25161cat >>conftest.$ac_ext <<_ACEOF
25162/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025163#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025164#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025165
Martin v. Löwis11437992002-04-12 09:54:03 +000025166int
25167main ()
25168{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025169#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25170 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25171 bogus endian macros
25172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025173
25174 ;
25175 return 0;
25176}
25177_ACEOF
25178rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025179if { (ac_try="$ac_compile"
25180case "(($ac_try" in
25181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25182 *) ac_try_echo=$ac_try;;
25183esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025185 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025186 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025187 grep -v '^ *+' conftest.er1 >conftest.err
25188 rm -f conftest.er1
25189 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025191 (exit $ac_status); } && {
25192 test -z "$ac_c_werror_flag" ||
25193 test ! -s conftest.err
25194 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025195 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025196cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025197/* confdefs.h. */
25198_ACEOF
25199cat confdefs.h >>conftest.$ac_ext
25200cat >>conftest.$ac_ext <<_ACEOF
25201/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025202#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025203#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025204
Martin v. Löwis11437992002-04-12 09:54:03 +000025205int
25206main ()
25207{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025208#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025209 not big endian
25210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025211
25212 ;
25213 return 0;
25214}
25215_ACEOF
25216rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025217if { (ac_try="$ac_compile"
25218case "(($ac_try" in
25219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25220 *) ac_try_echo=$ac_try;;
25221esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025223 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025224 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025225 grep -v '^ *+' conftest.er1 >conftest.err
25226 rm -f conftest.er1
25227 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025229 (exit $ac_status); } && {
25230 test -z "$ac_c_werror_flag" ||
25231 test ! -s conftest.err
25232 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025233 ac_cv_c_bigendian=yes
25234else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025235 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025236sed 's/^/| /' conftest.$ac_ext >&5
25237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025238 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025240
25241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025242else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025244sed 's/^/| /' conftest.$ac_ext >&5
25245
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025246 # It does not; compile a test program.
25247if test "$cross_compiling" = yes; then
25248 # try to guess the endianness by grepping values into an object file
25249 ac_cv_c_bigendian=unknown
25250 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025251/* confdefs.h. */
25252_ACEOF
25253cat confdefs.h >>conftest.$ac_ext
25254cat >>conftest.$ac_ext <<_ACEOF
25255/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025256short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25257short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25258void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25259short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25260short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25261void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025262int
25263main ()
25264{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025265 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025266 ;
25267 return 0;
25268}
25269_ACEOF
25270rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025271if { (ac_try="$ac_compile"
25272case "(($ac_try" in
25273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25274 *) ac_try_echo=$ac_try;;
25275esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025277 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025279 grep -v '^ *+' conftest.er1 >conftest.err
25280 rm -f conftest.er1
25281 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025283 (exit $ac_status); } && {
25284 test -z "$ac_c_werror_flag" ||
25285 test ! -s conftest.err
25286 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025287 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025288 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025289fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025290if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25291 if test "$ac_cv_c_bigendian" = unknown; then
25292 ac_cv_c_bigendian=no
25293 else
25294 # finding both strings is unlikely to happen, but who knows?
25295 ac_cv_c_bigendian=unknown
25296 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025297fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025298else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025300sed 's/^/| /' conftest.$ac_ext >&5
25301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025302
Martin v. Löwis11437992002-04-12 09:54:03 +000025303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025304
25305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025306else
25307 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025308/* confdefs.h. */
25309_ACEOF
25310cat confdefs.h >>conftest.$ac_ext
25311cat >>conftest.$ac_ext <<_ACEOF
25312/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025313$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025314int
25315main ()
25316{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025317
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025318 /* Are we little or big endian? From Harbison&Steele. */
25319 union
25320 {
25321 long int l;
25322 char c[sizeof (long int)];
25323 } u;
25324 u.l = 1;
25325 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025326
25327 ;
25328 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025329}
Martin v. Löwis11437992002-04-12 09:54:03 +000025330_ACEOF
25331rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025332if { (ac_try="$ac_link"
25333case "(($ac_try" in
25334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25335 *) ac_try_echo=$ac_try;;
25336esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025338 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025339 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025341 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025342 { (case "(($ac_try" in
25343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25344 *) ac_try_echo=$ac_try;;
25345esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025347 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025348 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025350 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025351 ac_cv_c_bigendian=no
25352else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025353 echo "$as_me: program exited with status $ac_status" >&5
25354echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025355sed 's/^/| /' conftest.$ac_ext >&5
25356
Martin v. Löwis11437992002-04-12 09:54:03 +000025357( exit $ac_status )
25358ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025360rm -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 +000025361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025362
25363
Martin v. Löwis11437992002-04-12 09:54:03 +000025364fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025365
25366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25367fi
25368{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25369echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25370case $ac_cv_c_bigendian in
25371 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025372
25373cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025374#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025375_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025376 ;;
25377 no)
25378 ;;
25379 *)
25380 { { echo "$as_me:$LINENO: error: unknown endianness
25381presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25382echo "$as_me: error: unknown endianness
25383presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025384 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025385esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025386
Michael W. Hudson54241132001-12-07 15:38:26 +000025387
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025388# Check whether right shifting a negative integer extends the sign bit
25389# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025390{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25391echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025392if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025393 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025394else
Martin v. Löwis11437992002-04-12 09:54:03 +000025395
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025396if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025397 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025398else
Martin v. Löwis11437992002-04-12 09:54:03 +000025399 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025400/* confdefs.h. */
25401_ACEOF
25402cat confdefs.h >>conftest.$ac_ext
25403cat >>conftest.$ac_ext <<_ACEOF
25404/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025405
25406int main()
25407{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025408 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025409}
25410
Martin v. Löwis11437992002-04-12 09:54:03 +000025411_ACEOF
25412rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025413if { (ac_try="$ac_link"
25414case "(($ac_try" in
25415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25416 *) ac_try_echo=$ac_try;;
25417esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025419 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025420 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025422 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025423 { (case "(($ac_try" in
25424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25425 *) ac_try_echo=$ac_try;;
25426esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025428 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025429 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025431 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025432 ac_cv_rshift_extends_sign=yes
25433else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025434 echo "$as_me: program exited with status $ac_status" >&5
25435echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025436sed 's/^/| /' conftest.$ac_ext >&5
25437
Martin v. Löwis11437992002-04-12 09:54:03 +000025438( exit $ac_status )
25439ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025441rm -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 +000025442fi
25443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025444
25445fi
25446
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025447{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25448echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025449if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025450then
Martin v. Löwis11437992002-04-12 09:54:03 +000025451
25452cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025453#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025454_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025455
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025456fi
25457
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025458# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025459{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25460echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025461if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025462 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025463else
Martin v. Löwis11437992002-04-12 09:54:03 +000025464
25465cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025466/* confdefs.h. */
25467_ACEOF
25468cat confdefs.h >>conftest.$ac_ext
25469cat >>conftest.$ac_ext <<_ACEOF
25470/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025471#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025472int
25473main ()
25474{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025475
25476 FILE *f = fopen("/dev/null", "r");
25477 flockfile(f);
25478 getc_unlocked(f);
25479 funlockfile(f);
25480
Martin v. Löwis11437992002-04-12 09:54:03 +000025481 ;
25482 return 0;
25483}
25484_ACEOF
25485rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025486if { (ac_try="$ac_link"
25487case "(($ac_try" in
25488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25489 *) ac_try_echo=$ac_try;;
25490esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025492 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025493 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025494 grep -v '^ *+' conftest.er1 >conftest.err
25495 rm -f conftest.er1
25496 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025498 (exit $ac_status); } && {
25499 test -z "$ac_c_werror_flag" ||
25500 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025501 } && test -s conftest$ac_exeext &&
25502 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025503 ac_cv_have_getc_unlocked=yes
25504else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025506sed 's/^/| /' conftest.$ac_ext >&5
25507
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025508 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025510
25511rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025512 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025513fi
25514
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025515{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25516echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025517if test "$ac_cv_have_getc_unlocked" = yes
25518then
Martin v. Löwis11437992002-04-12 09:54:03 +000025519
25520cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025521#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025522_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025523
25524fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025525
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025526# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025527# save the value of LIBS so we don't actually link Python with readline
25528LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025529
Gregory P. Smith18820942008-09-07 06:24:49 +000025530# On some systems we need to link readline to a termcap compatible
25531# library. NOTE: Keep the precedence of listed libraries synchronised
25532# with setup.py.
25533py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025534{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25535echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025536for py_libtermcap in "" ncursesw ncurses curses termcap; do
25537 if test -z "$py_libtermcap"; then
25538 READLINE_LIBS="-lreadline"
25539 else
25540 READLINE_LIBS="-lreadline -l$py_libtermcap"
25541 fi
25542 LIBS="$READLINE_LIBS $LIBS_no_readline"
25543 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025544/* confdefs.h. */
25545_ACEOF
25546cat confdefs.h >>conftest.$ac_ext
25547cat >>conftest.$ac_ext <<_ACEOF
25548/* end confdefs.h. */
25549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025550/* Override any GCC internal prototype to avoid an error.
25551 Use char because int might match the return type of a GCC
25552 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025553#ifdef __cplusplus
25554extern "C"
25555#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025556char readline ();
25557int
25558main ()
25559{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025560return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025561 ;
25562 return 0;
25563}
25564_ACEOF
25565rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025566if { (ac_try="$ac_link"
25567case "(($ac_try" in
25568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25569 *) ac_try_echo=$ac_try;;
25570esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025572 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025573 ac_status=$?
25574 grep -v '^ *+' conftest.er1 >conftest.err
25575 rm -f conftest.er1
25576 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025578 (exit $ac_status); } && {
25579 test -z "$ac_c_werror_flag" ||
25580 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025581 } && test -s conftest$ac_exeext &&
25582 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025583 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025584else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025585 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025586sed 's/^/| /' conftest.$ac_ext >&5
25587
Gregory P. Smith18820942008-09-07 06:24:49 +000025588
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025590
25591rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025592 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025593 if test $py_cv_lib_readline = yes; then
25594 break
25595 fi
25596done
25597# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25598#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025599if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025600 { echo "$as_me:$LINENO: result: none" >&5
25601echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025602else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025603 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25604echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025605
25606cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025607#define HAVE_LIBREADLINE 1
25608_ACEOF
25609
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025610fi
25611
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025612# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025613{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25614echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025615if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025616 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025617else
25618 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025619LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025620cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025621/* confdefs.h. */
25622_ACEOF
25623cat confdefs.h >>conftest.$ac_ext
25624cat >>conftest.$ac_ext <<_ACEOF
25625/* end confdefs.h. */
25626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025627/* Override any GCC internal prototype to avoid an error.
25628 Use char because int might match the return type of a GCC
25629 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025630#ifdef __cplusplus
25631extern "C"
25632#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025633char rl_callback_handler_install ();
25634int
25635main ()
25636{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025637return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025638 ;
25639 return 0;
25640}
25641_ACEOF
25642rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025643if { (ac_try="$ac_link"
25644case "(($ac_try" in
25645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25646 *) ac_try_echo=$ac_try;;
25647esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025649 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025651 grep -v '^ *+' conftest.er1 >conftest.err
25652 rm -f conftest.er1
25653 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025655 (exit $ac_status); } && {
25656 test -z "$ac_c_werror_flag" ||
25657 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025658 } && test -s conftest$ac_exeext &&
25659 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025660 ac_cv_lib_readline_rl_callback_handler_install=yes
25661else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025662 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025663sed 's/^/| /' conftest.$ac_ext >&5
25664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025665 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025667
25668rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025669 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025670LIBS=$ac_check_lib_save_LIBS
25671fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025672{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25673echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25674if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025675
25676cat >>confdefs.h <<\_ACEOF
25677#define HAVE_RL_CALLBACK 1
25678_ACEOF
25679
25680fi
25681
25682
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025683# check for readline 2.2
25684cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025685/* confdefs.h. */
25686_ACEOF
25687cat confdefs.h >>conftest.$ac_ext
25688cat >>conftest.$ac_ext <<_ACEOF
25689/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025690#include <readline/readline.h>
25691_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025692if { (ac_try="$ac_cpp conftest.$ac_ext"
25693case "(($ac_try" in
25694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25695 *) ac_try_echo=$ac_try;;
25696esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025698 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025699 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025700 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025701 rm -f conftest.er1
25702 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025704 (exit $ac_status); } >/dev/null && {
25705 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25706 test ! -s conftest.err
25707 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025708 have_readline=yes
25709else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025711sed 's/^/| /' conftest.$ac_ext >&5
25712
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025713 have_readline=no
25714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025715
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025716rm -f conftest.err conftest.$ac_ext
25717if test $have_readline = yes
25718then
25719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025720/* confdefs.h. */
25721_ACEOF
25722cat confdefs.h >>conftest.$ac_ext
25723cat >>conftest.$ac_ext <<_ACEOF
25724/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025725#include <readline/readline.h>
25726
25727_ACEOF
25728if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025729 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025730
25731cat >>confdefs.h <<\_ACEOF
25732#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25733_ACEOF
25734
25735fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000025736rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025737
Antoine Pitroud5131772009-10-26 19:22:14 +000025738 cat >conftest.$ac_ext <<_ACEOF
25739/* confdefs.h. */
25740_ACEOF
25741cat confdefs.h >>conftest.$ac_ext
25742cat >>conftest.$ac_ext <<_ACEOF
25743/* end confdefs.h. */
25744#include <readline/readline.h>
25745
25746_ACEOF
25747if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25748 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25749
25750cat >>confdefs.h <<\_ACEOF
25751#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25752_ACEOF
25753
25754fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000025755rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000025756
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025757fi
25758
Martin v. Löwis0daad592001-09-30 21:09:59 +000025759# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025760{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25761echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025762if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025763 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025764else
Martin v. Löwis11437992002-04-12 09:54:03 +000025765 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025766LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025767cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025768/* confdefs.h. */
25769_ACEOF
25770cat confdefs.h >>conftest.$ac_ext
25771cat >>conftest.$ac_ext <<_ACEOF
25772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025774/* Override any GCC internal prototype to avoid an error.
25775 Use char because int might match the return type of a GCC
25776 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025777#ifdef __cplusplus
25778extern "C"
25779#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025780char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025781int
25782main ()
25783{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025784return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025785 ;
25786 return 0;
25787}
25788_ACEOF
25789rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025790if { (ac_try="$ac_link"
25791case "(($ac_try" in
25792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25793 *) ac_try_echo=$ac_try;;
25794esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025796 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025797 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025798 grep -v '^ *+' conftest.er1 >conftest.err
25799 rm -f conftest.er1
25800 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025802 (exit $ac_status); } && {
25803 test -z "$ac_c_werror_flag" ||
25804 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025805 } && test -s conftest$ac_exeext &&
25806 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025807 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025808else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025810sed 's/^/| /' conftest.$ac_ext >&5
25811
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025812 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025814
25815rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025816 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025817LIBS=$ac_check_lib_save_LIBS
25818fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025819{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25820echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25821if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025822
Martin v. Löwis11437992002-04-12 09:54:03 +000025823cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025824#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025825_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025826
Martin v. Löwis0daad592001-09-30 21:09:59 +000025827fi
25828
Michael W. Hudson54241132001-12-07 15:38:26 +000025829
Thomas Wouters89d996e2007-09-08 17:39:28 +000025830# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025831{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25832echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025833if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025834 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025835else
25836 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025837LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025838cat >conftest.$ac_ext <<_ACEOF
25839/* confdefs.h. */
25840_ACEOF
25841cat confdefs.h >>conftest.$ac_ext
25842cat >>conftest.$ac_ext <<_ACEOF
25843/* end confdefs.h. */
25844
25845/* Override any GCC internal prototype to avoid an error.
25846 Use char because int might match the return type of a GCC
25847 builtin and then its argument prototype would still apply. */
25848#ifdef __cplusplus
25849extern "C"
25850#endif
25851char rl_completion_display_matches_hook ();
25852int
25853main ()
25854{
25855return rl_completion_display_matches_hook ();
25856 ;
25857 return 0;
25858}
25859_ACEOF
25860rm -f conftest.$ac_objext conftest$ac_exeext
25861if { (ac_try="$ac_link"
25862case "(($ac_try" in
25863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25864 *) ac_try_echo=$ac_try;;
25865esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025867 (eval "$ac_link") 2>conftest.er1
25868 ac_status=$?
25869 grep -v '^ *+' conftest.er1 >conftest.err
25870 rm -f conftest.er1
25871 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025873 (exit $ac_status); } && {
25874 test -z "$ac_c_werror_flag" ||
25875 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025876 } && test -s conftest$ac_exeext &&
25877 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025878 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25879else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025880 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025881sed 's/^/| /' conftest.$ac_ext >&5
25882
25883 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25884fi
25885
25886rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25887 conftest$ac_exeext conftest.$ac_ext
25888LIBS=$ac_check_lib_save_LIBS
25889fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025890{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25891echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25892if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025893
25894cat >>confdefs.h <<\_ACEOF
25895#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25896_ACEOF
25897
25898fi
25899
25900
Martin v. Löwis0daad592001-09-30 21:09:59 +000025901# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025902{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25903echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025904if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025905 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025906else
Martin v. Löwis11437992002-04-12 09:54:03 +000025907 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025908LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025909cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025910/* confdefs.h. */
25911_ACEOF
25912cat confdefs.h >>conftest.$ac_ext
25913cat >>conftest.$ac_ext <<_ACEOF
25914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025916/* Override any GCC internal prototype to avoid an error.
25917 Use char because int might match the return type of a GCC
25918 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025919#ifdef __cplusplus
25920extern "C"
25921#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025922char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025923int
25924main ()
25925{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025926return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025927 ;
25928 return 0;
25929}
25930_ACEOF
25931rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025932if { (ac_try="$ac_link"
25933case "(($ac_try" in
25934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25935 *) ac_try_echo=$ac_try;;
25936esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025938 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025939 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025940 grep -v '^ *+' conftest.er1 >conftest.err
25941 rm -f conftest.er1
25942 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025944 (exit $ac_status); } && {
25945 test -z "$ac_c_werror_flag" ||
25946 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025947 } && test -s conftest$ac_exeext &&
25948 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025949 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025950else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025952sed 's/^/| /' conftest.$ac_ext >&5
25953
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025954 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025956
25957rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025958 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025959LIBS=$ac_check_lib_save_LIBS
25960fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025961{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25962echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25963if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025964
Martin v. Löwis11437992002-04-12 09:54:03 +000025965cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025966#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025967_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025968
Guido van Rossum353ae582001-07-10 16:45:32 +000025969fi
25970
Jack Jansendd19cf82001-12-06 22:36:17 +000025971
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025972# also in readline 4.2
25973cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025974/* confdefs.h. */
25975_ACEOF
25976cat confdefs.h >>conftest.$ac_ext
25977cat >>conftest.$ac_ext <<_ACEOF
25978/* end confdefs.h. */
25979#include <readline/readline.h>
25980_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025981if { (ac_try="$ac_cpp conftest.$ac_ext"
25982case "(($ac_try" in
25983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25984 *) ac_try_echo=$ac_try;;
25985esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025987 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025988 ac_status=$?
25989 grep -v '^ *+' conftest.er1 >conftest.err
25990 rm -f conftest.er1
25991 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025993 (exit $ac_status); } >/dev/null && {
25994 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25995 test ! -s conftest.err
25996 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025997 have_readline=yes
25998else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025999 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026000sed 's/^/| /' conftest.$ac_ext >&5
26001
26002 have_readline=no
26003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026004
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026005rm -f conftest.err conftest.$ac_ext
26006if test $have_readline = yes
26007then
26008 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026009/* confdefs.h. */
26010_ACEOF
26011cat confdefs.h >>conftest.$ac_ext
26012cat >>conftest.$ac_ext <<_ACEOF
26013/* end confdefs.h. */
26014#include <readline/readline.h>
26015
26016_ACEOF
26017if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26018 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26019
26020cat >>confdefs.h <<\_ACEOF
26021#define HAVE_RL_CATCH_SIGNAL 1
26022_ACEOF
26023
26024fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000026025rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026026
26027fi
26028
Martin v. Löwis82bca632006-02-10 20:49:30 +000026029# End of readline checks: restore LIBS
26030LIBS=$LIBS_no_readline
26031
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026032{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26033echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026034if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026035 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026036else
Martin v. Löwis11437992002-04-12 09:54:03 +000026037
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026038if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026039 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026040else
Martin v. Löwis11437992002-04-12 09:54:03 +000026041 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026042/* confdefs.h. */
26043_ACEOF
26044cat confdefs.h >>conftest.$ac_ext
26045cat >>conftest.$ac_ext <<_ACEOF
26046/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026047
26048int main()
26049{
26050 int val1 = nice(1);
26051 if (val1 != -1 && val1 == nice(2))
26052 exit(0);
26053 exit(1);
26054}
26055
Martin v. Löwis11437992002-04-12 09:54:03 +000026056_ACEOF
26057rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026058if { (ac_try="$ac_link"
26059case "(($ac_try" in
26060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26061 *) ac_try_echo=$ac_try;;
26062esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026064 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026065 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026067 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026068 { (case "(($ac_try" in
26069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26070 *) ac_try_echo=$ac_try;;
26071esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026073 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026074 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026076 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026077 ac_cv_broken_nice=yes
26078else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026079 echo "$as_me: program exited with status $ac_status" >&5
26080echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026081sed 's/^/| /' conftest.$ac_ext >&5
26082
Martin v. Löwis11437992002-04-12 09:54:03 +000026083( exit $ac_status )
26084ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026086rm -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 +000026087fi
26088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026089
26090fi
26091
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026092{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26093echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026094if test "$ac_cv_broken_nice" = yes
26095then
Martin v. Löwis11437992002-04-12 09:54:03 +000026096
26097cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026098#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026099_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026100
26101fi
26102
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026103{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26104echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026105if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026106 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026107else
26108 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026109 ac_cv_broken_poll=no
26110else
26111 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026112/* confdefs.h. */
26113_ACEOF
26114cat confdefs.h >>conftest.$ac_ext
26115cat >>conftest.$ac_ext <<_ACEOF
26116/* end confdefs.h. */
26117
26118#include <poll.h>
26119
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026120int main()
26121{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026122 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026123 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026124
26125 close (42);
26126
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026127 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026128 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026129 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026130 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026131 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026132 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026133 return 1;
26134}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026135
26136_ACEOF
26137rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026138if { (ac_try="$ac_link"
26139case "(($ac_try" in
26140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26141 *) ac_try_echo=$ac_try;;
26142esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026144 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026145 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026147 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026148 { (case "(($ac_try" in
26149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26150 *) ac_try_echo=$ac_try;;
26151esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026153 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026154 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026156 (exit $ac_status); }; }; then
26157 ac_cv_broken_poll=yes
26158else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026159 echo "$as_me: program exited with status $ac_status" >&5
26160echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026161sed 's/^/| /' conftest.$ac_ext >&5
26162
26163( exit $ac_status )
26164ac_cv_broken_poll=no
26165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026166rm -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 +000026167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026168
26169
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026170fi
26171
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026172{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26173echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026174if test "$ac_cv_broken_poll" = yes
26175then
26176
26177cat >>confdefs.h <<\_ACEOF
26178#define HAVE_BROKEN_POLL 1
26179_ACEOF
26180
26181fi
26182
Brett Cannon43802422005-02-10 20:48:03 +000026183# 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 +000026184# (which is not required by ISO C or UNIX spec) and/or if we support
26185# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026186{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26187echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026188if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026189 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026190else
26191 cat >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 <sys/types.h>
26198#include <$ac_cv_struct_tm>
26199
26200
26201int
26202main ()
26203{
26204static struct tm ac_aggr;
26205if (ac_aggr.tm_zone)
26206return 0;
26207 ;
26208 return 0;
26209}
26210_ACEOF
26211rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026212if { (ac_try="$ac_compile"
26213case "(($ac_try" in
26214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26215 *) ac_try_echo=$ac_try;;
26216esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026218 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026219 ac_status=$?
26220 grep -v '^ *+' conftest.er1 >conftest.err
26221 rm -f conftest.er1
26222 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026224 (exit $ac_status); } && {
26225 test -z "$ac_c_werror_flag" ||
26226 test ! -s conftest.err
26227 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026228 ac_cv_member_struct_tm_tm_zone=yes
26229else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026230 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026231sed 's/^/| /' conftest.$ac_ext >&5
26232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026233 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026234/* confdefs.h. */
26235_ACEOF
26236cat confdefs.h >>conftest.$ac_ext
26237cat >>conftest.$ac_ext <<_ACEOF
26238/* end confdefs.h. */
26239#include <sys/types.h>
26240#include <$ac_cv_struct_tm>
26241
26242
26243int
26244main ()
26245{
26246static struct tm ac_aggr;
26247if (sizeof ac_aggr.tm_zone)
26248return 0;
26249 ;
26250 return 0;
26251}
26252_ACEOF
26253rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026254if { (ac_try="$ac_compile"
26255case "(($ac_try" in
26256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26257 *) ac_try_echo=$ac_try;;
26258esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026260 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026261 ac_status=$?
26262 grep -v '^ *+' conftest.er1 >conftest.err
26263 rm -f conftest.er1
26264 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026266 (exit $ac_status); } && {
26267 test -z "$ac_c_werror_flag" ||
26268 test ! -s conftest.err
26269 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026270 ac_cv_member_struct_tm_tm_zone=yes
26271else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026272 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026273sed 's/^/| /' conftest.$ac_ext >&5
26274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026275 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026277
26278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026280
26281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026282fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026283{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26284echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26285if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026286
26287cat >>confdefs.h <<_ACEOF
26288#define HAVE_STRUCT_TM_TM_ZONE 1
26289_ACEOF
26290
26291
26292fi
26293
26294if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26295
26296cat >>confdefs.h <<\_ACEOF
26297#define HAVE_TM_ZONE 1
26298_ACEOF
26299
26300else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026301 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26302echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026303if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026304 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026305else
26306 cat >conftest.$ac_ext <<_ACEOF
26307/* confdefs.h. */
26308_ACEOF
26309cat confdefs.h >>conftest.$ac_ext
26310cat >>conftest.$ac_ext <<_ACEOF
26311/* end confdefs.h. */
26312#include <time.h>
26313
26314int
26315main ()
26316{
26317#ifndef tzname
26318 (void) tzname;
26319#endif
26320
26321 ;
26322 return 0;
26323}
26324_ACEOF
26325rm -f conftest.$ac_objext
26326if { (ac_try="$ac_compile"
26327case "(($ac_try" in
26328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26329 *) ac_try_echo=$ac_try;;
26330esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026332 (eval "$ac_compile") 2>conftest.er1
26333 ac_status=$?
26334 grep -v '^ *+' conftest.er1 >conftest.err
26335 rm -f conftest.er1
26336 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026338 (exit $ac_status); } && {
26339 test -z "$ac_c_werror_flag" ||
26340 test ! -s conftest.err
26341 } && test -s conftest.$ac_objext; then
26342 ac_cv_have_decl_tzname=yes
26343else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026344 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026345sed 's/^/| /' conftest.$ac_ext >&5
26346
26347 ac_cv_have_decl_tzname=no
26348fi
26349
26350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26351fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026352{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26353echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26354if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026355
26356cat >>confdefs.h <<_ACEOF
26357#define HAVE_DECL_TZNAME 1
26358_ACEOF
26359
26360
26361else
26362 cat >>confdefs.h <<_ACEOF
26363#define HAVE_DECL_TZNAME 0
26364_ACEOF
26365
26366
26367fi
26368
26369
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026370 { echo "$as_me:$LINENO: checking for tzname" >&5
26371echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026372if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026373 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026374else
26375 cat >conftest.$ac_ext <<_ACEOF
26376/* confdefs.h. */
26377_ACEOF
26378cat confdefs.h >>conftest.$ac_ext
26379cat >>conftest.$ac_ext <<_ACEOF
26380/* end confdefs.h. */
26381#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026382#if !HAVE_DECL_TZNAME
26383extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026384#endif
26385
26386int
26387main ()
26388{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026389return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026390 ;
26391 return 0;
26392}
26393_ACEOF
26394rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026395if { (ac_try="$ac_link"
26396case "(($ac_try" in
26397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26398 *) ac_try_echo=$ac_try;;
26399esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026401 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026402 ac_status=$?
26403 grep -v '^ *+' conftest.er1 >conftest.err
26404 rm -f conftest.er1
26405 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026407 (exit $ac_status); } && {
26408 test -z "$ac_c_werror_flag" ||
26409 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026410 } && test -s conftest$ac_exeext &&
26411 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026412 ac_cv_var_tzname=yes
26413else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026414 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026415sed 's/^/| /' conftest.$ac_ext >&5
26416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026417 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026419
26420rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026421 conftest$ac_exeext conftest.$ac_ext
26422fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026423{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26424echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026425 if test $ac_cv_var_tzname = yes; then
26426
26427cat >>confdefs.h <<\_ACEOF
26428#define HAVE_TZNAME 1
26429_ACEOF
26430
26431 fi
26432fi
26433
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026434
Martin v. Löwis1d459062005-03-14 21:23:33 +000026435# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026436{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26437echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026438if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026439 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026440else
26441
26442if test "$cross_compiling" = yes; then
26443 ac_cv_working_tzset=no
26444else
26445 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026446/* confdefs.h. */
26447_ACEOF
26448cat confdefs.h >>conftest.$ac_ext
26449cat >>conftest.$ac_ext <<_ACEOF
26450/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026451
26452#include <stdlib.h>
26453#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026454#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026455
26456#if HAVE_TZNAME
26457extern char *tzname[];
26458#endif
26459
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026460int main()
26461{
Brett Cannon18367812003-09-19 00:59:16 +000026462 /* Note that we need to ensure that not only does tzset(3)
26463 do 'something' with localtime, but it works as documented
26464 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026465 This includes making sure that tzname is set properly if
26466 tm->tm_zone does not exist since it is the alternative way
26467 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026468
26469 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026470 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026471 */
26472
Martin v. Löwis1d459062005-03-14 21:23:33 +000026473 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026474 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26475
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026476 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026477 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026478 if (localtime(&groundhogday)->tm_hour != 0)
26479 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026480#if HAVE_TZNAME
26481 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26482 if (strcmp(tzname[0], "UTC") ||
26483 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26484 exit(1);
26485#endif
Brett Cannon18367812003-09-19 00:59:16 +000026486
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026487 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026488 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026489 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026490 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026491#if HAVE_TZNAME
26492 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26493 exit(1);
26494#endif
Brett Cannon18367812003-09-19 00:59:16 +000026495
26496 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26497 tzset();
26498 if (localtime(&groundhogday)->tm_hour != 11)
26499 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026500#if HAVE_TZNAME
26501 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26502 exit(1);
26503#endif
26504
26505#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026506 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26507 exit(1);
26508 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26509 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026510#endif
Brett Cannon18367812003-09-19 00:59:16 +000026511
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026512 exit(0);
26513}
26514
26515_ACEOF
26516rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026517if { (ac_try="$ac_link"
26518case "(($ac_try" in
26519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26520 *) ac_try_echo=$ac_try;;
26521esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026523 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026524 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026526 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026527 { (case "(($ac_try" in
26528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26529 *) ac_try_echo=$ac_try;;
26530esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026532 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026533 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026535 (exit $ac_status); }; }; then
26536 ac_cv_working_tzset=yes
26537else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026538 echo "$as_me: program exited with status $ac_status" >&5
26539echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026540sed 's/^/| /' conftest.$ac_ext >&5
26541
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026542( exit $ac_status )
26543ac_cv_working_tzset=no
26544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026545rm -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 +000026546fi
26547
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026548
26549fi
26550
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026551{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26552echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026553if test "$ac_cv_working_tzset" = yes
26554then
26555
26556cat >>confdefs.h <<\_ACEOF
26557#define HAVE_WORKING_TZSET 1
26558_ACEOF
26559
26560fi
26561
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026562# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026563{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26564echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026565if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026566 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026567else
26568 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026569/* confdefs.h. */
26570_ACEOF
26571cat confdefs.h >>conftest.$ac_ext
26572cat >>conftest.$ac_ext <<_ACEOF
26573/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026574#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026575int
26576main ()
26577{
26578
26579struct stat st;
26580st.st_mtim.tv_nsec = 1;
26581
26582 ;
26583 return 0;
26584}
26585_ACEOF
26586rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026587if { (ac_try="$ac_compile"
26588case "(($ac_try" in
26589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26590 *) ac_try_echo=$ac_try;;
26591esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026593 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026594 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026595 grep -v '^ *+' conftest.er1 >conftest.err
26596 rm -f conftest.er1
26597 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026599 (exit $ac_status); } && {
26600 test -z "$ac_c_werror_flag" ||
26601 test ! -s conftest.err
26602 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026603 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026604else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026606sed 's/^/| /' conftest.$ac_ext >&5
26607
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026608 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026609fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026610
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26612fi
26613
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026614{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26615echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026616if test "$ac_cv_stat_tv_nsec" = yes
26617then
26618
26619cat >>confdefs.h <<\_ACEOF
26620#define HAVE_STAT_TV_NSEC 1
26621_ACEOF
26622
26623fi
26624
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026625# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026626{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26627echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026628if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026629 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026630else
26631 cat >conftest.$ac_ext <<_ACEOF
26632/* confdefs.h. */
26633_ACEOF
26634cat confdefs.h >>conftest.$ac_ext
26635cat >>conftest.$ac_ext <<_ACEOF
26636/* end confdefs.h. */
26637#include <sys/stat.h>
26638int
26639main ()
26640{
26641
26642struct stat st;
26643st.st_mtimespec.tv_nsec = 1;
26644
26645 ;
26646 return 0;
26647}
26648_ACEOF
26649rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026650if { (ac_try="$ac_compile"
26651case "(($ac_try" in
26652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26653 *) ac_try_echo=$ac_try;;
26654esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026656 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026657 ac_status=$?
26658 grep -v '^ *+' conftest.er1 >conftest.err
26659 rm -f conftest.er1
26660 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026662 (exit $ac_status); } && {
26663 test -z "$ac_c_werror_flag" ||
26664 test ! -s conftest.err
26665 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026666 ac_cv_stat_tv_nsec2=yes
26667else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026668 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026669sed 's/^/| /' conftest.$ac_ext >&5
26670
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026671 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026672fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026673
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26675fi
26676
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026677{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26678echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026679if test "$ac_cv_stat_tv_nsec2" = yes
26680then
26681
26682cat >>confdefs.h <<\_ACEOF
26683#define HAVE_STAT_TV_NSEC2 1
26684_ACEOF
26685
26686fi
26687
Jack Jansen666b1e72001-10-31 12:11:48 +000026688# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026689{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26690echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026691if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026692 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026693else
Martin v. Löwis11437992002-04-12 09:54:03 +000026694 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026695/* confdefs.h. */
26696_ACEOF
26697cat confdefs.h >>conftest.$ac_ext
26698cat >>conftest.$ac_ext <<_ACEOF
26699/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026700#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026701int
26702main ()
26703{
Jack Jansen666b1e72001-10-31 12:11:48 +000026704
26705 int rtn;
26706 rtn = mvwdelch(0,0,0);
26707
Martin v. Löwis11437992002-04-12 09:54:03 +000026708 ;
26709 return 0;
26710}
26711_ACEOF
26712rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026713if { (ac_try="$ac_compile"
26714case "(($ac_try" in
26715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26716 *) ac_try_echo=$ac_try;;
26717esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026719 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026720 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026721 grep -v '^ *+' conftest.er1 >conftest.err
26722 rm -f conftest.er1
26723 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026725 (exit $ac_status); } && {
26726 test -z "$ac_c_werror_flag" ||
26727 test ! -s conftest.err
26728 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026729 ac_cv_mvwdelch_is_expression=yes
26730else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026731 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026732sed 's/^/| /' conftest.$ac_ext >&5
26733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026734 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026735fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26738fi
26739
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026740{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26741echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026742
26743if test "$ac_cv_mvwdelch_is_expression" = yes
26744then
Martin v. Löwis11437992002-04-12 09:54:03 +000026745
26746cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026747#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026748_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026749
26750fi
26751
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026752{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26753echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026754if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026755 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026756else
Martin v. Löwis11437992002-04-12 09:54:03 +000026757 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026758/* confdefs.h. */
26759_ACEOF
26760cat confdefs.h >>conftest.$ac_ext
26761cat >>conftest.$ac_ext <<_ACEOF
26762/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026763#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026764int
26765main ()
26766{
Jack Jansen666b1e72001-10-31 12:11:48 +000026767
26768 WINDOW *w;
26769 w->_flags = 0;
26770
Martin v. Löwis11437992002-04-12 09:54:03 +000026771 ;
26772 return 0;
26773}
26774_ACEOF
26775rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026776if { (ac_try="$ac_compile"
26777case "(($ac_try" in
26778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26779 *) ac_try_echo=$ac_try;;
26780esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026782 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026783 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026784 grep -v '^ *+' conftest.er1 >conftest.err
26785 rm -f conftest.er1
26786 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026788 (exit $ac_status); } && {
26789 test -z "$ac_c_werror_flag" ||
26790 test ! -s conftest.err
26791 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026792 ac_cv_window_has_flags=yes
26793else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026795sed 's/^/| /' conftest.$ac_ext >&5
26796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026797 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026798fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026799
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26801fi
26802
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026803{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26804echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026805
Jack Jansen666b1e72001-10-31 12:11:48 +000026806
26807if test "$ac_cv_window_has_flags" = yes
26808then
Martin v. Löwis11437992002-04-12 09:54:03 +000026809
26810cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026811#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026812_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026813
26814fi
26815
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026816{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26817echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026818cat >conftest.$ac_ext <<_ACEOF
26819/* confdefs.h. */
26820_ACEOF
26821cat confdefs.h >>conftest.$ac_ext
26822cat >>conftest.$ac_ext <<_ACEOF
26823/* end confdefs.h. */
26824#include <curses.h>
26825int
26826main ()
26827{
26828void *x=is_term_resized
26829 ;
26830 return 0;
26831}
26832_ACEOF
26833rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026834if { (ac_try="$ac_compile"
26835case "(($ac_try" in
26836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26837 *) ac_try_echo=$ac_try;;
26838esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026840 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026841 ac_status=$?
26842 grep -v '^ *+' conftest.er1 >conftest.err
26843 rm -f conftest.er1
26844 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026846 (exit $ac_status); } && {
26847 test -z "$ac_c_werror_flag" ||
26848 test ! -s conftest.err
26849 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026850
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026851cat >>confdefs.h <<\_ACEOF
26852#define HAVE_CURSES_IS_TERM_RESIZED 1
26853_ACEOF
26854
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026855 { echo "$as_me:$LINENO: result: yes" >&5
26856echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026857else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026858 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026859sed 's/^/| /' conftest.$ac_ext >&5
26860
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026861 { echo "$as_me:$LINENO: result: no" >&5
26862echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026863
26864fi
26865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26867
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026868{ echo "$as_me:$LINENO: checking for resize_term" >&5
26869echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026870cat >conftest.$ac_ext <<_ACEOF
26871/* confdefs.h. */
26872_ACEOF
26873cat confdefs.h >>conftest.$ac_ext
26874cat >>conftest.$ac_ext <<_ACEOF
26875/* end confdefs.h. */
26876#include <curses.h>
26877int
26878main ()
26879{
26880void *x=resize_term
26881 ;
26882 return 0;
26883}
26884_ACEOF
26885rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026886if { (ac_try="$ac_compile"
26887case "(($ac_try" in
26888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26889 *) ac_try_echo=$ac_try;;
26890esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026892 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026893 ac_status=$?
26894 grep -v '^ *+' conftest.er1 >conftest.err
26895 rm -f conftest.er1
26896 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026898 (exit $ac_status); } && {
26899 test -z "$ac_c_werror_flag" ||
26900 test ! -s conftest.err
26901 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026902
26903cat >>confdefs.h <<\_ACEOF
26904#define HAVE_CURSES_RESIZE_TERM 1
26905_ACEOF
26906
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026907 { echo "$as_me:$LINENO: result: yes" >&5
26908echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026909else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026910 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026911sed 's/^/| /' conftest.$ac_ext >&5
26912
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026913 { echo "$as_me:$LINENO: result: no" >&5
26914echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026915
26916fi
26917
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26919
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026920{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26921echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026922cat >conftest.$ac_ext <<_ACEOF
26923/* confdefs.h. */
26924_ACEOF
26925cat confdefs.h >>conftest.$ac_ext
26926cat >>conftest.$ac_ext <<_ACEOF
26927/* end confdefs.h. */
26928#include <curses.h>
26929int
26930main ()
26931{
26932void *x=resizeterm
26933 ;
26934 return 0;
26935}
26936_ACEOF
26937rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026938if { (ac_try="$ac_compile"
26939case "(($ac_try" in
26940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26941 *) ac_try_echo=$ac_try;;
26942esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026944 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026945 ac_status=$?
26946 grep -v '^ *+' conftest.er1 >conftest.err
26947 rm -f conftest.er1
26948 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026950 (exit $ac_status); } && {
26951 test -z "$ac_c_werror_flag" ||
26952 test ! -s conftest.err
26953 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026954
26955cat >>confdefs.h <<\_ACEOF
26956#define HAVE_CURSES_RESIZETERM 1
26957_ACEOF
26958
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026959 { echo "$as_me:$LINENO: result: yes" >&5
26960echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026961else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026962 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026963sed 's/^/| /' conftest.$ac_ext >&5
26964
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026965 { echo "$as_me:$LINENO: result: no" >&5
26966echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026967
26968fi
26969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26971
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026972{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26973echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026974
26975if test -r /dev/ptmx
26976then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026977 { echo "$as_me:$LINENO: result: yes" >&5
26978echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026979
26980cat >>confdefs.h <<\_ACEOF
26981#define HAVE_DEV_PTMX 1
26982_ACEOF
26983
Thomas Wouters89f507f2006-12-13 04:49:30 +000026984else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026985 { echo "$as_me:$LINENO: result: no" >&5
26986echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026987fi
26988
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026989{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26990echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026991
26992if test -r /dev/ptc
26993then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026994 { echo "$as_me:$LINENO: result: yes" >&5
26995echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026996
26997cat >>confdefs.h <<\_ACEOF
26998#define HAVE_DEV_PTC 1
26999_ACEOF
27000
Thomas Wouters89f507f2006-12-13 04:49:30 +000027001else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027002 { echo "$as_me:$LINENO: result: no" >&5
27003echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027004fi
27005
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000027006if test "$have_long_long" = yes
27007then
27008 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
27009echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
27010 if test "${ac_cv_have_long_long_format+set}" = set; then
27011 echo $ECHO_N "(cached) $ECHO_C" >&6
27012else
27013 if test "$cross_compiling" = yes; then
27014 ac_cv_have_long_long_format=no
27015else
27016 cat >conftest.$ac_ext <<_ACEOF
27017/* confdefs.h. */
27018_ACEOF
27019cat confdefs.h >>conftest.$ac_ext
27020cat >>conftest.$ac_ext <<_ACEOF
27021/* end confdefs.h. */
27022
27023 #include <stdio.h>
27024 #include <stddef.h>
27025 #include <string.h>
27026
27027 #ifdef HAVE_SYS_TYPES_H
27028 #include <sys/types.h>
27029 #endif
27030
27031 int main()
27032 {
27033 char buffer[256];
27034
27035 if (sprintf(buffer, "%lld", (long long)123) < 0)
27036 return 1;
27037 if (strcmp(buffer, "123"))
27038 return 1;
27039
27040 if (sprintf(buffer, "%lld", (long long)-123) < 0)
27041 return 1;
27042 if (strcmp(buffer, "-123"))
27043 return 1;
27044
27045 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27046 return 1;
27047 if (strcmp(buffer, "123"))
27048 return 1;
27049
27050 return 0;
27051 }
27052
27053_ACEOF
27054rm -f conftest$ac_exeext
27055if { (ac_try="$ac_link"
27056case "(($ac_try" in
27057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27058 *) ac_try_echo=$ac_try;;
27059esac
27060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27061 (eval "$ac_link") 2>&5
27062 ac_status=$?
27063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27064 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27065 { (case "(($ac_try" in
27066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27067 *) ac_try_echo=$ac_try;;
27068esac
27069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27070 (eval "$ac_try") 2>&5
27071 ac_status=$?
27072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27073 (exit $ac_status); }; }; then
27074 ac_cv_have_long_long_format=yes
27075else
27076 echo "$as_me: program exited with status $ac_status" >&5
27077echo "$as_me: failed program was:" >&5
27078sed 's/^/| /' conftest.$ac_ext >&5
27079
27080( exit $ac_status )
27081ac_cv_have_long_long_format=no
27082fi
27083rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27084fi
27085
27086
27087
27088fi
27089
27090 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27091echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27092fi
27093
Mark Dickinson89d7d412009-12-31 20:50:59 +000027094if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000027095then
27096
27097cat >>confdefs.h <<\_ACEOF
27098#define PY_FORMAT_LONG_LONG "ll"
27099_ACEOF
27100
27101fi
27102
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000027103if test $ac_sys_system = Darwin
27104then
27105 LIBS="$LIBS -framework CoreFoundation"
27106fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000027107
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027108{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27109echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027110if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027111 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027112else
27113 if test "$cross_compiling" = yes; then
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027114 ac_cv_have_size_t_format="cross -- assuming yes"
27115
Thomas Wouters477c8d52006-05-27 19:21:47 +000027116else
27117 cat >conftest.$ac_ext <<_ACEOF
27118/* confdefs.h. */
27119_ACEOF
27120cat confdefs.h >>conftest.$ac_ext
27121cat >>conftest.$ac_ext <<_ACEOF
27122/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027123
Thomas Wouters477c8d52006-05-27 19:21:47 +000027124#include <stdio.h>
27125#include <stddef.h>
27126#include <string.h>
27127
Christian Heimes2c181612007-12-17 20:04:13 +000027128#ifdef HAVE_SYS_TYPES_H
27129#include <sys/types.h>
27130#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000027131
27132#ifdef HAVE_SSIZE_T
27133typedef ssize_t Py_ssize_t;
27134#elif SIZEOF_VOID_P == SIZEOF_LONG
27135typedef long Py_ssize_t;
27136#else
27137typedef int Py_ssize_t;
27138#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000027139
Christian Heimes2c181612007-12-17 20:04:13 +000027140int main()
27141{
27142 char buffer[256];
27143
Thomas Wouters477c8d52006-05-27 19:21:47 +000027144 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27145 return 1;
27146
Thomas Wouters89f507f2006-12-13 04:49:30 +000027147 if (strcmp(buffer, "123"))
27148 return 1;
27149
27150 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27151 return 1;
27152
27153 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000027154 return 1;
27155
27156 return 0;
27157}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027158
Thomas Wouters477c8d52006-05-27 19:21:47 +000027159_ACEOF
27160rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027161if { (ac_try="$ac_link"
27162case "(($ac_try" in
27163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27164 *) ac_try_echo=$ac_try;;
27165esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027167 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027168 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027170 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027171 { (case "(($ac_try" in
27172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27173 *) ac_try_echo=$ac_try;;
27174esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027176 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027177 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027179 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027180 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027181else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027182 echo "$as_me: program exited with status $ac_status" >&5
27183echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027184sed 's/^/| /' conftest.$ac_ext >&5
27185
27186( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027187ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027188fi
27189rm -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 +000027190fi
27191
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027192
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027193fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027194{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27195echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027196if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027197
27198cat >>confdefs.h <<\_ACEOF
27199#define PY_FORMAT_SIZE_T "z"
27200_ACEOF
27201
27202fi
27203
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027204{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27205echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027206if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027207 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027208else
Martin v. Löwis11437992002-04-12 09:54:03 +000027209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027210/* confdefs.h. */
27211_ACEOF
27212cat confdefs.h >>conftest.$ac_ext
27213cat >>conftest.$ac_ext <<_ACEOF
27214/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027215
27216#ifdef HAVE_SYS_TYPES_H
27217#include <sys/types.h>
27218#endif
27219#ifdef HAVE_SYS_SOCKET_H
27220#include <sys/socket.h>
27221#endif
27222
27223
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027224typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027225int
27226main ()
27227{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027228if ((ac__type_new_ *) 0)
27229 return 0;
27230if (sizeof (ac__type_new_))
27231 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027232 ;
27233 return 0;
27234}
27235_ACEOF
27236rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027237if { (ac_try="$ac_compile"
27238case "(($ac_try" in
27239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27240 *) ac_try_echo=$ac_try;;
27241esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027243 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027245 grep -v '^ *+' conftest.er1 >conftest.err
27246 rm -f conftest.er1
27247 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027249 (exit $ac_status); } && {
27250 test -z "$ac_c_werror_flag" ||
27251 test ! -s conftest.err
27252 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027253 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027254else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027255 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027256sed 's/^/| /' conftest.$ac_ext >&5
27257
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027258 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027260
27261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027262fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027263{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27264echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27265if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027266 :
27267else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027268
Martin v. Löwis01c04012002-11-11 14:58:44 +000027269cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027270#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027271_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027272
27273fi
27274
Michael W. Hudson54241132001-12-07 15:38:26 +000027275
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027276{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
27277echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027278if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027279 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027280else
27281 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000027282 ac_cv_broken_mbstowcs=no
27283else
27284 cat >conftest.$ac_ext <<_ACEOF
27285/* confdefs.h. */
27286_ACEOF
27287cat confdefs.h >>conftest.$ac_ext
27288cat >>conftest.$ac_ext <<_ACEOF
27289/* end confdefs.h. */
27290
27291#include<stdlib.h>
27292int main() {
27293 size_t len = -1;
27294 const char *str = "text";
27295 len = mbstowcs(NULL, str, 0);
27296 return (len != 4);
27297}
27298
27299_ACEOF
27300rm -f conftest$ac_exeext
27301if { (ac_try="$ac_link"
27302case "(($ac_try" in
27303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27304 *) ac_try_echo=$ac_try;;
27305esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027307 (eval "$ac_link") 2>&5
27308 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027310 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27311 { (case "(($ac_try" in
27312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27313 *) ac_try_echo=$ac_try;;
27314esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027316 (eval "$ac_try") 2>&5
27317 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027319 (exit $ac_status); }; }; then
27320 ac_cv_broken_mbstowcs=no
27321else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027322 echo "$as_me: program exited with status $ac_status" >&5
27323echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027324sed 's/^/| /' conftest.$ac_ext >&5
27325
27326( exit $ac_status )
27327ac_cv_broken_mbstowcs=yes
27328fi
27329rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27330fi
27331
27332
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027333fi
27334
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027335{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
27336echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000027337if test "$ac_cv_broken_mbstowcs" = yes
27338then
27339
27340cat >>confdefs.h <<\_ACEOF
27341#define HAVE_BROKEN_MBSTOWCS 1
27342_ACEOF
27343
27344fi
27345
Antoine Pitroub52ec782009-01-25 16:34:23 +000027346# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027347{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
27348echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027349
27350# Check whether --with-computed-gotos was given.
27351if test "${with_computed_gotos+set}" = set; then
27352 withval=$with_computed_gotos;
27353if test "$withval" != no
27354then
27355
27356cat >>confdefs.h <<\_ACEOF
27357#define USE_COMPUTED_GOTOS 1
27358_ACEOF
27359
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027360 { echo "$as_me:$LINENO: result: yes" >&5
27361echo "${ECHO_T}yes" >&6; }
27362else { echo "$as_me:$LINENO: result: no" >&5
27363echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027364fi
27365else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027366 { echo "$as_me:$LINENO: result: no" >&5
27367echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027368fi
27369
27370
27371
Michael W. Hudson54241132001-12-07 15:38:26 +000027372
27373
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027374for h in `(cd $srcdir;echo Python/thread_*.h)`
27375do
27376 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27377done
27378
Michael W. Hudson54241132001-12-07 15:38:26 +000027379
Neal Norwitzd24499d2005-12-18 21:36:39 +000027380SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027381{ echo "$as_me:$LINENO: checking for build directories" >&5
27382echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027383for dir in $SRCDIRS; do
27384 if test ! -d $dir; then
27385 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027386 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027387done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027388{ echo "$as_me:$LINENO: result: done" >&5
27389echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027390
Guido van Rossum627b2d71993-12-24 10:39:16 +000027391# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000027392ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027393
Martin v. Löwis11437992002-04-12 09:54:03 +000027394cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027395# This file is a shell script that caches the results of configure
27396# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027397# scripts and configure runs, see configure's option --config-cache.
27398# It is not useful on other systems. If it contains results you don't
27399# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027400#
Martin v. Löwis11437992002-04-12 09:54:03 +000027401# config.status only pays attention to the cache file if you give it
27402# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027403#
Skip Montanaro6dead952003-09-25 14:50:04 +000027404# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027405# loading this file, other *unset* `ac_cv_foo' will be assigned the
27406# following values.
27407
27408_ACEOF
27409
Guido van Rossumf78abae1997-01-21 22:02:36 +000027410# The following way of writing the cache mishandles newlines in values,
27411# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027412# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027413# Ultrix sh set writes to stderr and can't be redirected directly,
27414# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027415(
27416 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27417 eval ac_val=\$$ac_var
27418 case $ac_val in #(
27419 *${as_nl}*)
27420 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027421 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27422echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027423 esac
27424 case $ac_var in #(
27425 _ | IFS | as_nl) ;; #(
27426 *) $as_unset $ac_var ;;
27427 esac ;;
27428 esac
27429 done
27430
Martin v. Löwis11437992002-04-12 09:54:03 +000027431 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027432 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27433 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027434 # `set' does not quote correctly, so add quotes (double-quote
27435 # substitution turns \\\\ into \\, and sed turns \\ into \).
27436 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027437 "s/'/'\\\\''/g;
27438 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027439 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027440 *)
27441 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027442 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027443 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027444 esac |
27445 sort
27446) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027447 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027448 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027449 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027450 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027451 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27452 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027453 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27454 :end' >>confcache
27455if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27456 if test -w "$cache_file"; then
27457 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027458 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27459echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027460 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027461 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027462 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27463echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027464 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027465fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027466rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027467
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027468test "x$prefix" = xNONE && prefix=$ac_default_prefix
27469# Let make expand exec_prefix.
27470test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027471
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027472DEFS=-DHAVE_CONFIG_H
27473
Skip Montanaro6dead952003-09-25 14:50:04 +000027474ac_libobjs=
27475ac_ltlibobjs=
27476for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27477 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027478 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027479 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027480 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27481 # will be set to the directory where LIBOBJS objects are built.
27482 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27483 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027484done
27485LIBOBJS=$ac_libobjs
27486
27487LTLIBOBJS=$ac_ltlibobjs
27488
27489
Martin v. Löwis11437992002-04-12 09:54:03 +000027490
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027491: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027492ac_clean_files_save=$ac_clean_files
27493ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027494{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27495echo "$as_me: creating $CONFIG_STATUS" >&6;}
27496cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027497#! $SHELL
27498# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027499# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027500# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027501# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027502
Martin v. Löwis11437992002-04-12 09:54:03 +000027503debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027504ac_cs_recheck=false
27505ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027506SHELL=\${CONFIG_SHELL-$SHELL}
27507_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027508
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027509cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027510## --------------------- ##
27511## M4sh Initialization. ##
27512## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027514# Be more Bourne compatible
27515DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027516if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27517 emulate sh
27518 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027519 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027520 # is contrary to our usage. Disable this feature.
27521 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027522 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027523else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027524 case `(set -o) 2>/dev/null` in
27525 *posix*) set -o posix ;;
27526esac
27527
Michael W. Hudson54241132001-12-07 15:38:26 +000027528fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000027529
27530
Michael W. Hudson54241132001-12-07 15:38:26 +000027531
Michael W. Hudson54241132001-12-07 15:38:26 +000027532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027533# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027534# Avoid depending upon Character Ranges.
27535as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27536as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27537as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27538as_cr_digits='0123456789'
27539as_cr_alnum=$as_cr_Letters$as_cr_digits
27540
27541# The user is always right.
27542if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027543 echo "#! /bin/sh" >conf$$.sh
27544 echo "exit 0" >>conf$$.sh
27545 chmod +x conf$$.sh
27546 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27547 PATH_SEPARATOR=';'
27548 else
27549 PATH_SEPARATOR=:
27550 fi
27551 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027552fi
27553
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027554# Support unset when possible.
27555if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27556 as_unset=unset
27557else
27558 as_unset=false
27559fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027560
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027561
27562# IFS
27563# We need space, tab and new line, in precisely that order. Quoting is
27564# there to prevent editors from complaining about space-tab.
27565# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27566# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027567as_nl='
27568'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027569IFS=" "" $as_nl"
27570
27571# Find who we are. Look in the path if we contain no directory separator.
27572case $0 in
27573 *[\\/]* ) as_myself=$0 ;;
27574 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027575for as_dir in $PATH
27576do
27577 IFS=$as_save_IFS
27578 test -z "$as_dir" && as_dir=.
27579 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27580done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027581IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027583 ;;
27584esac
27585# We did not find ourselves, most probably we were run as `sh COMMAND'
27586# in which case we are not to be found in the path.
27587if test "x$as_myself" = x; then
27588 as_myself=$0
27589fi
27590if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027591 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027592 { (exit 1); exit 1; }
27593fi
27594
27595# Work around bugs in pre-3.0 UWIN ksh.
27596for as_var in ENV MAIL MAILPATH
27597do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27598done
27599PS1='$ '
27600PS2='> '
27601PS4='+ '
27602
27603# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027604for as_var in \
27605 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27606 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27607 LC_TELEPHONE LC_TIME
27608do
27609 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27610 eval $as_var=C; export $as_var
27611 else
27612 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27613 fi
27614done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027615
27616# Required to use basename.
27617if expr a : '\(a\)' >/dev/null 2>&1 &&
27618 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27619 as_expr=expr
27620else
27621 as_expr=false
27622fi
27623
27624if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27625 as_basename=basename
27626else
27627 as_basename=false
27628fi
27629
27630
27631# Name of the executable.
27632as_me=`$as_basename -- "$0" ||
27633$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27634 X"$0" : 'X\(//\)$' \| \
27635 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027636echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027637 sed '/^.*\/\([^/][^/]*\)\/*$/{
27638 s//\1/
27639 q
27640 }
27641 /^X\/\(\/\/\)$/{
27642 s//\1/
27643 q
27644 }
27645 /^X\/\(\/\).*/{
27646 s//\1/
27647 q
27648 }
27649 s/.*/./; q'`
27650
27651# CDPATH.
27652$as_unset CDPATH
27653
27654
27655
Martin v. Löwis11437992002-04-12 09:54:03 +000027656 as_lineno_1=$LINENO
27657 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027658 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027659 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027660
Martin v. Löwis11437992002-04-12 09:54:03 +000027661 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27662 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027663 # line-number line after each line using $LINENO; the second 'sed'
27664 # does the real work. The second script uses 'N' to pair each
27665 # line-number line with the line containing $LINENO, and appends
27666 # trailing '-' during substitution so that $LINENO is not a special
27667 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027668 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027669 # scripts with optimization help from Paolo Bonzini. Blame Lee
27670 # E. McMahon (1931-1989) for sed's syntax. :-)
27671 sed -n '
27672 p
27673 /[$]LINENO/=
27674 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027675 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027676 s/[$]LINENO.*/&-/
27677 t lineno
27678 b
27679 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027680 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027681 :loop
27682 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027683 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027684 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027685 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027686 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027687 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027688 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027689
Martin v. Löwis11437992002-04-12 09:54:03 +000027690 # Don't try to exec as it changes $[0], causing all sort of problems
27691 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027692 # original and so on. Autoconf is especially sensitive to this).
27693 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027694 # Exit status is that of the last command.
27695 exit
27696}
27697
27698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027699if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27700 as_dirname=dirname
27701else
27702 as_dirname=false
27703fi
27704
27705ECHO_C= ECHO_N= ECHO_T=
27706case `echo -n x` in
27707-n*)
27708 case `echo 'x\c'` in
27709 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27710 *) ECHO_C='\c';;
27711 esac;;
27712*)
27713 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027714esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027716if expr a : '\(a\)' >/dev/null 2>&1 &&
27717 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027718 as_expr=expr
27719else
27720 as_expr=false
27721fi
27722
27723rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027724if test -d conf$$.dir; then
27725 rm -f conf$$.dir/conf$$.file
27726else
27727 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027728 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027729fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027730echo >conf$$.file
27731if ln -s conf$$.file conf$$ 2>/dev/null; then
27732 as_ln_s='ln -s'
27733 # ... but there are two gotchas:
27734 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27735 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27736 # In both cases, we have to default to `cp -p'.
27737 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027738 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027739elif ln conf$$.file conf$$ 2>/dev/null; then
27740 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027741else
27742 as_ln_s='cp -p'
27743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027744rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27745rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027746
Skip Montanaro6dead952003-09-25 14:50:04 +000027747if mkdir -p . 2>/dev/null; then
27748 as_mkdir_p=:
27749else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027750 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027751 as_mkdir_p=false
27752fi
27753
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027754if test -x / >/dev/null 2>&1; then
27755 as_test_x='test -x'
27756else
27757 if ls -dL / >/dev/null 2>&1; then
27758 as_ls_L_option=L
27759 else
27760 as_ls_L_option=
27761 fi
27762 as_test_x='
27763 eval sh -c '\''
27764 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027765 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027766 else
27767 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027768 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027769 esac;
27770 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27771 ???[sx]*):;;*)false;;esac;fi
27772 '\'' sh
27773 '
27774fi
27775as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027776
27777# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027778as_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 +000027779
27780# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027781as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027782
27783
Martin v. Löwis11437992002-04-12 09:54:03 +000027784exec 6>&1
27785
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027786# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027787# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027788# values after options handling.
27789ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027790This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027791generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027792
27793 CONFIG_FILES = $CONFIG_FILES
27794 CONFIG_HEADERS = $CONFIG_HEADERS
27795 CONFIG_LINKS = $CONFIG_LINKS
27796 CONFIG_COMMANDS = $CONFIG_COMMANDS
27797 $ $0 $@
27798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027799on `(hostname || uname -n) 2>/dev/null | sed 1q`
27800"
27801
Martin v. Löwis11437992002-04-12 09:54:03 +000027802_ACEOF
27803
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027804cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027805# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027806config_files="$ac_config_files"
27807config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027809_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027810
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027811cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027812ac_cs_usage="\
27813\`$as_me' instantiates files from templates according to the
27814current configuration.
27815
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027816Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027817
27818 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027819 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027820 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027821 -d, --debug don't remove temporary files
27822 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027823 --file=FILE[:TEMPLATE]
27824 instantiate the configuration file FILE
27825 --header=FILE[:TEMPLATE]
27826 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027827
27828Configuration files:
27829$config_files
27830
27831Configuration headers:
27832$config_headers
27833
27834Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027836_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027837cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027838ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027839python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027840configured by $0, generated by GNU Autoconf 2.61,
27841 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027842
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027843Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027844This config.status script is free software; the Free Software Foundation
27845gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027846
27847ac_pwd='$ac_pwd'
27848srcdir='$srcdir'
27849INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027850_ACEOF
27851
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027852cat >>$CONFIG_STATUS <<\_ACEOF
27853# If no file are specified by the user, then we need to provide default
27854# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027855ac_need_defaults=:
27856while test $# != 0
27857do
27858 case $1 in
27859 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027860 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27861 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027862 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027863 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027864 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027865 ac_option=$1
27866 ac_optarg=$2
27867 ac_shift=shift
27868 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027869 esac
27870
Skip Montanaro6dead952003-09-25 14:50:04 +000027871 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027872 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027873 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27874 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027875 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027876 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027877 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027878 debug=: ;;
27879 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027880 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027881 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027882 ac_need_defaults=false;;
27883 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027884 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027885 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027886 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027887 --he | --h)
27888 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027889 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027890Try \`$0 --help' for more information." >&2
27891 { (exit 1); exit 1; }; };;
27892 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027893 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027894 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27895 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27896 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027897
27898 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027899 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027900Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027901 { (exit 1); exit 1; }; } ;;
27902
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027903 *) ac_config_targets="$ac_config_targets $1"
27904 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027905
27906 esac
27907 shift
27908done
27909
Skip Montanaro6dead952003-09-25 14:50:04 +000027910ac_configure_extra_args=
27911
27912if $ac_cs_silent; then
27913 exec 6>/dev/null
27914 ac_configure_extra_args="$ac_configure_extra_args --silent"
27915fi
27916
27917_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027918cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027919if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027920 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27921 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027922 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027923 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027924fi
27925
Martin v. Löwis11437992002-04-12 09:54:03 +000027926_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027927cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027928exec 5>>config.log
27929{
27930 echo
27931 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27932## Running $as_me. ##
27933_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027934 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027935} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027937_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027938cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027939_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027940
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027941cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027942
27943# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027944for ac_config_target in $ac_config_targets
27945do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027946 case $ac_config_target in
27947 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27948 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27949 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027950 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27951 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027952 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27953 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027954 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027955
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027956 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27957echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027958 { (exit 1); exit 1; }; };;
27959 esac
27960done
27961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027962
Martin v. Löwis11437992002-04-12 09:54:03 +000027963# If the user did not use the arguments to specify the items to instantiate,
27964# then the envvar interface is used. Set only those that are not.
27965# We use the long form for the default assignment because of an extremely
27966# bizarre bug on SunOS 4.1.3.
27967if $ac_need_defaults; then
27968 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27969 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27970fi
27971
Skip Montanaro6dead952003-09-25 14:50:04 +000027972# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027973# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027974# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027975# Hook for its removal unless debugging.
27976# Note that there is a small window in which the directory will not be cleaned:
27977# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027978$debug ||
27979{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027980 tmp=
27981 trap 'exit_status=$?
27982 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27983' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027984 trap '{ (exit 1); exit 1; }' 1 2 13 15
27985}
Martin v. Löwis11437992002-04-12 09:54:03 +000027986# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027987
Martin v. Löwis11437992002-04-12 09:54:03 +000027988{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027989 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027990 test -n "$tmp" && test -d "$tmp"
27991} ||
27992{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027993 tmp=./conf$$-$RANDOM
27994 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027995} ||
27996{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027997 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027998 { (exit 1); exit 1; }
27999}
28000
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028001#
28002# Set up the sed scripts for CONFIG_FILES section.
28003#
28004
28005# No need to generate the scripts if there are no CONFIG_FILES.
28006# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028007if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028008
28009_ACEOF
28010
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028011
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028013ac_delim='%!_!# '
28014for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028015 cat >conf$$subs.sed <<_ACEOF
28016SHELL!$SHELL$ac_delim
28017PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28018PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28019PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28020PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28021PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28022PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28023exec_prefix!$exec_prefix$ac_delim
28024prefix!$prefix$ac_delim
28025program_transform_name!$program_transform_name$ac_delim
28026bindir!$bindir$ac_delim
28027sbindir!$sbindir$ac_delim
28028libexecdir!$libexecdir$ac_delim
28029datarootdir!$datarootdir$ac_delim
28030datadir!$datadir$ac_delim
28031sysconfdir!$sysconfdir$ac_delim
28032sharedstatedir!$sharedstatedir$ac_delim
28033localstatedir!$localstatedir$ac_delim
28034includedir!$includedir$ac_delim
28035oldincludedir!$oldincludedir$ac_delim
28036docdir!$docdir$ac_delim
28037infodir!$infodir$ac_delim
28038htmldir!$htmldir$ac_delim
28039dvidir!$dvidir$ac_delim
28040pdfdir!$pdfdir$ac_delim
28041psdir!$psdir$ac_delim
28042libdir!$libdir$ac_delim
28043localedir!$localedir$ac_delim
28044mandir!$mandir$ac_delim
28045DEFS!$DEFS$ac_delim
28046ECHO_C!$ECHO_C$ac_delim
28047ECHO_N!$ECHO_N$ac_delim
28048ECHO_T!$ECHO_T$ac_delim
28049LIBS!$LIBS$ac_delim
28050build_alias!$build_alias$ac_delim
28051host_alias!$host_alias$ac_delim
28052target_alias!$target_alias$ac_delim
28053VERSION!$VERSION$ac_delim
28054SOVERSION!$SOVERSION$ac_delim
28055CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28056UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28057ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000028058LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028059PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28060PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28061PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28062PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28063PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28064FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28065FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28066FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28067FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28068FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28069MACHDEP!$MACHDEP$ac_delim
28070SGI_ABI!$SGI_ABI$ac_delim
28071CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28072EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28073CC!$CC$ac_delim
28074CFLAGS!$CFLAGS$ac_delim
28075LDFLAGS!$LDFLAGS$ac_delim
28076CPPFLAGS!$CPPFLAGS$ac_delim
28077ac_ct_CC!$ac_ct_CC$ac_delim
28078EXEEXT!$EXEEXT$ac_delim
28079OBJEXT!$OBJEXT$ac_delim
28080CXX!$CXX$ac_delim
28081MAINCC!$MAINCC$ac_delim
28082CPP!$CPP$ac_delim
28083GREP!$GREP$ac_delim
28084EGREP!$EGREP$ac_delim
28085BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28086LIBRARY!$LIBRARY$ac_delim
28087LDLIBRARY!$LDLIBRARY$ac_delim
28088DLLLIBRARY!$DLLLIBRARY$ac_delim
28089BLDLIBRARY!$BLDLIBRARY$ac_delim
28090LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28091INSTSONAME!$INSTSONAME$ac_delim
28092RUNSHARED!$RUNSHARED$ac_delim
28093LINKCC!$LINKCC$ac_delim
28094GNULD!$GNULD$ac_delim
28095RANLIB!$RANLIB$ac_delim
28096AR!$AR$ac_delim
28097ARFLAGS!$ARFLAGS$ac_delim
28098SVNVERSION!$SVNVERSION$ac_delim
28099INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28100INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28101INSTALL_DATA!$INSTALL_DATA$ac_delim
28102LN!$LN$ac_delim
28103OPT!$OPT$ac_delim
28104BASECFLAGS!$BASECFLAGS$ac_delim
28105UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28106OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28107LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28108SO!$SO$ac_delim
28109LDSHARED!$LDSHARED$ac_delim
Benjamin Peterson99f03762010-04-11 22:15:28 +000028110LDCXXSHARED!$LDCXXSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028111BLDSHARED!$BLDSHARED$ac_delim
28112CCSHARED!$CCSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028113_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028114
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028115 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028116 break
28117 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028118 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28119echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028120 { (exit 1); exit 1; }; }
28121 else
28122 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028123 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028124done
28125
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028126ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28127if test -n "$ac_eof"; then
28128 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28129 ac_eof=`expr $ac_eof + 1`
28130fi
28131
28132cat >>$CONFIG_STATUS <<_ACEOF
28133cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28134/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028135_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028136sed '
28137s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28138s/^/s,@/; s/!/@,|#_!!_#|/
28139:n
28140t n
28141s/'"$ac_delim"'$/,g/; t
28142s/$/\\/; p
28143N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28144' >>$CONFIG_STATUS <conf$$subs.sed
28145rm -f conf$$subs.sed
28146cat >>$CONFIG_STATUS <<_ACEOF
28147CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028148_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028149
28150
28151ac_delim='%!_!# '
28152for ac_last_try in false false false false false :; do
28153 cat >conf$$subs.sed <<_ACEOF
Benjamin Peterson99f03762010-04-11 22:15:28 +000028154LINKFORSHARED!$LINKFORSHARED$ac_delim
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000028155CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028156SHLIBS!$SHLIBS$ac_delim
Benjamin Petersond78735d2010-01-01 16:04:23 +000028157PKG_CONFIG!$PKG_CONFIG$ac_delim
28158LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028159USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28160SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28161USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28162LDLAST!$LDLAST$ac_delim
28163THREADOBJ!$THREADOBJ$ac_delim
28164DLINCLDIR!$DLINCLDIR$ac_delim
28165DYNLOADFILE!$DYNLOADFILE$ac_delim
28166MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28167TRUE!$TRUE$ac_delim
28168LIBOBJS!$LIBOBJS$ac_delim
28169HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28170HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28171HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28172HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28173HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28174LIBM!$LIBM$ac_delim
28175LIBC!$LIBC$ac_delim
28176THREADHEADERS!$THREADHEADERS$ac_delim
28177SRCDIRS!$SRCDIRS$ac_delim
28178LTLIBOBJS!$LTLIBOBJS$ac_delim
28179_ACEOF
28180
Benjamin Peterson99f03762010-04-11 22:15:28 +000028181 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 25; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028182 break
28183 elif $ac_last_try; then
28184 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28185echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028186 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028187 else
28188 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28189 fi
28190done
28191
28192ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28193if test -n "$ac_eof"; then
28194 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28195 ac_eof=`expr $ac_eof + 1`
28196fi
28197
28198cat >>$CONFIG_STATUS <<_ACEOF
28199cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28200/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028201_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028202sed '
28203s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28204s/^/s,@/; s/!/@,|#_!!_#|/
28205:n
28206t n
28207s/'"$ac_delim"'$/,g/; t
28208s/$/\\/; p
28209N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28210' >>$CONFIG_STATUS <conf$$subs.sed
28211rm -f conf$$subs.sed
28212cat >>$CONFIG_STATUS <<_ACEOF
28213:end
28214s/|#_!!_#|//g
28215CEOF$ac_eof
28216_ACEOF
28217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028218
28219# VPATH may cause trouble with some makes, so we remove $(srcdir),
28220# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28221# trailing colons and then remove the whole line if VPATH becomes empty
28222# (actually we leave an empty line to preserve line numbers).
28223if test "x$srcdir" = x.; then
28224 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28225s/:*\$(srcdir):*/:/
28226s/:*\${srcdir}:*/:/
28227s/:*@srcdir@:*/:/
28228s/^\([^=]*=[ ]*\):*/\1/
28229s/:*$//
28230s/^[^=]*=[ ]*$//
28231}'
28232fi
28233
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028234cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028235fi # test -n "$CONFIG_FILES"
28236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028237
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028238for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028239do
28240 case $ac_tag in
28241 :[FHLC]) ac_mode=$ac_tag; continue;;
28242 esac
28243 case $ac_mode$ac_tag in
28244 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028245 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28246echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028247 { (exit 1); exit 1; }; };;
28248 :[FH]-) ac_tag=-:-;;
28249 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28250 esac
28251 ac_save_IFS=$IFS
28252 IFS=:
28253 set x $ac_tag
28254 IFS=$ac_save_IFS
28255 shift
28256 ac_file=$1
28257 shift
28258
28259 case $ac_mode in
28260 :L) ac_source=$1;;
28261 :[FH])
28262 ac_file_inputs=
28263 for ac_f
28264 do
28265 case $ac_f in
28266 -) ac_f="$tmp/stdin";;
28267 *) # Look for the file first in the build tree, then in the source tree
28268 # (if the path is not absolute). The absolute path cannot be DOS-style,
28269 # because $ac_f cannot contain `:'.
28270 test -f "$ac_f" ||
28271 case $ac_f in
28272 [\\/$]*) false;;
28273 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28274 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028275 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28276echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028277 { (exit 1); exit 1; }; };;
28278 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028279 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028280 done
28281
28282 # Let's still pretend it is `configure' which instantiates (i.e., don't
28283 # use $as_me), people would be surprised to read:
28284 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028285 configure_input="Generated from "`IFS=:
28286 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028287 if test x"$ac_file" != x-; then
28288 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028289 { echo "$as_me:$LINENO: creating $ac_file" >&5
28290echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028291 fi
28292
28293 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028294 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028295 esac
28296 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028297 esac
28298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028299 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028300$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028301 X"$ac_file" : 'X\(//\)[^/]' \| \
28302 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028303 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028304echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028305 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28306 s//\1/
28307 q
28308 }
28309 /^X\(\/\/\)[^/].*/{
28310 s//\1/
28311 q
28312 }
28313 /^X\(\/\/\)$/{
28314 s//\1/
28315 q
28316 }
28317 /^X\(\/\).*/{
28318 s//\1/
28319 q
28320 }
28321 s/.*/./; q'`
28322 { as_dir="$ac_dir"
28323 case $as_dir in #(
28324 -*) as_dir=./$as_dir;;
28325 esac
28326 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028327 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028328 while :; do
28329 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028330 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028331 *) as_qdir=$as_dir;;
28332 esac
28333 as_dirs="'$as_qdir' $as_dirs"
28334 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028335$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028336 X"$as_dir" : 'X\(//\)[^/]' \| \
28337 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028338 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028339echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028340 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28341 s//\1/
28342 q
28343 }
28344 /^X\(\/\/\)[^/].*/{
28345 s//\1/
28346 q
28347 }
28348 /^X\(\/\/\)$/{
28349 s//\1/
28350 q
28351 }
28352 /^X\(\/\).*/{
28353 s//\1/
28354 q
28355 }
28356 s/.*/./; q'`
28357 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028358 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028359 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028360 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28361echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028362 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028363 ac_builddir=.
28364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028365case "$ac_dir" in
28366.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28367*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028368 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028369 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028370 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028371 case $ac_top_builddir_sub in
28372 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28373 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28374 esac ;;
28375esac
28376ac_abs_top_builddir=$ac_pwd
28377ac_abs_builddir=$ac_pwd$ac_dir_suffix
28378# for backward compatibility:
28379ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028380
28381case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028382 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028383 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028384 ac_top_srcdir=$ac_top_builddir_sub
28385 ac_abs_top_srcdir=$ac_pwd ;;
28386 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028387 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028388 ac_top_srcdir=$srcdir
28389 ac_abs_top_srcdir=$srcdir ;;
28390 *) # Relative name.
28391 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28392 ac_top_srcdir=$ac_top_build_prefix$srcdir
28393 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028394esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028395ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028396
Martin v. Löwis11437992002-04-12 09:54:03 +000028397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028398 case $ac_mode in
28399 :F)
28400 #
28401 # CONFIG_FILE
28402 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028403
28404 case $INSTALL in
28405 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028406 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028407 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000028408_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028409
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028410cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028411# If the template does not know about datarootdir, expand it.
28412# FIXME: This hack should be removed a few years after 2.60.
28413ac_datarootdir_hack=; ac_datarootdir_seen=
28414
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028415case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028416 p
28417 q
28418}
28419/@datadir@/p
28420/@docdir@/p
28421/@infodir@/p
28422/@localedir@/p
28423/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028424' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028425*datarootdir*) ac_datarootdir_seen=yes;;
28426*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028427 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28428echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028429_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028430cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028431 ac_datarootdir_hack='
28432 s&@datadir@&$datadir&g
28433 s&@docdir@&$docdir&g
28434 s&@infodir@&$infodir&g
28435 s&@localedir@&$localedir&g
28436 s&@mandir@&$mandir&g
28437 s&\\\${datarootdir}&$datarootdir&g' ;;
28438esac
28439_ACEOF
28440
28441# Neutralize VPATH when `$srcdir' = `.'.
28442# Shell code in configure.ac might set extrasub.
28443# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028444cat >>$CONFIG_STATUS <<_ACEOF
28445 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028446$extrasub
28447_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028448cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028449:t
28450/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028451s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028452s&@top_builddir@&$ac_top_builddir_sub&;t t
28453s&@srcdir@&$ac_srcdir&;t t
28454s&@abs_srcdir@&$ac_abs_srcdir&;t t
28455s&@top_srcdir@&$ac_top_srcdir&;t t
28456s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28457s&@builddir@&$ac_builddir&;t t
28458s&@abs_builddir@&$ac_abs_builddir&;t t
28459s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28460s&@INSTALL@&$ac_INSTALL&;t t
28461$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028462" $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 +000028463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028464test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28465 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28466 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028467 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028468which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028469echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028470which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000028471
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028472 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028473 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028474 -) cat "$tmp/out"; rm -f "$tmp/out";;
28475 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28476 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028477 ;;
28478 :H)
28479 #
28480 # CONFIG_HEADER
28481 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028482_ACEOF
28483
28484# Transform confdefs.h into a sed script `conftest.defines', that
28485# substitutes the proper values into config.h.in to produce config.h.
28486rm -f conftest.defines conftest.tail
28487# First, append a space to every undef/define line, to ease matching.
28488echo 's/$/ /' >conftest.defines
28489# Then, protect against being on the right side of a sed subst, or in
28490# an unquoted here document, in config.status. If some macros were
28491# called several times there might be several #defines for the same
28492# symbol, which is useless. But do not sort them, since the last
28493# AC_DEFINE must be honored.
28494ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28495# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28496# NAME is the cpp macro being defined, VALUE is the value it is being given.
28497# PARAMS is the parameter list in the macro definition--in most cases, it's
28498# just an empty string.
28499ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28500ac_dB='\\)[ (].*,\\1define\\2'
28501ac_dC=' '
28502ac_dD=' ,'
28503
28504uniq confdefs.h |
28505 sed -n '
28506 t rset
28507 :rset
28508 s/^[ ]*#[ ]*define[ ][ ]*//
28509 t ok
28510 d
28511 :ok
28512 s/[\\&,]/\\&/g
28513 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28514 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28515 ' >>conftest.defines
28516
28517# Remove the space that was appended to ease matching.
28518# Then replace #undef with comments. This is necessary, for
28519# example, in the case of _POSIX_SOURCE, which is predefined and required
28520# on some systems where configure will not decide to define it.
28521# (The regexp can be short, since the line contains either #define or #undef.)
28522echo 's/ $//
28523s,^[ #]*u.*,/* & */,' >>conftest.defines
28524
28525# Break up conftest.defines:
28526ac_max_sed_lines=50
28527
28528# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28529# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28530# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28531# et cetera.
28532ac_in='$ac_file_inputs'
28533ac_out='"$tmp/out1"'
28534ac_nxt='"$tmp/out2"'
28535
28536while :
28537do
28538 # Write a here document:
28539 cat >>$CONFIG_STATUS <<_ACEOF
28540 # First, check the format of the line:
28541 cat >"\$tmp/defines.sed" <<\\CEOF
28542/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28543/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28544b
28545:def
28546_ACEOF
28547 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28548 echo 'CEOF
28549 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28550 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28551 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28552 grep . conftest.tail >/dev/null || break
28553 rm -f conftest.defines
28554 mv conftest.tail conftest.defines
28555done
28556rm -f conftest.defines conftest.tail
28557
28558echo "ac_result=$ac_in" >>$CONFIG_STATUS
28559cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028560 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028561 echo "/* $configure_input */" >"$tmp/config.h"
28562 cat "$ac_result" >>"$tmp/config.h"
28563 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28564 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28565echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028566 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028567 rm -f $ac_file
28568 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028569 fi
28570 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028571 echo "/* $configure_input */"
28572 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028573 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028574 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028575 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028576
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028577
28578 esac
28579
28580done # for ac_tag
28581
Guido van Rossum627b2d71993-12-24 10:39:16 +000028582
Martin v. Löwis11437992002-04-12 09:54:03 +000028583{ (exit 0); exit 0; }
28584_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028585chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028586ac_clean_files=$ac_clean_files_save
28587
28588
28589# configure is writing to config.log, and then calls config.status.
28590# config.status does its own redirection, appending to config.log.
28591# Unfortunately, on DOS this fails, as config.log is still kept open
28592# by configure, so config.status won't be able to write to it; its
28593# output is simply discarded. So we exec the FD to /dev/null,
28594# effectively closing config.log, so it can be properly (re)opened and
28595# appended to by config.status. When coming back to configure, we
28596# need to make the FD available again.
28597if test "$no_create" != yes; then
28598 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028599 ac_config_status_args=
28600 test "$silent" = yes &&
28601 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028602 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028603 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028604 exec 5>>config.log
28605 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28606 # would make configure fail if this is the last instruction.
28607 $ac_cs_success || { (exit 1); exit 1; }
28608fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028609
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028610
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028611echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028612if test ! -f Modules/Setup
28613then
28614 cp $srcdir/Modules/Setup.dist Modules/Setup
28615fi
28616
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028617echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028618if test ! -f Modules/Setup.local
28619then
28620 echo "# Edit this file for local setup changes" >Modules/Setup.local
28621fi
28622
28623echo "creating Makefile"
28624$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28625 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028626 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028627mv config.c Modules