blob: e6fcee7e490296e50a1a2d1511046779c51e31d6 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002# From configure.in Revision: 78066 .
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
713BLDSHARED
714CCSHARED
715LINKFORSHARED
716CFLAGSFORSHARED
717SHLIBS
Benjamin Petersond78735d2010-01-01 16:04:23 +0000718PKG_CONFIG
719LIBFFI_INCLUDEDIR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000720USE_SIGNAL_MODULE
721SIGNAL_OBJS
722USE_THREAD_MODULE
723LDLAST
724THREADOBJ
725DLINCLDIR
726DYNLOADFILE
727MACHDEP_OBJS
728TRUE
729LIBOBJS
730HAVE_GETHOSTBYNAME_R_6_ARG
731HAVE_GETHOSTBYNAME_R_5_ARG
732HAVE_GETHOSTBYNAME_R_3_ARG
733HAVE_GETHOSTBYNAME_R
734HAVE_GETHOSTBYNAME
735LIBM
736LIBC
737THREADHEADERS
738SRCDIRS
739LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000741 ac_precious_vars='build_alias
742host_alias
743target_alias
744CC
745CFLAGS
746LDFLAGS
747LIBS
748CPPFLAGS
749CPP'
750
Guido van Rossum627b2d71993-12-24 10:39:16 +0000751
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000753ac_init_help=
754ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755# The variables have the same names as the options, with
756# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000757cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000759no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000760no_recursion=
761prefix=NONE
762program_prefix=NONE
763program_suffix=NONE
764program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769x_includes=NONE
770x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000771
772# Installation directory options.
773# These are left unexpanded so users can "make install exec_prefix=/foo"
774# and all the variables that are supposed to be based on exec_prefix
775# by default will actually change.
776# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000777# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778bindir='${exec_prefix}/bin'
779sbindir='${exec_prefix}/sbin'
780libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000781datarootdir='${prefix}/share'
782datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783sysconfdir='${prefix}/etc'
784sharedstatedir='${prefix}/com'
785localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000786includedir='${prefix}/include'
787oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000788docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
789infodir='${datarootdir}/info'
790htmldir='${docdir}'
791dvidir='${docdir}'
792pdfdir='${docdir}'
793psdir='${docdir}'
794libdir='${exec_prefix}/lib'
795localedir='${datarootdir}/locale'
796mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000797
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000799ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000801do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 # If the previous option needs an argument, assign it.
803 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000804 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 ac_prev=
806 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000807 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000809 case $ac_option in
810 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
811 *) ac_optarg=yes ;;
812 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814 # Accept the important Cygnus configure options, so we can diagnose typos.
815
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000816 case $ac_dashdash$ac_option in
817 --)
818 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820 -bindir | --bindir | --bindi | --bind | --bin | --bi)
821 ac_prev=bindir ;;
822 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824
825 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000828 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 -cache-file | --cache-file | --cache-fil | --cache-fi \
831 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
832 ac_prev=cache_file ;;
833 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
834 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000835 cache_file=$ac_optarg ;;
836
837 --config-cache | -C)
838 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000845 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
846 | --dataroo | --dataro | --datar)
847 ac_prev=datarootdir ;;
848 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
849 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
850 datarootdir=$ac_optarg ;;
851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852 -disable-* | --disable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000853 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000855 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
856 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000858 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
859 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
861 -docdir | --docdir | --docdi | --doc | --do)
862 ac_prev=docdir ;;
863 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
864 docdir=$ac_optarg ;;
865
866 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
867 ac_prev=dvidir ;;
868 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
869 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
871 -enable-* | --enable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000872 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000874 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
875 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000877 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
878 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
881 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
882 | --exec | --exe | --ex)
883 ac_prev=exec_prefix ;;
884 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
885 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
886 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
889 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 # Obsolete; use --with-gas.
891 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Martin v. Löwis11437992002-04-12 09:54:03 +0000893 -help | --help | --hel | --he | -h)
894 ac_init_help=long ;;
895 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
896 ac_init_help=recursive ;;
897 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
898 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
900 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
906 ac_prev=htmldir ;;
907 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
908 | --ht=*)
909 htmldir=$ac_optarg ;;
910
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911 -includedir | --includedir | --includedi | --included | --include \
912 | --includ | --inclu | --incl | --inc)
913 ac_prev=includedir ;;
914 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
915 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -infodir | --infodir | --infodi | --infod | --info | --inf)
919 ac_prev=infodir ;;
920 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libdir | --libdir | --libdi | --libd)
924 ac_prev=libdir ;;
925 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
929 | --libexe | --libex | --libe)
930 ac_prev=libexecdir ;;
931 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
932 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935 -localedir | --localedir | --localedi | --localed | --locale)
936 ac_prev=localedir ;;
937 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
938 localedir=$ac_optarg ;;
939
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 ac_prev=localstatedir ;;
943 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000944 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
947 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
948 ac_prev=mandir ;;
949 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Obsolete; use --without-fp.
954 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955
956 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 no_create=yes ;;
959
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
962 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
965 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
966 | --oldin | --oldi | --old | --ol | --o)
967 ac_prev=oldincludedir ;;
968 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
969 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
970 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
974 ac_prev=prefix ;;
975 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -program-prefix | --program-prefix | --program-prefi | --program-pref \
979 | --program-pre | --program-pr | --program-p)
980 ac_prev=program_prefix ;;
981 -program-prefix=* | --program-prefix=* | --program-prefi=* \
982 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -program-suffix | --program-suffix | --program-suffi | --program-suff \
986 | --program-suf | --program-su | --program-s)
987 ac_prev=program_suffix ;;
988 -program-suffix=* | --program-suffix=* | --program-suffi=* \
989 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -program-transform-name | --program-transform-name \
993 | --program-transform-nam | --program-transform-na \
994 | --program-transform-n | --program-transform- \
995 | --program-transform | --program-transfor \
996 | --program-transfo | --program-transf \
997 | --program-trans | --program-tran \
998 | --progr-tra | --program-tr | --program-t)
999 ac_prev=program_transform_name ;;
1000 -program-transform-name=* | --program-transform-name=* \
1001 | --program-transform-nam=* | --program-transform-na=* \
1002 | --program-transform-n=* | --program-transform-=* \
1003 | --program-transform=* | --program-transfor=* \
1004 | --program-transfo=* | --program-transf=* \
1005 | --program-trans=* | --program-tran=* \
1006 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001009 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1010 ac_prev=pdfdir ;;
1011 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1012 pdfdir=$ac_optarg ;;
1013
1014 -psdir | --psdir | --psdi | --psd | --ps)
1015 ac_prev=psdir ;;
1016 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1017 psdir=$ac_optarg ;;
1018
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1020 | -silent | --silent | --silen | --sile | --sil)
1021 silent=yes ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1024 ac_prev=sbindir ;;
1025 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1026 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1030 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1031 | --sharedst | --shareds | --shared | --share | --shar \
1032 | --sha | --sh)
1033 ac_prev=sharedstatedir ;;
1034 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1035 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1036 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1037 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 -site | --site | --sit)
1041 ac_prev=site ;;
1042 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1046 ac_prev=srcdir ;;
1047 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1051 | --syscon | --sysco | --sysc | --sys | --sy)
1052 ac_prev=sysconfdir ;;
1053 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1054 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1063 verbose=yes ;;
1064
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 -version | --version | --versio | --versi | --vers | -V)
1066 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -with-* | --with-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001069 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001071 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1072 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001074 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1075 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -without-* | --without-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001078 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001080 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1081 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001083 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1084 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 --x)
1087 # Obsolete; use --with-x.
1088 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1091 | --x-incl | --x-inc | --x-in | --x-i)
1092 ac_prev=x_includes ;;
1093 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1094 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1098 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1099 ac_prev=x_libraries ;;
1100 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1101 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001104 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001105Try \`$0 --help' for more information." >&2
1106 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 ;;
1108
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 *=*)
1110 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1111 # Reject names that are not valid shell variable names.
1112 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001113 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001115 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 export $ac_envvar ;;
1117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001120 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001122 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 ;;
1125
1126 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001127done
1128
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001131 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133fi
1134
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001135# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001136for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1137 datadir sysconfdir sharedstatedir localstatedir includedir \
1138 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1139 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001141 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001143 [\\/$]* | ?:[\\/]* ) continue;;
1144 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001146 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001147 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001148done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001149
Martin v. Löwis11437992002-04-12 09:54:03 +00001150# There might be people who depend on the old broken behavior: `$host'
1151# used to hold the argument of --host etc.
1152# FIXME: To remove some day.
1153build=$build_alias
1154host=$host_alias
1155target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157# FIXME: To remove some day.
1158if test "x$host_alias" != x; then
1159 if test "x$build_alias" = x; then
1160 cross_compiling=maybe
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001161 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 +00001162 If a cross compiler is detected then cross compile mode will be used." >&2
1163 elif test "x$build_alias" != "x$host_alias"; then
1164 cross_compiling=yes
1165 fi
1166fi
1167
1168ac_tool_prefix=
1169test -n "$host_alias" && ac_tool_prefix=$host_alias-
1170
1171test "$silent" = yes && exec 6>/dev/null
1172
Guido van Rossum627b2d71993-12-24 10:39:16 +00001173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001174ac_pwd=`pwd` && test -n "$ac_pwd" &&
1175ac_ls_di=`ls -di .` &&
1176ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001177 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 { (exit 1); exit 1; }; }
1179test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001180 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001181 { (exit 1); exit 1; }; }
1182
1183
Guido van Rossum627b2d71993-12-24 10:39:16 +00001184# Find the source files, if location was not specified.
1185if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001187 # Try the directory containing this script, then the parent directory.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001188 ac_confdir=`$as_dirname -- "$0" ||
1189$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1190 X"$0" : 'X\(//\)[^/]' \| \
1191 X"$0" : 'X\(//\)$' \| \
1192 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1193echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001194 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)[^/].*/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\/\)$/{
1203 s//\1/
1204 q
1205 }
1206 /^X\(\/\).*/{
1207 s//\1/
1208 q
1209 }
1210 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001212 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213 srcdir=..
1214 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215else
1216 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001218if test ! -r "$srcdir/$ac_unique_file"; then
1219 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001220 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001223ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1224ac_abs_confdir=`(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001225 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001226 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001227 pwd)`
1228# When building in place, set srcdir=.
1229if test "$ac_abs_confdir" = "$ac_pwd"; then
1230 srcdir=.
1231fi
1232# Remove unnecessary trailing slashes from srcdir.
1233# Double slashes in file names in object file debugging info
1234# mess up M-x gdb in Emacs.
1235case $srcdir in
1236*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1237esac
1238for ac_var in $ac_precious_vars; do
1239 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_env_${ac_var}_value=\$${ac_var}
1241 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1242 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1243done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244
Martin v. Löwis11437992002-04-12 09:54:03 +00001245#
1246# Report the --help message.
1247#
1248if test "$ac_init_help" = "long"; then
1249 # Omit some internal or obsolete options to make the list less imposing.
1250 # This message is too long to be a string in the A/UX 3.1 sh.
1251 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001252\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
1254Usage: $0 [OPTION]... [VAR=VALUE]...
1255
1256To assign environment variables (e.g., CC, CFLAGS...), specify them as
1257VAR=VALUE. See below for descriptions of some of the useful variables.
1258
1259Defaults for the options are specified in brackets.
1260
1261Configuration:
1262 -h, --help display this help and exit
1263 --help=short display options specific to this package
1264 --help=recursive display the short help of all the included packages
1265 -V, --version display version information and exit
1266 -q, --quiet, --silent do not print \`checking...' messages
1267 --cache-file=FILE cache test results in FILE [disabled]
1268 -C, --config-cache alias for \`--cache-file=config.cache'
1269 -n, --no-create do not create output files
1270 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272Installation directories:
1273 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001274 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001276 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001277
1278By default, \`make install' will install all the files in
1279\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1280an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1281for instance \`--prefix=\$HOME'.
1282
1283For better control, use the options below.
1284
1285Fine tuning of the installation directories:
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001286 --bindir=DIR user executables [EPREFIX/bin]
1287 --sbindir=DIR system admin executables [EPREFIX/sbin]
1288 --libexecdir=DIR program executables [EPREFIX/libexec]
1289 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1290 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1291 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1292 --libdir=DIR object code libraries [EPREFIX/lib]
1293 --includedir=DIR C header files [PREFIX/include]
1294 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1295 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1296 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1297 --infodir=DIR info documentation [DATAROOTDIR/info]
1298 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1299 --mandir=DIR man documentation [DATAROOTDIR/man]
1300 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1301 --htmldir=DIR html documentation [DOCDIR]
1302 --dvidir=DIR dvi documentation [DOCDIR]
1303 --pdfdir=DIR pdf documentation [DOCDIR]
1304 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001305_ACEOF
1306
1307 cat <<\_ACEOF
1308_ACEOF
1309fi
1310
1311if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001313 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001314 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 cat <<\_ACEOF
1316
1317Optional Features:
1318 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1319 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001320 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001321 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --enable-framework[=INSTALLDIR]
1323 Build (MacOSX|Darwin) framework
1324 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001325 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001326 --enable-ipv6 Enable ipv6 (with ipv4) support
1327 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001328 --enable-big-digits[=BITS]
1329 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001330
1331Optional Packages:
1332 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1333 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001334 --with-universal-archs=ARCH
1335 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001336 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001337 --with-framework-name=FRAMEWORK
1338 specify an alternate name of the framework built
1339 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001340 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001341 --with-cxx-main=<compiler>
1342 compile main() and link python executable with C++
1343 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001344 --with-suffix=.exe set executable suffix
1345 --with-pydebug build with Py_DEBUG defined
1346 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001347 --with-system-expat build pyexpat module using an installed expat
1348 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001349 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001350 --with-dbmliborder=db1:db2:...
1351 order to check db backends for dbm. Valid value is a
1352 colon separated string with the backend names
1353 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001354 --with-signal-module disable/enable signal module
1355 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1356 --with(out)-threads[=DIRECTORY]
1357 disable/enable thread support
1358 --with(out)-thread[=DIRECTORY]
1359 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001361 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001363 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001364 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001365 --with-fpectl enable SIGFPE catching
1366 --with-libm=STRING math library
1367 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001368 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001369 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1370 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001371
1372Some influential environment variables:
1373 CC C compiler command
1374 CFLAGS C compiler flags
1375 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1376 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377 LIBS libraries to pass to the linker, e.g. -l<library>
1378 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1379 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001380 CPP C preprocessor
1381
1382Use these variables to override the choices made by `configure' or to help
1383it to find libraries and programs with nonstandard names/locations.
1384
Georg Brandle2e15612009-05-20 18:25:10 +00001385Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001386_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001387ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001388fi
1389
1390if test "$ac_init_help" = "recursive"; then
1391 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001393 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001394 ac_builddir=.
1395
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001396case "$ac_dir" in
1397.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1398*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001399 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001400 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001401 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001402 case $ac_top_builddir_sub in
1403 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1404 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1405 esac ;;
1406esac
1407ac_abs_top_builddir=$ac_pwd
1408ac_abs_builddir=$ac_pwd$ac_dir_suffix
1409# for backward compatibility:
1410ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001411
1412case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001413 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001415 ac_top_srcdir=$ac_top_builddir_sub
1416 ac_abs_top_srcdir=$ac_pwd ;;
1417 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001419 ac_top_srcdir=$srcdir
1420 ac_abs_top_srcdir=$srcdir ;;
1421 *) # Relative name.
1422 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1423 ac_top_srcdir=$ac_top_build_prefix$srcdir
1424 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001425esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001426ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001428 cd "$ac_dir" || { ac_status=$?; continue; }
1429 # Check for guested configure.
1430 if test -f "$ac_srcdir/configure.gnu"; then
1431 echo &&
1432 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1433 elif test -f "$ac_srcdir/configure"; then
1434 echo &&
1435 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001437 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438 fi || ac_status=$?
1439 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 done
1441fi
1442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001444if $ac_init_version; then
1445 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001446python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001447generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014502002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001451This configure script is free software; the Free Software Foundation
1452gives unlimited permission to copy, distribute and modify it.
1453_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001454 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001456cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001457This file contains any messages produced by compilers while
1458running configure, to aid debugging if configure makes a mistake.
1459
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001460It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001461generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001462
1463 $ $0 $@
1464
1465_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001466exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001467{
1468cat <<_ASUNAME
1469## --------- ##
1470## Platform. ##
1471## --------- ##
1472
1473hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1474uname -m = `(uname -m) 2>/dev/null || echo unknown`
1475uname -r = `(uname -r) 2>/dev/null || echo unknown`
1476uname -s = `(uname -s) 2>/dev/null || echo unknown`
1477uname -v = `(uname -v) 2>/dev/null || echo unknown`
1478
1479/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1480/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1481
1482/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1483/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1484/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001486/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1487/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1488/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1489
1490_ASUNAME
1491
1492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1493for as_dir in $PATH
1494do
1495 IFS=$as_save_IFS
1496 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001497 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001498done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001500
1501} >&5
1502
1503cat >&5 <<_ACEOF
1504
1505
1506## ----------- ##
1507## Core tests. ##
1508## ----------- ##
1509
1510_ACEOF
1511
1512
1513# Keep a trace of the command line.
1514# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001515# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001517# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001518ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001519ac_configure_args0=
1520ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001521ac_must_keep_next=false
1522for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001523do
Skip Montanaro6dead952003-09-25 14:50:04 +00001524 for ac_arg
1525 do
1526 case $ac_arg in
1527 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1528 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1529 | -silent | --silent | --silen | --sile | --sil)
1530 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001531 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001532 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001533 esac
1534 case $ac_pass in
1535 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1536 2)
1537 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1538 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001540 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001541 case $ac_arg in
1542 *=* | --config-cache | -C | -disable-* | --disable-* \
1543 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1544 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1545 | -with-* | --with-* | -without-* | --without-* | --x)
1546 case "$ac_configure_args0 " in
1547 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1548 esac
1549 ;;
1550 -* ) ac_must_keep_next=true ;;
1551 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001552 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001554 ;;
1555 esac
1556 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001557done
Skip Montanaro6dead952003-09-25 14:50:04 +00001558$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1559$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 +00001560
1561# When interrupted or exit'd, cleanup temporary files, and complete
1562# config.log. We remove comments because anyway the quotes in there
1563# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001564# WARNING: Use '\'' to represent an apostrophe within the trap.
1565# 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 +00001566trap 'exit_status=$?
1567 # Save into config.log some information that might help in debugging.
1568 {
1569 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001570
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 cat <<\_ASBOX
1572## ---------------- ##
1573## Cache variables. ##
1574## ---------------- ##
1575_ASBOX
1576 echo
1577 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578(
1579 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1580 eval ac_val=\$$ac_var
1581 case $ac_val in #(
1582 *${as_nl}*)
1583 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001584 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1585echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 esac
1587 case $ac_var in #(
1588 _ | IFS | as_nl) ;; #(
1589 *) $as_unset $ac_var ;;
1590 esac ;;
1591 esac
1592 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1595 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 "s/'\''/'\''\\\\'\'''\''/g;
1598 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1599 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001600 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001602 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 esac |
1604 sort
1605)
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001607
1608 cat <<\_ASBOX
1609## ----------------- ##
1610## Output variables. ##
1611## ----------------- ##
1612_ASBOX
1613 echo
1614 for ac_var in $ac_subst_vars
1615 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 eval ac_val=\$$ac_var
1617 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001618 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001619 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001620 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001621 done | sort
1622 echo
1623
1624 if test -n "$ac_subst_files"; then
1625 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626## ------------------- ##
1627## File substitutions. ##
1628## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001629_ASBOX
1630 echo
1631 for ac_var in $ac_subst_files
1632 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 eval ac_val=\$$ac_var
1634 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001635 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001637 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001638 done | sort
1639 echo
1640 fi
1641
Martin v. Löwis11437992002-04-12 09:54:03 +00001642 if test -s confdefs.h; then
1643 cat <<\_ASBOX
1644## ----------- ##
1645## confdefs.h. ##
1646## ----------- ##
1647_ASBOX
1648 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001649 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 echo
1651 fi
1652 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001653 echo "$as_me: caught signal $ac_signal"
1654 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001656 rm -f core *.core core.conftest.* &&
1657 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001658 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001659' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001660for ac_signal in 1 2 13 15; do
1661 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1662done
1663ac_signal=0
1664
1665# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001666rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001667
1668# Predefined preprocessor variables.
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_NAME "$PACKAGE_NAME"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_VERSION "$PACKAGE_VERSION"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_STRING "$PACKAGE_STRING"
1687_ACEOF
1688
1689
1690cat >>confdefs.h <<_ACEOF
1691#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1692_ACEOF
1693
1694
1695# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001696# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001697if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001698 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001699elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001700 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001701else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001702 set x "$ac_default_prefix/share/config.site" \
1703 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001705shift
1706for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001707do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001709 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1710echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001711 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712 . "$ac_site_file"
1713 fi
1714done
1715
1716if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 # Some versions of bash will fail to source /dev/null (special
1718 # files actually), so we avoid doing that.
1719 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001720 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1721echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001723 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1724 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 esac
1726 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001727else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001728 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1729echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001730 >$cache_file
1731fi
1732
1733# Check that the precious variables saved in the cache have kept the same
1734# value.
1735ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001736for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001737 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1738 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001739 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1740 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 case $ac_old_set,$ac_new_set in
1742 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001743 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1744echo "$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 +00001745 ac_cache_corrupted=: ;;
1746 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001747 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1748echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001749 ac_cache_corrupted=: ;;
1750 ,);;
1751 *)
1752 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001753 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1754echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1755 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1756echo "$as_me: former value: $ac_old_val" >&2;}
1757 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1758echo "$as_me: current value: $ac_new_val" >&2;}
1759 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001760 fi;;
1761 esac
1762 # Pass precious variables to config.status.
1763 if test "$ac_new_set" = set; then
1764 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001765 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001766 *) ac_arg=$ac_var=$ac_new_val ;;
1767 esac
1768 case " $ac_configure_args " in
1769 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1770 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1771 esac
1772 fi
1773done
1774if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001775 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1776echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1777 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1778echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001779 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001780fi
1781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
Guido van Rossum7f43da71994-08-01 12:15:30 +00001806ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001807ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001808ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1809ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1810ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811
Guido van Rossum627b2d71993-12-24 10:39:16 +00001812
Michael W. Hudson54241132001-12-07 15:38:26 +00001813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001814ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
1816
Martin v. Löwis11437992002-04-12 09:54:03 +00001817
Benjamin Petersond23f8222009-04-05 19:13:16 +00001818if test "$prefix" != "/"; then
1819 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1820fi
1821
1822
Martin v. Löwis11437992002-04-12 09:54:03 +00001823
1824
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001825
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001826
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001827# We don't use PACKAGE_ variables, and they cause conflicts
1828# with other autoconf-based packages that include Python.h
1829grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1830rm confdefs.h
1831mv confdefs.h.new confdefs.h
1832
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001833
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001834VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001835
Martin v. Löwis1142de32002-03-29 16:28:31 +00001836
1837SOVERSION=1.0
1838
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001839# The later defininition of _XOPEN_SOURCE disables certain features
1840# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1841
1842cat >>confdefs.h <<\_ACEOF
1843#define _GNU_SOURCE 1
1844_ACEOF
1845
1846
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001847# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1848# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1849# them.
1850
1851cat >>confdefs.h <<\_ACEOF
1852#define _NETBSD_SOURCE 1
1853_ACEOF
1854
1855
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001856# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1857# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1858# them.
1859
1860cat >>confdefs.h <<\_ACEOF
1861#define __BSD_VISIBLE 1
1862_ACEOF
1863
1864
Martin v. Löwisd6320502004-08-12 13:45:08 +00001865# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1866# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1867
1868cat >>confdefs.h <<\_ACEOF
1869#define _BSD_TYPES 1
1870_ACEOF
1871
1872
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001873# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1874# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1875# them.
1876
1877cat >>confdefs.h <<\_ACEOF
1878#define _DARWIN_C_SOURCE 1
1879_ACEOF
1880
1881
1882
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001883define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001884
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001885# Arguments passed to configure.
1886
1887CONFIG_ARGS="$ac_configure_args"
1888
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001889{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1890echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001891# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001892if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001893 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001894 case $enableval in
1895 yes)
1896 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001897 if test ! -d "${enableval}"
1898 then
1899 enableval=/
1900 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001901 ;;
1902 esac
1903 case $enableval in
1904 no)
1905 UNIVERSALSDK=
1906 enable_universalsdk=
1907 ;;
1908 *)
1909 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001910 if test ! -d "${UNIVERSALSDK}"
1911 then
1912 { { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
1913echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
1914 { (exit 1); exit 1; }; }
1915 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001916 ;;
1917 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001918
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001919
Thomas Wouters477c8d52006-05-27 19:21:47 +00001920else
1921
1922 UNIVERSALSDK=
1923 enable_universalsdk=
1924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001925fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001926
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001927if test -n "${UNIVERSALSDK}"
1928then
1929 { echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
1930echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
1931else
1932 { echo "$as_me:$LINENO: result: no" >&5
1933echo "${ECHO_T}no" >&6; }
1934fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001936
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001937
1938
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001939UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00001940
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001941{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1942echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001943
1944# Check whether --with-universal-archs was given.
1945if test "${with_universal_archs+set}" = set; then
1946 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001947 { echo "$as_me:$LINENO: result: $withval" >&5
1948echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001949 UNIVERSAL_ARCHS="$withval"
1950
1951else
1952
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001953 { echo "$as_me:$LINENO: result: 32-bit" >&5
1954echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001955
1956fi
1957
1958
1959
1960
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001961
1962# Check whether --with-framework-name was given.
1963if test "${with_framework_name+set}" = set; then
1964 withval=$with_framework_name;
1965 PYTHONFRAMEWORK=${withval}
1966 PYTHONFRAMEWORKDIR=${withval}.framework
1967 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1968
1969else
1970
1971 PYTHONFRAMEWORK=Python
1972 PYTHONFRAMEWORKDIR=Python.framework
1973 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1974
1975fi
1976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001977# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001978if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001979 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001980 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001981 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001982 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001983 esac
1984 case $enableval in
1985 no)
1986 PYTHONFRAMEWORK=
1987 PYTHONFRAMEWORKDIR=no-framework
1988 PYTHONFRAMEWORKPREFIX=
1989 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001990 FRAMEWORKINSTALLFIRST=
1991 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001992 FRAMEWORKALTINSTALLFIRST=
1993 FRAMEWORKALTINSTALLLAST=
1994 if test "x${prefix}" = "xNONE"; then
1995 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1996 else
1997 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1998 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001999 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002000 ;;
2001 *)
2002 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002003 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002004 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002005 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002006 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2007 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002008
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002009 if test "x${prefix}" = "xNONE" ; then
2010 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2011 else
2012 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2013 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002014 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002015
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002016 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002017 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002018 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002020 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002021
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002022 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2023
2024 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2025
Jack Jansene578a632001-08-15 01:27:14 +00002026 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002027
Guido van Rossum563e7081996-09-10 18:20:48 +00002028else
Martin v. Löwis11437992002-04-12 09:54:03 +00002029
Jack Jansene578a632001-08-15 01:27:14 +00002030 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002031 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002032 PYTHONFRAMEWORKPREFIX=
2033 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002034 FRAMEWORKINSTALLFIRST=
2035 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002036 FRAMEWORKALTINSTALLFIRST=
2037 FRAMEWORKALTINSTALLLAST=
2038 if test "x${prefix}" = "xNONE" ; then
2039 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2040 else
2041 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2042 fi
Jack Jansene578a632001-08-15 01:27:14 +00002043 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002044
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002046fi
2047
Thomas Wouters477c8d52006-05-27 19:21:47 +00002048
2049
Michael W. Hudson54241132001-12-07 15:38:26 +00002050
2051
2052
2053
Jack Jansene578a632001-08-15 01:27:14 +00002054
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002055
2056
2057
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002058
Jack Jansene578a632001-08-15 01:27:14 +00002059##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002060## AC_HELP_STRING(--with-dyld,
2061## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002062##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002063# Set name for machine-dependent library files
2064
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002065{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2066echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002067if test -z "$MACHDEP"
2068then
Guido van Rossum563e7081996-09-10 18:20:48 +00002069 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002070 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002071 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002072 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002073 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002074 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002075 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002076 ac_md_system=`echo $ac_sys_system |
2077 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2078 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002079 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002080 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002081
Guido van Rossum07397971997-04-29 21:49:50 +00002082 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002083 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002084 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002085 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002086 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002087 esac
2088fi
Guido van Rossum91922671997-10-09 20:24:13 +00002089
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002090# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2091# disable features if it is defined, without any means to access these
2092# features as extensions. For these systems, we skip the definition of
2093# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2094# some feature, make sure there is no alternative way to access this
2095# feature. Also, when using wildcards, make sure you have verified the
2096# need for not defining _XOPEN_SOURCE on all systems matching the
2097# wildcard, and that the wildcard does not include future systems
2098# (which may remove their limitations).
2099case $ac_sys_system/$ac_sys_release in
2100 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2101 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002102 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002103 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002104 define_xopen_source=no
2105 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2106 # also defined. This can be overridden by defining _BSD_SOURCE
2107 # As this has a different meaning on Linux, only define it on OpenBSD
2108
2109cat >>confdefs.h <<\_ACEOF
2110#define _BSD_SOURCE 1
2111_ACEOF
2112
2113 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002114 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2115 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2116 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002117 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 +00002118 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002119 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2120 # of union __?sigval. Reported by Stuart Bishop.
2121 SunOS/5.6)
2122 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002123 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2124 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002125 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002126 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002127 define_xopen_source=no;;
2128 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002129 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002130 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002131 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002132 # On FreeBSD 4, the math functions C89 does not cover are never defined
2133 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2134 FreeBSD/4.*)
2135 define_xopen_source=no;;
2136 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2137 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2138 # identifies itself as Darwin/7.*
2139 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2140 # disables platform specific features beyond repair.
2141 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2142 # has no effect, don't bother defining them
2143 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002144 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002145 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2146 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2147 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002148 AIX/4)
2149 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002150 AIX/5)
2151 if test `uname -r` -eq 1; then
2152 define_xopen_source=no
2153 fi
2154 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002155 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2156 # defining NI_NUMERICHOST.
2157 QNX/6.3.2)
2158 define_xopen_source=no
2159 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002160
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002161esac
2162
2163if test $define_xopen_source = yes
2164then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002165 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2166 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002167 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2168 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002169 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002170 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002171
2172cat >>confdefs.h <<\_ACEOF
2173#define _XOPEN_SOURCE 500
2174_ACEOF
2175
2176 ;;
2177 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002178
2179cat >>confdefs.h <<\_ACEOF
2180#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002181_ACEOF
2182
Skip Montanarof0d5f792004-08-15 14:08:23 +00002183 ;;
2184 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002185
2186 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2187 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2188 # several APIs are not declared. Since this is also needed in some
2189 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002190 # except for Solaris 10, where it must not be defined,
2191 # as it implies XPG4.2
2192 case $ac_sys_system/$ac_sys_release in
2193 SunOS/5.10)
2194 ;;
2195 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002196
2197cat >>confdefs.h <<\_ACEOF
2198#define _XOPEN_SOURCE_EXTENDED 1
2199_ACEOF
2200
Martin v. Löwis7dece662005-11-26 11:38:24 +00002201 ;;
2202 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002203
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002204
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002205cat >>confdefs.h <<\_ACEOF
2206#define _POSIX_C_SOURCE 200112L
2207_ACEOF
2208
2209
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002210fi
2211
Guido van Rossum91922671997-10-09 20:24:13 +00002212#
2213# SGI compilers allow the specification of the both the ABI and the
2214# ISA on the command line. Depending on the values of these switches,
2215# different and often incompatable code will be generated.
2216#
2217# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2218# thus supply support for various ABI/ISA combinations. The MACHDEP
2219# variable is also adjusted.
2220#
2221
2222if test ! -z "$SGI_ABI"
2223then
2224 CC="cc $SGI_ABI"
2225 LDFLAGS="$SGI_ABI $LDFLAGS"
2226 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2227fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002228{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2229echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002230
Jack Jansen6b08a402004-06-03 12:41:45 +00002231# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2232# it may influence the way we can build extensions, so distutils
2233# needs to check it
2234
Thomas Wouters477c8d52006-05-27 19:21:47 +00002235
Jack Jansen6b08a402004-06-03 12:41:45 +00002236CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002237EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002238
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002239{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2240echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002241ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002242{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2243echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002244
Guido van Rossum627b2d71993-12-24 10:39:16 +00002245# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002246
2247# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2248# for debug/optimization stuff. BASECFLAGS is for flags that are required
2249# just to get things to compile and link. Users are free to override OPT
2250# when running configure or make. The build should not break if they do.
2251# BASECFLAGS should generally not be messed with, however.
2252
2253# XXX shouldn't some/most/all of this code be merged with the stuff later
2254# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002255{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2256echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002258# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002259if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002260 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002261 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002262 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002263 without_gcc=yes;;
2264 yes) CC=gcc
2265 without_gcc=no;;
2266 *) CC=$withval
2267 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002268 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002269else
Martin v. Löwis11437992002-04-12 09:54:03 +00002270
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002271 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002272 AIX*) CC=cc_r
2273 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002274 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002275 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002276fi
2277
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002278{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2279echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002280
Guido van Rossum8b131c51995-03-09 14:10:13 +00002281# If the user switches compilers, we can't believe the cache
2282if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2283then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002284 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002285(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002286echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002287(it is also a good idea to do 'make clean' before compiling)" >&2;}
2288 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002289fi
2290
Martin v. Löwis11437992002-04-12 09:54:03 +00002291ac_ext=c
2292ac_cpp='$CPP $CPPFLAGS'
2293ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2294ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2295ac_compiler_gnu=$ac_cv_c_compiler_gnu
2296if test -n "$ac_tool_prefix"; then
2297 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2298set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002299{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2300echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002301if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002302 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002303else
2304 if test -n "$CC"; then
2305 ac_cv_prog_CC="$CC" # Let the user override the test.
2306else
Martin v. Löwis11437992002-04-12 09:54:03 +00002307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2308for as_dir in $PATH
2309do
2310 IFS=$as_save_IFS
2311 test -z "$as_dir" && as_dir=.
2312 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002313 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 +00002314 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002315 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002316 break 2
2317 fi
2318done
2319done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002320IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002321
Jack Jansendd19cf82001-12-06 22:36:17 +00002322fi
2323fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002324CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002325if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002326 { echo "$as_me:$LINENO: result: $CC" >&5
2327echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002328else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002329 { echo "$as_me:$LINENO: result: no" >&5
2330echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002331fi
2332
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002333
Martin v. Löwis11437992002-04-12 09:54:03 +00002334fi
2335if test -z "$ac_cv_prog_CC"; then
2336 ac_ct_CC=$CC
2337 # Extract the first word of "gcc", so it can be a program name with args.
2338set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002339{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2340echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002341if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002342 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002343else
2344 if test -n "$ac_ct_CC"; then
2345 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2346else
2347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2348for as_dir in $PATH
2349do
2350 IFS=$as_save_IFS
2351 test -z "$as_dir" && as_dir=.
2352 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002353 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 +00002354 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002355 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002356 break 2
2357 fi
2358done
2359done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002360IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002361
2362fi
2363fi
2364ac_ct_CC=$ac_cv_prog_ac_ct_CC
2365if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002366 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2367echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002368else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002369 { echo "$as_me:$LINENO: result: no" >&5
2370echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002371fi
2372
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002373 if test "x$ac_ct_CC" = x; then
2374 CC=""
2375 else
2376 case $cross_compiling:$ac_tool_warned in
2377yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002378{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2379whose name does not start with the host triplet. If you think this
2380configuration is useful to you, please write to autoconf@gnu.org." >&5
2381echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2382whose name does not start with the host triplet. If you think this
2383configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002384ac_tool_warned=yes ;;
2385esac
2386 CC=$ac_ct_CC
2387 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002388else
2389 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002390fi
2391
Jack Jansendd19cf82001-12-06 22:36:17 +00002392if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002393 if test -n "$ac_tool_prefix"; then
2394 # 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 +00002395set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002396{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2397echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002398if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002399 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002400else
2401 if test -n "$CC"; then
2402 ac_cv_prog_CC="$CC" # Let the user override the test.
2403else
Martin v. Löwis11437992002-04-12 09:54:03 +00002404as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2405for as_dir in $PATH
2406do
2407 IFS=$as_save_IFS
2408 test -z "$as_dir" && as_dir=.
2409 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410 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 +00002411 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002412 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002413 break 2
2414 fi
2415done
2416done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002417IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002418
2419fi
2420fi
2421CC=$ac_cv_prog_CC
2422if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002423 { echo "$as_me:$LINENO: result: $CC" >&5
2424echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002425else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002426 { echo "$as_me:$LINENO: result: no" >&5
2427echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002428fi
2429
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002430
Martin v. Löwis11437992002-04-12 09:54:03 +00002431 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002432fi
2433if test -z "$CC"; then
2434 # Extract the first word of "cc", so it can be a program name with args.
2435set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002436{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2437echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002438if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002439 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002440else
2441 if test -n "$CC"; then
2442 ac_cv_prog_CC="$CC" # Let the user override the test.
2443else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002444 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2446for as_dir in $PATH
2447do
2448 IFS=$as_save_IFS
2449 test -z "$as_dir" && as_dir=.
2450 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002451 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 +00002452 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2453 ac_prog_rejected=yes
2454 continue
2455 fi
2456 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002457 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002458 break 2
2459 fi
2460done
2461done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002463
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002464if test $ac_prog_rejected = yes; then
2465 # We found a bogon in the path, so make sure we never use it.
2466 set dummy $ac_cv_prog_CC
2467 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002469 # We chose a different compiler from the bogus one.
2470 # However, it has the same basename, so the bogon will be chosen
2471 # first if we set CC to just the basename; use the full file name.
2472 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002473 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002474 fi
2475fi
2476fi
2477fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002478CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002479if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002480 { echo "$as_me:$LINENO: result: $CC" >&5
2481echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002482else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002483 { echo "$as_me:$LINENO: result: no" >&5
2484echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002485fi
2486
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487
Martin v. Löwis11437992002-04-12 09:54:03 +00002488fi
2489if test -z "$CC"; then
2490 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002492 do
2493 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2494set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002495{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2496echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002497if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002498 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002499else
2500 if test -n "$CC"; then
2501 ac_cv_prog_CC="$CC" # Let the user override the test.
2502else
Martin v. Löwis11437992002-04-12 09:54:03 +00002503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2504for as_dir in $PATH
2505do
2506 IFS=$as_save_IFS
2507 test -z "$as_dir" && as_dir=.
2508 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 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 +00002510 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002511 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002512 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002513 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002514done
2515done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002517
2518fi
2519fi
2520CC=$ac_cv_prog_CC
2521if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002522 { echo "$as_me:$LINENO: result: $CC" >&5
2523echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002524else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002525 { echo "$as_me:$LINENO: result: no" >&5
2526echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002527fi
2528
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 test -n "$CC" && break
2531 done
2532fi
2533if test -z "$CC"; then
2534 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002536do
2537 # Extract the first word of "$ac_prog", so it can be a program name with args.
2538set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002539{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2540echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002541if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002542 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002543else
2544 if test -n "$ac_ct_CC"; then
2545 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2546else
2547as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2548for as_dir in $PATH
2549do
2550 IFS=$as_save_IFS
2551 test -z "$as_dir" && as_dir=.
2552 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553 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 +00002554 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002555 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002556 break 2
2557 fi
2558done
2559done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002560IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562fi
2563fi
2564ac_ct_CC=$ac_cv_prog_ac_ct_CC
2565if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002566 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2567echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002568else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002569 { echo "$as_me:$LINENO: result: no" >&5
2570echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002571fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 test -n "$ac_ct_CC" && break
2575done
Michael W. Hudson54241132001-12-07 15:38:26 +00002576
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577 if test "x$ac_ct_CC" = x; then
2578 CC=""
2579 else
2580 case $cross_compiling:$ac_tool_warned in
2581yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002582{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2583whose name does not start with the host triplet. If you think this
2584configuration is useful to you, please write to autoconf@gnu.org." >&5
2585echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2586whose name does not start with the host triplet. If you think this
2587configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588ac_tool_warned=yes ;;
2589esac
2590 CC=$ac_ct_CC
2591 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002592fi
2593
2594fi
2595
2596
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002597test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002598See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002599echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002600See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002601 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002602
2603# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002604echo "$as_me:$LINENO: checking for C compiler version" >&5
2605ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606{ (ac_try="$ac_compiler --version >&5"
2607case "(($ac_try" in
2608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2609 *) ac_try_echo=$ac_try;;
2610esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002612 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616{ (ac_try="$ac_compiler -v >&5"
2617case "(($ac_try" in
2618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2619 *) ac_try_echo=$ac_try;;
2620esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626{ (ac_try="$ac_compiler -V >&5"
2627case "(($ac_try" in
2628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2629 *) ac_try_echo=$ac_try;;
2630esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 (exit $ac_status); }
2636
2637cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002638/* confdefs.h. */
2639_ACEOF
2640cat confdefs.h >>conftest.$ac_ext
2641cat >>conftest.$ac_ext <<_ACEOF
2642/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002643
Martin v. Löwis11437992002-04-12 09:54:03 +00002644int
2645main ()
2646{
2647
2648 ;
2649 return 0;
2650}
2651_ACEOF
2652ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002653ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002654# Try to create an executable without -o first, disregard a.out.
2655# It will help us diagnose broken compilers, and finding out an intuition
2656# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002657{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2658echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2659ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2660#
2661# List of possible output files, starting from the most likely.
2662# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2663# only as a last resort. b.out is created by i960 compilers.
2664ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2665#
2666# The IRIX 6 linker writes into existing files which may not be
2667# executable, retaining their permissions. Remove them first so a
2668# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002669ac_rmfiles=
2670for ac_file in $ac_files
2671do
2672 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002673 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002674 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2675 esac
2676done
2677rm -f $ac_rmfiles
2678
2679if { (ac_try="$ac_link_default"
2680case "(($ac_try" in
2681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2682 *) ac_try_echo=$ac_try;;
2683esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002685 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002686 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002688 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002689 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2690# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2691# in a Makefile. We should not override ac_cv_exeext if it was cached,
2692# so that the user can short-circuit this test for compilers unknown to
2693# Autoconf.
2694for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002695do
2696 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002697 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002698 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002699 ;;
2700 [ab].out )
2701 # We found the default executable, but exeext='' is most
2702 # certainly right.
2703 break;;
2704 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002705 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2706 then :; else
2707 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2708 fi
2709 # We set ac_cv_exeext here because the later test for it is not
2710 # safe: cross compilers may not add the suffix if given an `-o'
2711 # argument, so we may need to know it at that point already.
2712 # Even if this section looks crufty: it has the advantage of
2713 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002714 break;;
2715 * )
2716 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002717 esac
2718done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002719test "$ac_cv_exeext" = no && ac_cv_exeext=
2720
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002721else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002722 ac_file=''
2723fi
2724
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002725{ echo "$as_me:$LINENO: result: $ac_file" >&5
2726echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002727if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002729sed 's/^/| /' conftest.$ac_ext >&5
2730
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002731{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002732See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002733echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002734See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002735 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002736fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002737
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002738ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002739
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002740# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002741# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002742{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2743echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002744# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2745# If not cross compiling, check that we can run a simple program.
2746if test "$cross_compiling" != yes; then
2747 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002748 { (case "(($ac_try" in
2749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2750 *) ac_try_echo=$ac_try;;
2751esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002753 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002754 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002756 (exit $ac_status); }; }; then
2757 cross_compiling=no
2758 else
2759 if test "$cross_compiling" = maybe; then
2760 cross_compiling=yes
2761 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002762 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002763If you meant to cross compile, use \`--host'.
2764See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002765echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002766If you meant to cross compile, use \`--host'.
2767See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002768 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002769 fi
2770 fi
2771fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002772{ echo "$as_me:$LINENO: result: yes" >&5
2773echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002774
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002775rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002776ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002777# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002778# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002779{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2780echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2781{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2782echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002783
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002784{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2785echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002786if { (ac_try="$ac_link"
2787case "(($ac_try" in
2788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2789 *) ac_try_echo=$ac_try;;
2790esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002792 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002793 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002795 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002796 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2797# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2798# work properly (i.e., refer to `conftest.exe'), while it won't with
2799# `rm'.
2800for ac_file in conftest.exe conftest conftest.*; do
2801 test -f "$ac_file" || continue
2802 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002803 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002804 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2805 break;;
2806 * ) break;;
2807 esac
2808done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002809else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002810 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002811See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002812echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002813See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002814 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002815fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002816
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002817rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002818{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2819echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002820
2821rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002822EXEEXT=$ac_cv_exeext
2823ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002824{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2825echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002826if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002827 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002828else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002829 cat >conftest.$ac_ext <<_ACEOF
2830/* confdefs.h. */
2831_ACEOF
2832cat confdefs.h >>conftest.$ac_ext
2833cat >>conftest.$ac_ext <<_ACEOF
2834/* end confdefs.h. */
2835
2836int
2837main ()
2838{
2839
2840 ;
2841 return 0;
2842}
2843_ACEOF
2844rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002845if { (ac_try="$ac_compile"
2846case "(($ac_try" in
2847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2848 *) ac_try_echo=$ac_try;;
2849esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002851 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002852 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002854 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002855 for ac_file in conftest.o conftest.obj conftest.*; do
2856 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002857 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002858 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002859 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2860 break;;
2861 esac
2862done
2863else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002864 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002865sed 's/^/| /' conftest.$ac_ext >&5
2866
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002867{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002868See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002869echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002870See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002871 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002872fi
2873
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002874rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002875fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002876{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2877echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002878OBJEXT=$ac_cv_objext
2879ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002880{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2881echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002882if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002883 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002884else
2885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002886/* confdefs.h. */
2887_ACEOF
2888cat confdefs.h >>conftest.$ac_ext
2889cat >>conftest.$ac_ext <<_ACEOF
2890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002891
Martin v. Löwis11437992002-04-12 09:54:03 +00002892int
2893main ()
2894{
2895#ifndef __GNUC__
2896 choke me
2897#endif
2898
2899 ;
2900 return 0;
2901}
2902_ACEOF
2903rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002904if { (ac_try="$ac_compile"
2905case "(($ac_try" in
2906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2907 *) ac_try_echo=$ac_try;;
2908esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002912 grep -v '^ *+' conftest.er1 >conftest.err
2913 rm -f conftest.er1
2914 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002916 (exit $ac_status); } && {
2917 test -z "$ac_c_werror_flag" ||
2918 test ! -s conftest.err
2919 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002920 ac_compiler_gnu=yes
2921else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002923sed 's/^/| /' conftest.$ac_ext >&5
2924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002925 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002927
2928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002929ac_cv_c_compiler_gnu=$ac_compiler_gnu
2930
2931fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002932{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2933echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2934GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002935ac_test_CFLAGS=${CFLAGS+set}
2936ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002937{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2938echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002939if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002940 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002941else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002942 ac_save_c_werror_flag=$ac_c_werror_flag
2943 ac_c_werror_flag=yes
2944 ac_cv_prog_cc_g=no
2945 CFLAGS="-g"
2946 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002947/* confdefs.h. */
2948_ACEOF
2949cat confdefs.h >>conftest.$ac_ext
2950cat >>conftest.$ac_ext <<_ACEOF
2951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002952
Martin v. Löwis11437992002-04-12 09:54:03 +00002953int
2954main ()
2955{
2956
2957 ;
2958 return 0;
2959}
2960_ACEOF
2961rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002962if { (ac_try="$ac_compile"
2963case "(($ac_try" in
2964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2965 *) ac_try_echo=$ac_try;;
2966esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002968 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002970 grep -v '^ *+' conftest.er1 >conftest.err
2971 rm -f conftest.er1
2972 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002974 (exit $ac_status); } && {
2975 test -z "$ac_c_werror_flag" ||
2976 test ! -s conftest.err
2977 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002978 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002979else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002981sed 's/^/| /' conftest.$ac_ext >&5
2982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002983 CFLAGS=""
2984 cat >conftest.$ac_ext <<_ACEOF
2985/* confdefs.h. */
2986_ACEOF
2987cat confdefs.h >>conftest.$ac_ext
2988cat >>conftest.$ac_ext <<_ACEOF
2989/* end confdefs.h. */
2990
2991int
2992main ()
2993{
2994
2995 ;
2996 return 0;
2997}
2998_ACEOF
2999rm -f conftest.$ac_objext
3000if { (ac_try="$ac_compile"
3001case "(($ac_try" in
3002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3003 *) ac_try_echo=$ac_try;;
3004esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003006 (eval "$ac_compile") 2>conftest.er1
3007 ac_status=$?
3008 grep -v '^ *+' conftest.er1 >conftest.err
3009 rm -f conftest.er1
3010 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003012 (exit $ac_status); } && {
3013 test -z "$ac_c_werror_flag" ||
3014 test ! -s conftest.err
3015 } && test -s conftest.$ac_objext; then
3016 :
3017else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003018 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003019sed 's/^/| /' conftest.$ac_ext >&5
3020
3021 ac_c_werror_flag=$ac_save_c_werror_flag
3022 CFLAGS="-g"
3023 cat >conftest.$ac_ext <<_ACEOF
3024/* confdefs.h. */
3025_ACEOF
3026cat confdefs.h >>conftest.$ac_ext
3027cat >>conftest.$ac_ext <<_ACEOF
3028/* end confdefs.h. */
3029
3030int
3031main ()
3032{
3033
3034 ;
3035 return 0;
3036}
3037_ACEOF
3038rm -f conftest.$ac_objext
3039if { (ac_try="$ac_compile"
3040case "(($ac_try" in
3041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3042 *) ac_try_echo=$ac_try;;
3043esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003045 (eval "$ac_compile") 2>conftest.er1
3046 ac_status=$?
3047 grep -v '^ *+' conftest.er1 >conftest.err
3048 rm -f conftest.er1
3049 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003051 (exit $ac_status); } && {
3052 test -z "$ac_c_werror_flag" ||
3053 test ! -s conftest.err
3054 } && test -s conftest.$ac_objext; then
3055 ac_cv_prog_cc_g=yes
3056else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003057 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003058sed 's/^/| /' conftest.$ac_ext >&5
3059
3060
Guido van Rossum627b2d71993-12-24 10:39:16 +00003061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003062
3063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003065
3066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3067fi
3068
3069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3070 ac_c_werror_flag=$ac_save_c_werror_flag
3071fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003072{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3073echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003074if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003075 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003076elif test $ac_cv_prog_cc_g = yes; then
3077 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003078 CFLAGS="-g -O2"
3079 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003080 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003081 fi
3082else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003083 if test "$GCC" = yes; then
3084 CFLAGS="-O2"
3085 else
3086 CFLAGS=
3087 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003088fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003089{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3090echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003091if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003092 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003093else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003094 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003095ac_save_CC=$CC
3096cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003097/* confdefs.h. */
3098_ACEOF
3099cat confdefs.h >>conftest.$ac_ext
3100cat >>conftest.$ac_ext <<_ACEOF
3101/* end confdefs.h. */
3102#include <stdarg.h>
3103#include <stdio.h>
3104#include <sys/types.h>
3105#include <sys/stat.h>
3106/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3107struct buf { int x; };
3108FILE * (*rcsopen) (struct buf *, struct stat *, int);
3109static char *e (p, i)
3110 char **p;
3111 int i;
3112{
3113 return p[i];
3114}
3115static char *f (char * (*g) (char **, int), char **p, ...)
3116{
3117 char *s;
3118 va_list v;
3119 va_start (v,p);
3120 s = g (p, va_arg (v,int));
3121 va_end (v);
3122 return s;
3123}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003124
3125/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3126 function prototypes and stuff, but not '\xHH' hex character constants.
3127 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003128 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003129 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3130 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003131 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003132int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003134/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3135 inside strings and character constants. */
3136#define FOO(x) 'x'
3137int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3138
Skip Montanaro6dead952003-09-25 14:50:04 +00003139int test (int i, double x);
3140struct s1 {int (*f) (int a);};
3141struct s2 {int (*f) (double a);};
3142int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3143int argc;
3144char **argv;
3145int
3146main ()
3147{
3148return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3149 ;
3150 return 0;
3151}
3152_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003153for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3154 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003155do
3156 CC="$ac_save_CC $ac_arg"
3157 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003158if { (ac_try="$ac_compile"
3159case "(($ac_try" in
3160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3161 *) ac_try_echo=$ac_try;;
3162esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003165 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003166 grep -v '^ *+' conftest.er1 >conftest.err
3167 rm -f conftest.er1
3168 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003170 (exit $ac_status); } && {
3171 test -z "$ac_c_werror_flag" ||
3172 test ! -s conftest.err
3173 } && test -s conftest.$ac_objext; then
3174 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003175else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003177sed 's/^/| /' conftest.$ac_ext >&5
3178
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179
Skip Montanaro6dead952003-09-25 14:50:04 +00003180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003181
3182rm -f core conftest.err conftest.$ac_objext
3183 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003184done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003185rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003186CC=$ac_save_CC
3187
3188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003189# AC_CACHE_VAL
3190case "x$ac_cv_prog_cc_c89" in
3191 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003192 { echo "$as_me:$LINENO: result: none needed" >&5
3193echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003194 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003195 { echo "$as_me:$LINENO: result: unsupported" >&5
3196echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003197 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003198 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003199 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3200echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003201esac
3202
Skip Montanaro6dead952003-09-25 14:50:04 +00003203
Martin v. Löwis11437992002-04-12 09:54:03 +00003204ac_ext=c
3205ac_cpp='$CPP $CPPFLAGS'
3206ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3207ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3208ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003209
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003210
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003211
3212
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003213{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3214echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003215
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003216# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003217if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003218 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003219
3220 case $withval in
3221 no) with_cxx_main=no
3222 MAINCC='$(CC)';;
3223 yes) with_cxx_main=yes
3224 MAINCC='$(CXX)';;
3225 *) with_cxx_main=yes
3226 MAINCC=$withval
3227 if test -z "$CXX"
3228 then
3229 CXX=$withval
3230 fi;;
3231 esac
3232else
3233
3234 with_cxx_main=no
3235 MAINCC='$(CC)'
3236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003237fi
3238
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003239{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3240echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003241
3242preset_cxx="$CXX"
3243if test -z "$CXX"
3244then
3245 case "$CC" in
3246 gcc) # Extract the first word of "g++", so it can be a program name with args.
3247set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003248{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3249echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003250if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003251 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003252else
3253 case $CXX in
3254 [\\/]* | ?:[\\/]*)
3255 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3256 ;;
3257 *)
3258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3259for as_dir in notfound
3260do
3261 IFS=$as_save_IFS
3262 test -z "$as_dir" && as_dir=.
3263 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003264 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 +00003265 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003266 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003267 break 2
3268 fi
3269done
3270done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003271IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003272
3273 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3274 ;;
3275esac
3276fi
3277CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003278if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003279 { echo "$as_me:$LINENO: result: $CXX" >&5
3280echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003281else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003282 { echo "$as_me:$LINENO: result: no" >&5
3283echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003285
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003286 ;;
3287 cc) # Extract the first word of "c++", so it can be a program name with args.
3288set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003289{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3290echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003291if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003292 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003293else
3294 case $CXX in
3295 [\\/]* | ?:[\\/]*)
3296 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3297 ;;
3298 *)
3299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3300for as_dir in notfound
3301do
3302 IFS=$as_save_IFS
3303 test -z "$as_dir" && as_dir=.
3304 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003305 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 +00003306 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003307 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003308 break 2
3309 fi
3310done
3311done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003312IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003313
3314 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3315 ;;
3316esac
3317fi
3318CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003319if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003320 { echo "$as_me:$LINENO: result: $CXX" >&5
3321echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003322else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003323 { echo "$as_me:$LINENO: result: no" >&5
3324echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003326
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003327 ;;
3328 esac
3329 if test "$CXX" = "notfound"
3330 then
3331 CXX=""
3332 fi
3333fi
3334if test -z "$CXX"
3335then
3336 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3337do
3338 # Extract the first word of "$ac_prog", so it can be a program name with args.
3339set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003340{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3341echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003342if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003343 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003344else
3345 if test -n "$CXX"; then
3346 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3347else
3348as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3349for as_dir in $PATH
3350do
3351 IFS=$as_save_IFS
3352 test -z "$as_dir" && as_dir=.
3353 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003354 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 +00003355 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003356 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003357 break 2
3358 fi
3359done
3360done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003361IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003362
3363fi
3364fi
3365CXX=$ac_cv_prog_CXX
3366if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003367 { echo "$as_me:$LINENO: result: $CXX" >&5
3368echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003369else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003370 { echo "$as_me:$LINENO: result: no" >&5
3371echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003372fi
3373
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003374
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003375 test -n "$CXX" && break
3376done
3377test -n "$CXX" || CXX="notfound"
3378
3379 if test "$CXX" = "notfound"
3380 then
3381 CXX=""
3382 fi
3383fi
3384if test "$preset_cxx" != "$CXX"
3385then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003386 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003387
3388 By default, distutils will build C++ extension modules with \"$CXX\".
3389 If this is not intended, then set CXX on the configure command line.
3390 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003391echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003392
3393 By default, distutils will build C++ extension modules with \"$CXX\".
3394 If this is not intended, then set CXX on the configure command line.
3395 " >&2;}
3396fi
3397
3398
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003399# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003400
3401ac_ext=c
3402ac_cpp='$CPP $CPPFLAGS'
3403ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3404ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3405ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003406{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3407echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003408# On Suns, sometimes $CPP names a directory.
3409if test -n "$CPP" && test -d "$CPP"; then
3410 CPP=
3411fi
3412if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003413 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003414 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003415else
Martin v. Löwis11437992002-04-12 09:54:03 +00003416 # Double quotes because CPP needs to be expanded
3417 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3418 do
3419 ac_preproc_ok=false
3420for ac_c_preproc_warn_flag in '' yes
3421do
3422 # Use a header file that comes with gcc, so configuring glibc
3423 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003424 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3425 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003426 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003427 # not just through cpp. "Syntax error" is here to catch this case.
3428 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003429/* confdefs.h. */
3430_ACEOF
3431cat confdefs.h >>conftest.$ac_ext
3432cat >>conftest.$ac_ext <<_ACEOF
3433/* end confdefs.h. */
3434#ifdef __STDC__
3435# include <limits.h>
3436#else
3437# include <assert.h>
3438#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003439 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003440_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003441if { (ac_try="$ac_cpp conftest.$ac_ext"
3442case "(($ac_try" in
3443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3444 *) ac_try_echo=$ac_try;;
3445esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003448 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003449 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003450 rm -f conftest.er1
3451 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453 (exit $ac_status); } >/dev/null && {
3454 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3455 test ! -s conftest.err
3456 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003457 :
3458else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003459 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003460sed 's/^/| /' conftest.$ac_ext >&5
3461
Martin v. Löwis11437992002-04-12 09:54:03 +00003462 # Broken: fails on valid input.
3463continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465
Martin v. Löwis11437992002-04-12 09:54:03 +00003466rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003467
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003468 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003469 # can be detected and how.
3470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003471/* confdefs.h. */
3472_ACEOF
3473cat confdefs.h >>conftest.$ac_ext
3474cat >>conftest.$ac_ext <<_ACEOF
3475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003476#include <ac_nonexistent.h>
3477_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478if { (ac_try="$ac_cpp conftest.$ac_ext"
3479case "(($ac_try" in
3480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3481 *) ac_try_echo=$ac_try;;
3482esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003486 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003487 rm -f conftest.er1
3488 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003490 (exit $ac_status); } >/dev/null && {
3491 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3492 test ! -s conftest.err
3493 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003494 # Broken: success on invalid input.
3495continue
3496else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003498sed 's/^/| /' conftest.$ac_ext >&5
3499
Martin v. Löwis11437992002-04-12 09:54:03 +00003500 # Passes both tests.
3501ac_preproc_ok=:
3502break
3503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003504
Martin v. Löwis11437992002-04-12 09:54:03 +00003505rm -f conftest.err conftest.$ac_ext
3506
3507done
3508# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3509rm -f conftest.err conftest.$ac_ext
3510if $ac_preproc_ok; then
3511 break
3512fi
3513
3514 done
3515 ac_cv_prog_CPP=$CPP
3516
3517fi
3518 CPP=$ac_cv_prog_CPP
3519else
3520 ac_cv_prog_CPP=$CPP
3521fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003522{ echo "$as_me:$LINENO: result: $CPP" >&5
3523echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003524ac_preproc_ok=false
3525for ac_c_preproc_warn_flag in '' yes
3526do
3527 # Use a header file that comes with gcc, so configuring glibc
3528 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003529 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3530 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003531 # On the NeXT, cc -E runs the code through the compiler's parser,
3532 # not just through cpp. "Syntax error" is here to catch this case.
3533 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003534/* confdefs.h. */
3535_ACEOF
3536cat confdefs.h >>conftest.$ac_ext
3537cat >>conftest.$ac_ext <<_ACEOF
3538/* end confdefs.h. */
3539#ifdef __STDC__
3540# include <limits.h>
3541#else
3542# include <assert.h>
3543#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003544 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003545_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003546if { (ac_try="$ac_cpp conftest.$ac_ext"
3547case "(($ac_try" in
3548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3549 *) ac_try_echo=$ac_try;;
3550esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003552 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003553 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003554 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003555 rm -f conftest.er1
3556 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558 (exit $ac_status); } >/dev/null && {
3559 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3560 test ! -s conftest.err
3561 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003562 :
3563else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003565sed 's/^/| /' conftest.$ac_ext >&5
3566
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 # Broken: fails on valid input.
3568continue
3569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003570
Martin v. Löwis11437992002-04-12 09:54:03 +00003571rm -f conftest.err conftest.$ac_ext
3572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003573 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003574 # can be detected and how.
3575 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003576/* confdefs.h. */
3577_ACEOF
3578cat confdefs.h >>conftest.$ac_ext
3579cat >>conftest.$ac_ext <<_ACEOF
3580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003581#include <ac_nonexistent.h>
3582_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003583if { (ac_try="$ac_cpp conftest.$ac_ext"
3584case "(($ac_try" in
3585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3586 *) ac_try_echo=$ac_try;;
3587esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003589 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003591 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003592 rm -f conftest.er1
3593 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003595 (exit $ac_status); } >/dev/null && {
3596 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3597 test ! -s conftest.err
3598 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003599 # Broken: success on invalid input.
3600continue
3601else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003603sed 's/^/| /' conftest.$ac_ext >&5
3604
Martin v. Löwis11437992002-04-12 09:54:03 +00003605 # Passes both tests.
3606ac_preproc_ok=:
3607break
3608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003609
Martin v. Löwis11437992002-04-12 09:54:03 +00003610rm -f conftest.err conftest.$ac_ext
3611
3612done
3613# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3614rm -f conftest.err conftest.$ac_ext
3615if $ac_preproc_ok; then
3616 :
3617else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003618 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003619See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003620echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003621See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003622 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003623fi
3624
3625ac_ext=c
3626ac_cpp='$CPP $CPPFLAGS'
3627ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3628ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3629ac_compiler_gnu=$ac_cv_c_compiler_gnu
3630
3631
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003632{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3633echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003634if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003635 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003636else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003637 # Extract the first word of "grep ggrep" to use in msg output
3638if test -z "$GREP"; then
3639set dummy grep ggrep; ac_prog_name=$2
3640if test "${ac_cv_path_GREP+set}" = set; then
3641 echo $ECHO_N "(cached) $ECHO_C" >&6
3642else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003643 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003644# Loop through the user's path and test for each of PROGNAME-LIST
3645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3647do
3648 IFS=$as_save_IFS
3649 test -z "$as_dir" && as_dir=.
3650 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003651 for ac_exec_ext in '' $ac_executable_extensions; do
3652 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3653 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3654 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655 # Check for GNU $ac_path_GREP
3656case `"$ac_path_GREP" --version 2>&1` in
3657*GNU*)
3658 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3659*)
3660 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003661 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003662 while :
3663 do
3664 cat "conftest.in" "conftest.in" >"conftest.tmp"
3665 mv "conftest.tmp" "conftest.in"
3666 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003667 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3669 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3670 ac_count=`expr $ac_count + 1`
3671 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3672 # Best one so far, save it but keep looking for a better one
3673 ac_cv_path_GREP="$ac_path_GREP"
3674 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003675 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003676 # 10*(2^10) chars as input seems more than enough
3677 test $ac_count -gt 10 && break
3678 done
3679 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3680esac
3681
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003682
3683 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684 done
3685done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003686
3687done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003689
3690
3691fi
3692
3693GREP="$ac_cv_path_GREP"
3694if test -z "$GREP"; then
3695 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3696echo "$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 +00003697 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003698fi
3699
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003700else
3701 ac_cv_path_GREP=$GREP
3702fi
3703
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003705fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003706{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3707echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003708 GREP="$ac_cv_path_GREP"
3709
3710
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003711{ echo "$as_me:$LINENO: checking for egrep" >&5
3712echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003713if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003714 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003715else
3716 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3717 then ac_cv_path_EGREP="$GREP -E"
3718 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003719 # Extract the first word of "egrep" to use in msg output
3720if test -z "$EGREP"; then
3721set dummy egrep; ac_prog_name=$2
3722if test "${ac_cv_path_EGREP+set}" = set; then
3723 echo $ECHO_N "(cached) $ECHO_C" >&6
3724else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003726# Loop through the user's path and test for each of PROGNAME-LIST
3727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003728for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3729do
3730 IFS=$as_save_IFS
3731 test -z "$as_dir" && as_dir=.
3732 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003733 for ac_exec_ext in '' $ac_executable_extensions; do
3734 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3735 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3736 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003737 # Check for GNU $ac_path_EGREP
3738case `"$ac_path_EGREP" --version 2>&1` in
3739*GNU*)
3740 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3741*)
3742 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003743 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003744 while :
3745 do
3746 cat "conftest.in" "conftest.in" >"conftest.tmp"
3747 mv "conftest.tmp" "conftest.in"
3748 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003749 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3751 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3752 ac_count=`expr $ac_count + 1`
3753 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3754 # Best one so far, save it but keep looking for a better one
3755 ac_cv_path_EGREP="$ac_path_EGREP"
3756 ac_path_EGREP_max=$ac_count
3757 fi
3758 # 10*(2^10) chars as input seems more than enough
3759 test $ac_count -gt 10 && break
3760 done
3761 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3762esac
3763
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003764
3765 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766 done
3767done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003768
3769done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003771
3772
3773fi
3774
3775EGREP="$ac_cv_path_EGREP"
3776if test -z "$EGREP"; then
3777 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3778echo "$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 +00003779 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003780fi
3781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782else
3783 ac_cv_path_EGREP=$EGREP
3784fi
3785
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003787 fi
3788fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003789{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3790echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003792
3793
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003794
3795{ echo "$as_me:$LINENO: checking for AIX" >&5
3796echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3797cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003798/* confdefs.h. */
3799_ACEOF
3800cat confdefs.h >>conftest.$ac_ext
3801cat >>conftest.$ac_ext <<_ACEOF
3802/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003803#ifdef _AIX
3804 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003805#endif
3806
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003807_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003808if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3809 $EGREP "yes" >/dev/null 2>&1; then
3810 { echo "$as_me:$LINENO: result: yes" >&5
3811echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003812cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003813#define _ALL_SOURCE 1
3814_ACEOF
3815
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003816else
3817 { echo "$as_me:$LINENO: result: no" >&5
3818echo "${ECHO_T}no" >&6; }
3819fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00003820rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003821
3822
3823
3824# Check for unsupported systems
3825case $ac_sys_system/$ac_sys_release in
3826atheos*|Linux*/1*)
3827 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3828 echo See README for details.
3829 exit 1;;
3830esac
3831
3832
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003833{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3834echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003835
3836# Check whether --with-suffix was given.
3837if test "${with_suffix+set}" = set; then
3838 withval=$with_suffix;
3839 case $withval in
3840 no) EXEEXT=;;
3841 yes) EXEEXT=.exe;;
3842 *) EXEEXT=$withval;;
3843 esac
3844fi
3845
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003846{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3847echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003848
3849# Test whether we're running on a non-case-sensitive system, in which
3850# case we give a warning if no ext is given
3851
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003852{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3853echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003854if test ! -d CaseSensitiveTestDir; then
3855mkdir CaseSensitiveTestDir
3856fi
3857
3858if test -d casesensitivetestdir
3859then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003860 { echo "$as_me:$LINENO: result: yes" >&5
3861echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003862 BUILDEXEEXT=.exe
3863else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003864 { echo "$as_me:$LINENO: result: no" >&5
3865echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003866 BUILDEXEEXT=$EXEEXT
3867fi
3868rmdir CaseSensitiveTestDir
3869
3870case $MACHDEP in
3871bsdos*)
3872 case $CC in
3873 gcc) CC="$CC -D_HAVE_BSDI";;
3874 esac;;
3875esac
3876
3877case $ac_sys_system in
3878hp*|HP*)
3879 case $CC in
3880 cc|*/cc) CC="$CC -Ae";;
3881 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003882SunOS*)
3883 # Some functions have a prototype only with that define, e.g. confstr
3884
3885cat >>confdefs.h <<\_ACEOF
3886#define __EXTENSIONS__ 1
3887_ACEOF
3888
3889 ;;
3890esac
3891
3892
3893
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003894{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3895echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003896if test -z "$LIBRARY"
3897then
3898 LIBRARY='libpython$(VERSION).a'
3899fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003900{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3901echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003902
3903# LDLIBRARY is the name of the library to link against (as opposed to the
3904# name of the library into which to insert object files). BLDLIBRARY is also
3905# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3906# is blank as the main program is not linked directly against LDLIBRARY.
3907# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3908# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3909# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3910# DLLLIBRARY is the shared (i.e., DLL) library.
3911#
3912# RUNSHARED is used to run shared python without installed libraries
3913#
3914# INSTSONAME is the name of the shared library that will be use to install
3915# on the system - some systems like version suffix, others don't
3916
3917
3918
3919
3920
3921
3922LDLIBRARY="$LIBRARY"
3923BLDLIBRARY='$(LDLIBRARY)'
3924INSTSONAME='$(LDLIBRARY)'
3925DLLLIBRARY=''
3926LDLIBRARYDIR=''
3927RUNSHARED=''
3928
3929# LINKCC is the command that links the python executable -- default is $(CC).
3930# If CXX is set, and if it is needed to link a main function that was
3931# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3932# python might then depend on the C++ runtime
3933# This is altered for AIX in order to build the export list before
3934# linking.
3935
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003936{ echo "$as_me:$LINENO: checking LINKCC" >&5
3937echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003938if test -z "$LINKCC"
3939then
3940 LINKCC='$(PURIFY) $(MAINCC)'
3941 case $ac_sys_system in
3942 AIX*)
3943 exp_extra="\"\""
3944 if test $ac_sys_release -ge 5 -o \
3945 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3946 exp_extra="."
3947 fi
3948 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003949 QNX*)
3950 # qcc must be used because the other compilers do not
3951 # support -N.
3952 LINKCC=qcc;;
3953 esac
3954fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003955{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3956echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003957
3958# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3959# make sure we default having it set to "no": this is used by
3960# distutils.unixccompiler to know if it should add --enable-new-dtags
3961# to linker command lines, and failing to detect GNU ld simply results
3962# in the same bahaviour as before.
3963
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003964{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3965echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003966ac_prog=ld
3967if test "$GCC" = yes; then
3968 ac_prog=`$CC -print-prog-name=ld`
3969fi
3970case `"$ac_prog" -V 2>&1 < /dev/null` in
3971 *GNU*)
3972 GNULD=yes;;
3973 *)
3974 GNULD=no;;
3975esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003976{ echo "$as_me:$LINENO: result: $GNULD" >&5
3977echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003978
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003979{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3980echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003981# Check whether --enable-shared was given.
3982if test "${enable_shared+set}" = set; then
3983 enableval=$enable_shared;
3984fi
3985
3986
3987if test -z "$enable_shared"
3988then
3989 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00003990 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003991 enable_shared="yes";;
3992 *)
3993 enable_shared="no";;
3994 esac
3995fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003996{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3997echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003998
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003999{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4000echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004001# Check whether --enable-profiling was given.
4002if test "${enable_profiling+set}" = set; then
4003 enableval=$enable_profiling; ac_save_cc="$CC"
4004 CC="$CC -pg"
4005 if test "$cross_compiling" = yes; then
4006 ac_enable_profiling="no"
4007else
4008 cat >conftest.$ac_ext <<_ACEOF
4009/* confdefs.h. */
4010_ACEOF
4011cat confdefs.h >>conftest.$ac_ext
4012cat >>conftest.$ac_ext <<_ACEOF
4013/* end confdefs.h. */
4014int main() { return 0; }
4015_ACEOF
4016rm -f conftest$ac_exeext
4017if { (ac_try="$ac_link"
4018case "(($ac_try" in
4019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4020 *) ac_try_echo=$ac_try;;
4021esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004023 (eval "$ac_link") 2>&5
4024 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004026 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4027 { (case "(($ac_try" in
4028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4029 *) ac_try_echo=$ac_try;;
4030esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004032 (eval "$ac_try") 2>&5
4033 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004035 (exit $ac_status); }; }; then
4036 ac_enable_profiling="yes"
4037else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004038 echo "$as_me: program exited with status $ac_status" >&5
4039echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004040sed 's/^/| /' conftest.$ac_ext >&5
4041
4042( exit $ac_status )
4043ac_enable_profiling="no"
4044fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004045rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4046fi
4047
4048
4049 CC="$ac_save_cc"
4050fi
4051
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004052{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4053echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004054
4055case "$ac_enable_profiling" in
4056 "yes")
4057 BASECFLAGS="-pg $BASECFLAGS"
4058 LDFLAGS="-pg $LDFLAGS"
4059 ;;
4060esac
4061
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004062{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4063echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004064
4065# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4066# library that we build, but we do not want to link against it (we
4067# will find it with a -framework option). For this reason there is an
4068# extra variable BLDLIBRARY against which Python and the extension
4069# modules are linked, BLDLIBRARY. This is normally the same as
4070# LDLIBRARY, but empty for MacOSX framework builds.
4071if test "$enable_framework"
4072then
4073 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4074 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4075 BLDLIBRARY=''
4076else
4077 BLDLIBRARY='$(LDLIBRARY)'
4078fi
4079
4080# Other platforms follow
4081if test $enable_shared = "yes"; then
4082
4083cat >>confdefs.h <<\_ACEOF
4084#define Py_ENABLE_SHARED 1
4085_ACEOF
4086
4087 case $ac_sys_system in
4088 CYGWIN*)
4089 LDLIBRARY='libpython$(VERSION).dll.a'
4090 DLLLIBRARY='libpython$(VERSION).dll'
4091 ;;
4092 SunOS*)
4093 LDLIBRARY='libpython$(VERSION).so'
4094 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4095 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4096 INSTSONAME="$LDLIBRARY".$SOVERSION
4097 ;;
4098 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4099 LDLIBRARY='libpython$(VERSION).so'
4100 BLDLIBRARY='-L. -lpython$(VERSION)'
4101 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4102 case $ac_sys_system in
4103 FreeBSD*)
4104 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4105 ;;
4106 esac
4107 INSTSONAME="$LDLIBRARY".$SOVERSION
4108 ;;
4109 hp*|HP*)
4110 case `uname -m` in
4111 ia64)
4112 LDLIBRARY='libpython$(VERSION).so'
4113 ;;
4114 *)
4115 LDLIBRARY='libpython$(VERSION).sl'
4116 ;;
4117 esac
4118 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4119 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4120 ;;
4121 OSF*)
4122 LDLIBRARY='libpython$(VERSION).so'
4123 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4124 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4125 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004126 Darwin*)
4127 LDLIBRARY='libpython$(VERSION).dylib'
4128 BLDLIBRARY='-L. -lpython$(VERSION)'
4129 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4130 ;;
4131
4132 esac
4133else # shared is disabled
4134 case $ac_sys_system in
4135 CYGWIN*)
4136 BLDLIBRARY='$(LIBRARY)'
4137 LDLIBRARY='libpython$(VERSION).dll.a'
4138 ;;
4139 esac
4140fi
4141
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004142{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4143echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004144
4145if test -n "$ac_tool_prefix"; then
4146 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4147set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004148{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4149echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004150if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004151 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004152else
4153 if test -n "$RANLIB"; then
4154 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4155else
4156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4157for as_dir in $PATH
4158do
4159 IFS=$as_save_IFS
4160 test -z "$as_dir" && as_dir=.
4161 for ac_exec_ext in '' $ac_executable_extensions; do
4162 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4163 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004164 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004165 break 2
4166 fi
4167done
4168done
4169IFS=$as_save_IFS
4170
4171fi
4172fi
4173RANLIB=$ac_cv_prog_RANLIB
4174if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004175 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4176echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004177else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004178 { echo "$as_me:$LINENO: result: no" >&5
4179echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004180fi
4181
4182
4183fi
4184if test -z "$ac_cv_prog_RANLIB"; then
4185 ac_ct_RANLIB=$RANLIB
4186 # Extract the first word of "ranlib", so it can be a program name with args.
4187set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004188{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4189echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004190if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004191 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004192else
4193 if test -n "$ac_ct_RANLIB"; then
4194 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4195else
4196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4197for as_dir in $PATH
4198do
4199 IFS=$as_save_IFS
4200 test -z "$as_dir" && as_dir=.
4201 for ac_exec_ext in '' $ac_executable_extensions; do
4202 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4203 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004204 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004205 break 2
4206 fi
4207done
4208done
4209IFS=$as_save_IFS
4210
4211fi
4212fi
4213ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4214if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004215 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4216echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004217else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004218 { echo "$as_me:$LINENO: result: no" >&5
4219echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004220fi
4221
4222 if test "x$ac_ct_RANLIB" = x; then
4223 RANLIB=":"
4224 else
4225 case $cross_compiling:$ac_tool_warned in
4226yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004227{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4228whose name does not start with the host triplet. If you think this
4229configuration is useful to you, please write to autoconf@gnu.org." >&5
4230echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4231whose name does not start with the host triplet. If you think this
4232configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004233ac_tool_warned=yes ;;
4234esac
4235 RANLIB=$ac_ct_RANLIB
4236 fi
4237else
4238 RANLIB="$ac_cv_prog_RANLIB"
4239fi
4240
4241
4242for ac_prog in ar aal
4243do
4244 # Extract the first word of "$ac_prog", so it can be a program name with args.
4245set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004246{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4247echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004248if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004249 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004250else
4251 if test -n "$AR"; then
4252 ac_cv_prog_AR="$AR" # Let the user override the test.
4253else
4254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4255for as_dir in $PATH
4256do
4257 IFS=$as_save_IFS
4258 test -z "$as_dir" && as_dir=.
4259 for ac_exec_ext in '' $ac_executable_extensions; do
4260 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4261 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004262 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004263 break 2
4264 fi
4265done
4266done
4267IFS=$as_save_IFS
4268
4269fi
4270fi
4271AR=$ac_cv_prog_AR
4272if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004273 { echo "$as_me:$LINENO: result: $AR" >&5
4274echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004275else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004276 { echo "$as_me:$LINENO: result: no" >&5
4277echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004278fi
4279
4280
4281 test -n "$AR" && break
4282done
4283test -n "$AR" || AR="ar"
4284
4285
4286# tweak ARFLAGS only if the user didn't set it on the command line
4287
4288if test -z "$ARFLAGS"
4289then
4290 ARFLAGS="rc"
4291fi
4292
4293
4294# Extract the first word of "svnversion", so it can be a program name with args.
4295set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004296{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4297echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004298if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004299 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004300else
4301 if test -n "$SVNVERSION"; then
4302 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4303else
4304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4305for as_dir in $PATH
4306do
4307 IFS=$as_save_IFS
4308 test -z "$as_dir" && as_dir=.
4309 for ac_exec_ext in '' $ac_executable_extensions; do
4310 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4311 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004312 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004313 break 2
4314 fi
4315done
4316done
4317IFS=$as_save_IFS
4318
4319 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4320fi
4321fi
4322SVNVERSION=$ac_cv_prog_SVNVERSION
4323if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004324 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4325echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004326else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004327 { echo "$as_me:$LINENO: result: no" >&5
4328echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004329fi
4330
4331
4332if test $SVNVERSION = found
4333then
4334 SVNVERSION="svnversion \$(srcdir)"
4335else
4336 SVNVERSION="echo Unversioned directory"
4337fi
4338
4339case $MACHDEP in
4340bsdos*|hp*|HP*)
4341 # install -d does not work on BSDI or HP-UX
4342 if test -z "$INSTALL"
4343 then
4344 INSTALL="${srcdir}/install-sh -c"
4345 fi
4346esac
4347ac_aux_dir=
4348for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4349 if test -f "$ac_dir/install-sh"; then
4350 ac_aux_dir=$ac_dir
4351 ac_install_sh="$ac_aux_dir/install-sh -c"
4352 break
4353 elif test -f "$ac_dir/install.sh"; then
4354 ac_aux_dir=$ac_dir
4355 ac_install_sh="$ac_aux_dir/install.sh -c"
4356 break
4357 elif test -f "$ac_dir/shtool"; then
4358 ac_aux_dir=$ac_dir
4359 ac_install_sh="$ac_aux_dir/shtool install -c"
4360 break
4361 fi
4362done
4363if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004364 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4365echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004366 { (exit 1); exit 1; }; }
4367fi
4368
4369# These three variables are undocumented and unsupported,
4370# and are intended to be withdrawn in a future Autoconf release.
4371# They can cause serious problems if a builder's source tree is in a directory
4372# whose full name contains unusual characters.
4373ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4374ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4375ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4376
4377
4378# Find a good install program. We prefer a C program (faster),
4379# so one script is as good as another. But avoid the broken or
4380# incompatible versions:
4381# SysV /etc/install, /usr/sbin/install
4382# SunOS /usr/etc/install
4383# IRIX /sbin/install
4384# AIX /bin/install
4385# AmigaOS /C/install, which installs bootblocks on floppy discs
4386# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4387# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4388# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4389# OS/2's system install, which has a completely different semantic
4390# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004391{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4392echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004393if test -z "$INSTALL"; then
4394if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004395 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004396else
4397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4398for as_dir in $PATH
4399do
4400 IFS=$as_save_IFS
4401 test -z "$as_dir" && as_dir=.
4402 # Account for people who put trailing slashes in PATH elements.
4403case $as_dir/ in
4404 ./ | .// | /cC/* | \
4405 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4406 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4407 /usr/ucb/* ) ;;
4408 *)
4409 # OSF1 and SCO ODT 3.0 have their own names for install.
4410 # Don't use installbsd from OSF since it installs stuff as root
4411 # by default.
4412 for ac_prog in ginstall scoinst install; do
4413 for ac_exec_ext in '' $ac_executable_extensions; do
4414 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4415 if test $ac_prog = install &&
4416 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4417 # AIX install. It has an incompatible calling convention.
4418 :
4419 elif test $ac_prog = install &&
4420 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4421 # program-specific install script used by HP pwplus--don't use.
4422 :
4423 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004424 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4425 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004426 fi
4427 fi
4428 done
4429 done
4430 ;;
4431esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004432done
4433IFS=$as_save_IFS
4434
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004435
4436fi
4437 if test "${ac_cv_path_install+set}" = set; then
4438 INSTALL=$ac_cv_path_install
4439 else
4440 # As a last resort, use the slow shell script. Don't cache a
4441 # value for INSTALL within a source directory, because that will
4442 # break other packages using the cache if that directory is
4443 # removed, or if the value is a relative name.
4444 INSTALL=$ac_install_sh
4445 fi
4446fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004447{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4448echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004449
4450# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4451# It thinks the first close brace ends the variable substitution.
4452test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4453
4454test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4455
4456test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4457
4458
4459# Not every filesystem supports hard links
4460
4461if test -z "$LN" ; then
4462 case $ac_sys_system in
4463 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004464 *) LN=ln;;
4465 esac
4466fi
4467
4468# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004469{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4470echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004471
4472# Check whether --with-pydebug was given.
4473if test "${with_pydebug+set}" = set; then
4474 withval=$with_pydebug;
4475if test "$withval" != no
4476then
4477
4478cat >>confdefs.h <<\_ACEOF
4479#define Py_DEBUG 1
4480_ACEOF
4481
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004482 { echo "$as_me:$LINENO: result: yes" >&5
4483echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004484 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004485else { echo "$as_me:$LINENO: result: no" >&5
4486echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004487fi
4488else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004489 { echo "$as_me:$LINENO: result: no" >&5
4490echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004491fi
4492
4493
4494# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4495# merged with this chunk of code?
4496
4497# Optimizer/debugger flags
4498# ------------------------
4499# (The following bit of code is complicated enough - please keep things
4500# indented properly. Just pretend you're editing Python code. ;-)
4501
4502# There are two parallel sets of case statements below, one that checks to
4503# see if OPT was set and one that does BASECFLAGS setting based upon
4504# compiler and platform. BASECFLAGS tweaks need to be made even if the
4505# user set OPT.
4506
4507# tweak OPT based on compiler and platform, only if the user didn't set
4508# it on the command line
4509
4510if test -z "$OPT"
4511then
4512 case $GCC in
4513 yes)
4514 if test "$CC" != 'g++' ; then
4515 STRICT_PROTO="-Wstrict-prototypes"
4516 fi
4517 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4518 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4519 WRAP="-fwrapv"
4520 fi
4521 case $ac_cv_prog_cc_g in
4522 yes)
4523 if test "$Py_DEBUG" = 'true' ; then
4524 # Optimization messes up debuggers, so turn it off for
4525 # debug builds.
4526 OPT="-g -Wall $STRICT_PROTO"
4527 else
4528 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4529 fi
4530 ;;
4531 *)
4532 OPT="-O3 -Wall $STRICT_PROTO"
4533 ;;
4534 esac
4535 case $ac_sys_system in
4536 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4537 ;;
4538 esac
4539 ;;
4540
4541 *)
4542 OPT="-O"
4543 ;;
4544 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004545fi
4546
4547
4548
4549# The -arch flags for universal builds on OSX
4550UNIVERSAL_ARCH_FLAGS=
4551
4552
4553# tweak BASECFLAGS based on compiler and platform
4554case $GCC in
4555yes)
4556 # Python violates C99 rules, by casting between incompatible
4557 # pointer types. GCC may generate bad code as a result of that,
4558 # so use -fno-strict-aliasing if supported.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004559 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4560echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004561 ac_save_cc="$CC"
4562 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004563 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004564 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004565else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004566 cat >conftest.$ac_ext <<_ACEOF
4567/* confdefs.h. */
4568_ACEOF
4569cat confdefs.h >>conftest.$ac_ext
4570cat >>conftest.$ac_ext <<_ACEOF
4571/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004572
4573int
4574main ()
4575{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004576int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004577 ;
4578 return 0;
4579}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004580_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004581rm -f conftest.$ac_objext
4582if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004583case "(($ac_try" in
4584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4585 *) ac_try_echo=$ac_try;;
4586esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004588 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004589 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004590 grep -v '^ *+' conftest.er1 >conftest.err
4591 rm -f conftest.er1
4592 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004594 (exit $ac_status); } && {
4595 test -z "$ac_c_werror_flag" ||
4596 test ! -s conftest.err
4597 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004598 ac_cv_no_strict_aliasing_ok=yes
4599else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004600 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004601sed 's/^/| /' conftest.$ac_ext >&5
4602
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004603 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004604fi
4605
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004607fi
4608
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004609 CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004610 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4611echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004612 if test $ac_cv_no_strict_aliasing_ok = yes
4613 then
4614 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4615 fi
4616
4617 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4618 # support. Without this, treatment of subnormals doesn't follow
4619 # the standard.
4620 case $ac_sys_machine in
4621 alpha*)
4622 BASECFLAGS="$BASECFLAGS -mieee"
4623 ;;
4624 esac
4625
4626 case $ac_sys_system in
4627 SCO_SV*)
4628 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4629 ;;
4630 # is there any other compiler on Darwin besides gcc?
4631 Darwin*)
4632 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4633 # used to be here, but non-Apple gcc doesn't accept them.
4634
4635
4636 if test "${enable_universalsdk}"; then
4637 UNIVERSAL_ARCH_FLAGS=""
4638 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4639 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4640 ARCH_RUN_32BIT=""
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004641 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004642
4643 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4644 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004645 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004646 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004647
4648 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4649 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004650 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004651 ARCH_RUN_32BIT="arch -i386 -ppc"
4652
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004653 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4654 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004655 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004656 ARCH_RUN_32BIT="arch -i386"
4657
4658 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4659 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004660 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
4661 ARCH_RUN_32BIT="arch -i386 -ppc7400"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004662
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004663 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004664 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4665echo "$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 +00004666 { (exit 1); exit 1; }; }
4667
4668 fi
4669
4670
4671 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4672 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4673 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4674 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4675 fi
4676 fi
4677
4678 # Calculate the right deployment target for this build.
4679 #
4680 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4681 if test ${cur_target} '>' 10.2; then
4682 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004683 if test ${enable_universalsdk}; then
4684 if test "${UNIVERSAL_ARCHS}" = "all"; then
4685 # Ensure that the default platform for a
4686 # 4-way universal build is OSX 10.5,
4687 # that's the first OS release where
4688 # 4-way builds make sense.
4689 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004690
4691 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4692 cur_target='10.5'
4693
4694 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4695 cur_target='10.5'
4696
4697 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4698 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004699 fi
4700 else
4701 if test `arch` = "i386"; then
4702 # On Intel macs default to a deployment
4703 # target of 10.4, that's the first OSX
4704 # release with Intel support.
4705 cur_target="10.4"
4706 fi
4707 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004708 fi
4709 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4710
4711 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4712 # environment with a value that is the same as what we'll use
4713 # in the Makefile to ensure that we'll get the same compiler
4714 # environment during configure and build time.
4715 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4716 export MACOSX_DEPLOYMENT_TARGET
4717 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4718
4719 ;;
4720 OSF*)
4721 BASECFLAGS="$BASECFLAGS -mieee"
4722 ;;
4723 esac
4724 ;;
4725
4726*)
4727 case $ac_sys_system in
4728 OpenUNIX*|UnixWare*)
4729 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4730 ;;
4731 OSF*)
4732 BASECFLAGS="$BASECFLAGS -ieee -std"
4733 ;;
4734 SCO_SV*)
4735 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4736 ;;
4737 esac
4738 ;;
4739esac
4740
4741if test "$Py_DEBUG" = 'true'; then
4742 :
4743else
4744 OPT="-DNDEBUG $OPT"
4745fi
4746
4747if test "$ac_arch_flags"
4748then
4749 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4750fi
4751
4752# disable check for icc since it seems to pass, but generates a warning
4753if test "$CC" = icc
4754then
4755 ac_cv_opt_olimit_ok=no
4756fi
4757
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004758{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4759echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004760if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004761 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004762else
4763 ac_save_cc="$CC"
4764CC="$CC -OPT:Olimit=0"
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004765cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004766/* confdefs.h. */
4767_ACEOF
4768cat confdefs.h >>conftest.$ac_ext
4769cat >>conftest.$ac_ext <<_ACEOF
4770/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004771
4772int
4773main ()
4774{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004775int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004776 ;
4777 return 0;
4778}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004779_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004780rm -f conftest.$ac_objext
4781if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004782case "(($ac_try" in
4783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4784 *) ac_try_echo=$ac_try;;
4785esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004787 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004788 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004789 grep -v '^ *+' conftest.er1 >conftest.err
4790 rm -f conftest.er1
4791 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004793 (exit $ac_status); } && {
4794 test -z "$ac_c_werror_flag" ||
4795 test ! -s conftest.err
4796 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004797 ac_cv_opt_olimit_ok=yes
4798else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004799 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004800sed 's/^/| /' conftest.$ac_ext >&5
4801
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004802 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004803fi
4804
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004806CC="$ac_save_cc"
4807fi
4808
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004809{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4810echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004811if test $ac_cv_opt_olimit_ok = yes; then
4812 case $ac_sys_system in
4813 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4814 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4815 # environment?
4816 Darwin*)
4817 ;;
4818 *)
4819 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4820 ;;
4821 esac
4822else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004823 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4824echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004825 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004826 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004827else
4828 ac_save_cc="$CC"
4829 CC="$CC -Olimit 1500"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004830 cat >conftest.$ac_ext <<_ACEOF
4831/* confdefs.h. */
4832_ACEOF
4833cat confdefs.h >>conftest.$ac_ext
4834cat >>conftest.$ac_ext <<_ACEOF
4835/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004836
4837int
4838main ()
4839{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004840int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004841 ;
4842 return 0;
4843}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004844_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004845rm -f conftest.$ac_objext
4846if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004847case "(($ac_try" in
4848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4849 *) ac_try_echo=$ac_try;;
4850esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004852 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004853 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004854 grep -v '^ *+' conftest.er1 >conftest.err
4855 rm -f conftest.er1
4856 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004858 (exit $ac_status); } && {
4859 test -z "$ac_c_werror_flag" ||
4860 test ! -s conftest.err
4861 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004862 ac_cv_olimit_ok=yes
4863else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004864 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004865sed 's/^/| /' conftest.$ac_ext >&5
4866
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004867 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004868fi
4869
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004871 CC="$ac_save_cc"
4872fi
4873
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004874 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4875echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004876 if test $ac_cv_olimit_ok = yes; then
4877 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4878 fi
4879fi
4880
4881# Check whether GCC supports PyArg_ParseTuple format
4882if test "$GCC" = "yes"
4883then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004884 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4885echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004886 save_CFLAGS=$CFLAGS
4887 CFLAGS="$CFLAGS -Werror"
4888 cat >conftest.$ac_ext <<_ACEOF
4889/* confdefs.h. */
4890_ACEOF
4891cat confdefs.h >>conftest.$ac_ext
4892cat >>conftest.$ac_ext <<_ACEOF
4893/* end confdefs.h. */
4894
4895 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4896
4897int
4898main ()
4899{
4900
4901 ;
4902 return 0;
4903}
4904_ACEOF
4905rm -f conftest.$ac_objext
4906if { (ac_try="$ac_compile"
4907case "(($ac_try" in
4908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4909 *) ac_try_echo=$ac_try;;
4910esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004912 (eval "$ac_compile") 2>conftest.er1
4913 ac_status=$?
4914 grep -v '^ *+' conftest.er1 >conftest.err
4915 rm -f conftest.er1
4916 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004918 (exit $ac_status); } && {
4919 test -z "$ac_c_werror_flag" ||
4920 test ! -s conftest.err
4921 } && test -s conftest.$ac_objext; then
4922
4923cat >>confdefs.h <<\_ACEOF
4924#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4925_ACEOF
4926
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004927 { echo "$as_me:$LINENO: result: yes" >&5
4928echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004929else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004930 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004931sed 's/^/| /' conftest.$ac_ext >&5
4932
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004933 { echo "$as_me:$LINENO: result: no" >&5
4934echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004935
4936fi
4937
4938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4939 CFLAGS=$save_CFLAGS
4940fi
4941
4942# On some compilers, pthreads are available without further options
4943# (e.g. MacOS X). On some of these systems, the compiler will not
4944# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4945# So we have to see first whether pthreads are available without
4946# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004947{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4948echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004949if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004950 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004951else
4952 if test "$cross_compiling" = yes; then
4953 ac_cv_pthread_is_default=no
4954else
4955 cat >conftest.$ac_ext <<_ACEOF
4956/* confdefs.h. */
4957_ACEOF
4958cat confdefs.h >>conftest.$ac_ext
4959cat >>conftest.$ac_ext <<_ACEOF
4960/* end confdefs.h. */
4961
4962#include <pthread.h>
4963
4964void* routine(void* p){return NULL;}
4965
4966int main(){
4967 pthread_t p;
4968 if(pthread_create(&p,NULL,routine,NULL)!=0)
4969 return 1;
4970 (void)pthread_detach(p);
4971 return 0;
4972}
4973
4974_ACEOF
4975rm -f conftest$ac_exeext
4976if { (ac_try="$ac_link"
4977case "(($ac_try" in
4978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4979 *) ac_try_echo=$ac_try;;
4980esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004982 (eval "$ac_link") 2>&5
4983 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004985 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4986 { (case "(($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_try") 2>&5
4992 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004994 (exit $ac_status); }; }; then
4995
4996 ac_cv_pthread_is_default=yes
4997 ac_cv_kthread=no
4998 ac_cv_pthread=no
4999
5000else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005001 echo "$as_me: program exited with status $ac_status" >&5
5002echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005003sed 's/^/| /' conftest.$ac_ext >&5
5004
5005( exit $ac_status )
5006ac_cv_pthread_is_default=no
5007fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005008rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5009fi
5010
5011
5012
5013fi
5014
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005015{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5016echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005017
5018
5019if test $ac_cv_pthread_is_default = yes
5020then
5021 ac_cv_kpthread=no
5022else
5023# -Kpthread, if available, provides the right #defines
5024# and linker options to make pthread_create available
5025# Some compilers won't report that they do not support -Kpthread,
5026# so we need to run a program to see whether it really made the
5027# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005028{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5029echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005031 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005032else
5033 ac_save_cc="$CC"
5034CC="$CC -Kpthread"
5035if test "$cross_compiling" = yes; then
5036 ac_cv_kpthread=no
5037else
5038 cat >conftest.$ac_ext <<_ACEOF
5039/* confdefs.h. */
5040_ACEOF
5041cat confdefs.h >>conftest.$ac_ext
5042cat >>conftest.$ac_ext <<_ACEOF
5043/* end confdefs.h. */
5044
5045#include <pthread.h>
5046
5047void* routine(void* p){return NULL;}
5048
5049int main(){
5050 pthread_t p;
5051 if(pthread_create(&p,NULL,routine,NULL)!=0)
5052 return 1;
5053 (void)pthread_detach(p);
5054 return 0;
5055}
5056
5057_ACEOF
5058rm -f conftest$ac_exeext
5059if { (ac_try="$ac_link"
5060case "(($ac_try" in
5061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5062 *) ac_try_echo=$ac_try;;
5063esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005065 (eval "$ac_link") 2>&5
5066 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005068 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5069 { (case "(($ac_try" in
5070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5071 *) ac_try_echo=$ac_try;;
5072esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074 (eval "$ac_try") 2>&5
5075 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077 (exit $ac_status); }; }; then
5078 ac_cv_kpthread=yes
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_kpthread=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
5091CC="$ac_save_cc"
5092fi
5093
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005094{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5095echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005096fi
5097
5098if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5099then
5100# -Kthread, if available, provides the right #defines
5101# and linker options to make pthread_create available
5102# Some compilers won't report that they do not support -Kthread,
5103# so we need to run a program to see whether it really made the
5104# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005105{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5106echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005107if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005108 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109else
5110 ac_save_cc="$CC"
5111CC="$CC -Kthread"
5112if test "$cross_compiling" = yes; then
5113 ac_cv_kthread=no
5114else
5115 cat >conftest.$ac_ext <<_ACEOF
5116/* confdefs.h. */
5117_ACEOF
5118cat confdefs.h >>conftest.$ac_ext
5119cat >>conftest.$ac_ext <<_ACEOF
5120/* end confdefs.h. */
5121
5122#include <pthread.h>
5123
5124void* routine(void* p){return NULL;}
5125
5126int main(){
5127 pthread_t p;
5128 if(pthread_create(&p,NULL,routine,NULL)!=0)
5129 return 1;
5130 (void)pthread_detach(p);
5131 return 0;
5132}
5133
5134_ACEOF
5135rm -f conftest$ac_exeext
5136if { (ac_try="$ac_link"
5137case "(($ac_try" in
5138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5139 *) ac_try_echo=$ac_try;;
5140esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005142 (eval "$ac_link") 2>&5
5143 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005145 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5146 { (case "(($ac_try" in
5147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5148 *) ac_try_echo=$ac_try;;
5149esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005151 (eval "$ac_try") 2>&5
5152 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005154 (exit $ac_status); }; }; then
5155 ac_cv_kthread=yes
5156else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005157 echo "$as_me: program exited with status $ac_status" >&5
5158echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005159sed 's/^/| /' conftest.$ac_ext >&5
5160
5161( exit $ac_status )
5162ac_cv_kthread=no
5163fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5165fi
5166
5167
5168CC="$ac_save_cc"
5169fi
5170
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005171{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5172echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005173fi
5174
5175if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5176then
5177# -pthread, if available, provides the right #defines
5178# and linker options to make pthread_create available
5179# Some compilers won't report that they do not support -pthread,
5180# so we need to run a program to see whether it really made the
5181# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005182{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5183echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005184if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005185 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005186else
5187 ac_save_cc="$CC"
5188CC="$CC -pthread"
5189if test "$cross_compiling" = yes; then
5190 ac_cv_pthread=no
5191else
5192 cat >conftest.$ac_ext <<_ACEOF
5193/* confdefs.h. */
5194_ACEOF
5195cat confdefs.h >>conftest.$ac_ext
5196cat >>conftest.$ac_ext <<_ACEOF
5197/* end confdefs.h. */
5198
5199#include <pthread.h>
5200
5201void* routine(void* p){return NULL;}
5202
5203int main(){
5204 pthread_t p;
5205 if(pthread_create(&p,NULL,routine,NULL)!=0)
5206 return 1;
5207 (void)pthread_detach(p);
5208 return 0;
5209}
5210
5211_ACEOF
5212rm -f conftest$ac_exeext
5213if { (ac_try="$ac_link"
5214case "(($ac_try" in
5215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5216 *) ac_try_echo=$ac_try;;
5217esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005219 (eval "$ac_link") 2>&5
5220 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005222 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5223 { (case "(($ac_try" in
5224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5225 *) ac_try_echo=$ac_try;;
5226esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005228 (eval "$ac_try") 2>&5
5229 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005231 (exit $ac_status); }; }; then
5232 ac_cv_pthread=yes
5233else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005234 echo "$as_me: program exited with status $ac_status" >&5
5235echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005236sed 's/^/| /' conftest.$ac_ext >&5
5237
5238( exit $ac_status )
5239ac_cv_pthread=no
5240fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005241rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5242fi
5243
5244
5245CC="$ac_save_cc"
5246fi
5247
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005248{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5249echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005250fi
5251
5252# If we have set a CC compiler flag for thread support then
5253# check if it works for CXX, too.
5254ac_cv_cxx_thread=no
5255if test ! -z "$CXX"
5256then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005257{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5258echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005259ac_save_cxx="$CXX"
5260
5261if test "$ac_cv_kpthread" = "yes"
5262then
5263 CXX="$CXX -Kpthread"
5264 ac_cv_cxx_thread=yes
5265elif test "$ac_cv_kthread" = "yes"
5266then
5267 CXX="$CXX -Kthread"
5268 ac_cv_cxx_thread=yes
5269elif test "$ac_cv_pthread" = "yes"
5270then
5271 CXX="$CXX -pthread"
5272 ac_cv_cxx_thread=yes
5273fi
5274
5275if test $ac_cv_cxx_thread = yes
5276then
5277 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5278 $CXX -c conftest.$ac_ext 2>&5
5279 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5280 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5281 then
5282 ac_cv_cxx_thread=yes
5283 else
5284 ac_cv_cxx_thread=no
5285 fi
5286 rm -fr conftest*
5287fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005288{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5289echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005290fi
5291CXX="$ac_save_cxx"
5292
5293
5294# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005295{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5296echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005297if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005298 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005299else
5300 cat >conftest.$ac_ext <<_ACEOF
5301/* confdefs.h. */
5302_ACEOF
5303cat confdefs.h >>conftest.$ac_ext
5304cat >>conftest.$ac_ext <<_ACEOF
5305/* end confdefs.h. */
5306#include <stdlib.h>
5307#include <stdarg.h>
5308#include <string.h>
5309#include <float.h>
5310
5311int
5312main ()
5313{
5314
5315 ;
5316 return 0;
5317}
5318_ACEOF
5319rm -f conftest.$ac_objext
5320if { (ac_try="$ac_compile"
5321case "(($ac_try" in
5322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5323 *) ac_try_echo=$ac_try;;
5324esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005326 (eval "$ac_compile") 2>conftest.er1
5327 ac_status=$?
5328 grep -v '^ *+' conftest.er1 >conftest.err
5329 rm -f conftest.er1
5330 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005332 (exit $ac_status); } && {
5333 test -z "$ac_c_werror_flag" ||
5334 test ! -s conftest.err
5335 } && test -s conftest.$ac_objext; then
5336 ac_cv_header_stdc=yes
5337else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005338 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005339sed 's/^/| /' conftest.$ac_ext >&5
5340
5341 ac_cv_header_stdc=no
5342fi
5343
5344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5345
5346if test $ac_cv_header_stdc = yes; then
5347 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5348 cat >conftest.$ac_ext <<_ACEOF
5349/* confdefs.h. */
5350_ACEOF
5351cat confdefs.h >>conftest.$ac_ext
5352cat >>conftest.$ac_ext <<_ACEOF
5353/* end confdefs.h. */
5354#include <string.h>
5355
5356_ACEOF
5357if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5358 $EGREP "memchr" >/dev/null 2>&1; then
5359 :
5360else
5361 ac_cv_header_stdc=no
5362fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00005363rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005364
5365fi
5366
5367if test $ac_cv_header_stdc = yes; then
5368 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5369 cat >conftest.$ac_ext <<_ACEOF
5370/* confdefs.h. */
5371_ACEOF
5372cat confdefs.h >>conftest.$ac_ext
5373cat >>conftest.$ac_ext <<_ACEOF
5374/* end confdefs.h. */
5375#include <stdlib.h>
5376
5377_ACEOF
5378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5379 $EGREP "free" >/dev/null 2>&1; then
5380 :
5381else
5382 ac_cv_header_stdc=no
5383fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00005384rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005385
5386fi
5387
5388if test $ac_cv_header_stdc = yes; then
5389 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5390 if test "$cross_compiling" = yes; then
5391 :
5392else
5393 cat >conftest.$ac_ext <<_ACEOF
5394/* confdefs.h. */
5395_ACEOF
5396cat confdefs.h >>conftest.$ac_ext
5397cat >>conftest.$ac_ext <<_ACEOF
5398/* end confdefs.h. */
5399#include <ctype.h>
5400#include <stdlib.h>
5401#if ((' ' & 0x0FF) == 0x020)
5402# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5403# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5404#else
5405# define ISLOWER(c) \
5406 (('a' <= (c) && (c) <= 'i') \
5407 || ('j' <= (c) && (c) <= 'r') \
5408 || ('s' <= (c) && (c) <= 'z'))
5409# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5410#endif
5411
5412#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5413int
5414main ()
5415{
5416 int i;
5417 for (i = 0; i < 256; i++)
5418 if (XOR (islower (i), ISLOWER (i))
5419 || toupper (i) != TOUPPER (i))
5420 return 2;
5421 return 0;
5422}
5423_ACEOF
5424rm -f conftest$ac_exeext
5425if { (ac_try="$ac_link"
5426case "(($ac_try" in
5427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5428 *) ac_try_echo=$ac_try;;
5429esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005431 (eval "$ac_link") 2>&5
5432 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005434 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5435 { (case "(($ac_try" in
5436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5437 *) ac_try_echo=$ac_try;;
5438esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005440 (eval "$ac_try") 2>&5
5441 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443 (exit $ac_status); }; }; then
5444 :
5445else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005446 echo "$as_me: program exited with status $ac_status" >&5
5447echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005448sed 's/^/| /' conftest.$ac_ext >&5
5449
5450( exit $ac_status )
5451ac_cv_header_stdc=no
5452fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5454fi
5455
5456
5457fi
5458fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005459{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5460echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005461if test $ac_cv_header_stdc = yes; then
5462
5463cat >>confdefs.h <<\_ACEOF
5464#define STDC_HEADERS 1
5465_ACEOF
5466
5467fi
5468
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005469# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5480 inttypes.h stdint.h unistd.h
5481do
5482as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5483{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5484echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5485if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5486 echo $ECHO_N "(cached) $ECHO_C" >&6
5487else
5488 cat >conftest.$ac_ext <<_ACEOF
5489/* confdefs.h. */
5490_ACEOF
5491cat confdefs.h >>conftest.$ac_ext
5492cat >>conftest.$ac_ext <<_ACEOF
5493/* end confdefs.h. */
5494$ac_includes_default
5495
5496#include <$ac_header>
5497_ACEOF
5498rm -f conftest.$ac_objext
5499if { (ac_try="$ac_compile"
5500case "(($ac_try" in
5501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5502 *) ac_try_echo=$ac_try;;
5503esac
5504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5505 (eval "$ac_compile") 2>conftest.er1
5506 ac_status=$?
5507 grep -v '^ *+' conftest.er1 >conftest.err
5508 rm -f conftest.er1
5509 cat conftest.err >&5
5510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5511 (exit $ac_status); } && {
5512 test -z "$ac_c_werror_flag" ||
5513 test ! -s conftest.err
5514 } && test -s conftest.$ac_objext; then
5515 eval "$as_ac_Header=yes"
5516else
5517 echo "$as_me: failed program was:" >&5
5518sed 's/^/| /' conftest.$ac_ext >&5
5519
5520 eval "$as_ac_Header=no"
5521fi
5522
5523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5524fi
5525ac_res=`eval echo '${'$as_ac_Header'}'`
5526 { echo "$as_me:$LINENO: result: $ac_res" >&5
5527echo "${ECHO_T}$ac_res" >&6; }
5528if test `eval echo '${'$as_ac_Header'}'` = yes; then
5529 cat >>confdefs.h <<_ACEOF
5530#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5531_ACEOF
5532
5533fi
5534
5535done
5536
5537
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005538
Martin v. Löwis11437992002-04-12 09:54:03 +00005539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
Anthony Baxter8a560de2004-10-13 15:30:56 +00005574
Martin v. Löwisc3001752005-01-23 09:27:24 +00005575
Martin v. Löwis11017b12006-01-14 18:12:57 +00005576
Thomas Wouters477c8d52006-05-27 19:21:47 +00005577
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005578
5579
5580
5581
5582
5583
5584
5585
Thomas Wouters89f507f2006-12-13 04:49:30 +00005586
Christian Heimes043d6f62008-01-07 17:19:16 +00005587
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005588
5589
Christian Heimesbbe741d2008-03-28 10:53:29 +00005590
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005591
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005592for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5593fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005594ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005595shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005596unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005597sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5598sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005599sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005600sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005601sys/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 +00005602sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005603bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005604do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005605as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005606if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005607 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5608echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005609if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005610 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005611fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005612ac_res=`eval echo '${'$as_ac_Header'}'`
5613 { echo "$as_me:$LINENO: result: $ac_res" >&5
5614echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005615else
Martin v. Löwis11437992002-04-12 09:54:03 +00005616 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005617{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5618echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005619cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005620/* confdefs.h. */
5621_ACEOF
5622cat confdefs.h >>conftest.$ac_ext
5623cat >>conftest.$ac_ext <<_ACEOF
5624/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005625$ac_includes_default
5626#include <$ac_header>
5627_ACEOF
5628rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005629if { (ac_try="$ac_compile"
5630case "(($ac_try" in
5631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5632 *) ac_try_echo=$ac_try;;
5633esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005637 grep -v '^ *+' conftest.er1 >conftest.err
5638 rm -f conftest.er1
5639 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005641 (exit $ac_status); } && {
5642 test -z "$ac_c_werror_flag" ||
5643 test ! -s conftest.err
5644 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005645 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005646else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005648sed 's/^/| /' conftest.$ac_ext >&5
5649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005650 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005652
5653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005654{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5655echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005656
5657# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005658{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5659echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005660cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005661/* confdefs.h. */
5662_ACEOF
5663cat confdefs.h >>conftest.$ac_ext
5664cat >>conftest.$ac_ext <<_ACEOF
5665/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005666#include <$ac_header>
5667_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005668if { (ac_try="$ac_cpp conftest.$ac_ext"
5669case "(($ac_try" in
5670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5671 *) ac_try_echo=$ac_try;;
5672esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005674 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005675 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005676 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005677 rm -f conftest.er1
5678 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005680 (exit $ac_status); } >/dev/null && {
5681 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5682 test ! -s conftest.err
5683 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005684 ac_header_preproc=yes
5685else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005687sed 's/^/| /' conftest.$ac_ext >&5
5688
Martin v. Löwis11437992002-04-12 09:54:03 +00005689 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005691
Martin v. Löwis11437992002-04-12 09:54:03 +00005692rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005693{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5694echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005695
5696# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005697case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5698 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005699 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5700echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5701 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5702echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005703 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005704 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005705 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005706 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5707echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5708 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5709echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5710 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5711echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5712 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5713echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5714 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5715echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5716 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5717echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005718 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005719## -------------------------------------- ##
5720## Report this to http://bugs.python.org/ ##
5721## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005722_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005723 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005724 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005725esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005726{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5727echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005728if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005729 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005730else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005731 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005732fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005733ac_res=`eval echo '${'$as_ac_Header'}'`
5734 { echo "$as_me:$LINENO: result: $ac_res" >&5
5735echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005736
5737fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005738if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005739 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005740#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005741_ACEOF
5742
5743fi
5744
Guido van Rossum627b2d71993-12-24 10:39:16 +00005745done
5746
Martin v. Löwis11437992002-04-12 09:54:03 +00005747
5748
5749
5750
5751
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005752ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005753for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005754 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5755{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5756echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005757if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005758 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005759else
Martin v. Löwis11437992002-04-12 09:54:03 +00005760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005761/* confdefs.h. */
5762_ACEOF
5763cat confdefs.h >>conftest.$ac_ext
5764cat >>conftest.$ac_ext <<_ACEOF
5765/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005766#include <sys/types.h>
5767#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005768
Martin v. Löwis11437992002-04-12 09:54:03 +00005769int
5770main ()
5771{
5772if ((DIR *) 0)
5773return 0;
5774 ;
5775 return 0;
5776}
5777_ACEOF
5778rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005779if { (ac_try="$ac_compile"
5780case "(($ac_try" in
5781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5782 *) ac_try_echo=$ac_try;;
5783esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005787 grep -v '^ *+' conftest.er1 >conftest.err
5788 rm -f conftest.er1
5789 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005791 (exit $ac_status); } && {
5792 test -z "$ac_c_werror_flag" ||
5793 test ! -s conftest.err
5794 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005795 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005796else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005798sed 's/^/| /' conftest.$ac_ext >&5
5799
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005800 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005802
5803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005804fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005805ac_res=`eval echo '${'$as_ac_Header'}'`
5806 { echo "$as_me:$LINENO: result: $ac_res" >&5
5807echo "${ECHO_T}$ac_res" >&6; }
5808if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005809 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005810#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005811_ACEOF
5812
5813ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005814fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005815
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005816done
5817# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5818if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005819 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5820echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005821if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005822 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005823else
Martin v. Löwis11437992002-04-12 09:54:03 +00005824 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005825cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005826/* confdefs.h. */
5827_ACEOF
5828cat confdefs.h >>conftest.$ac_ext
5829cat >>conftest.$ac_ext <<_ACEOF
5830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005831
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005832/* Override any GCC internal prototype to avoid an error.
5833 Use char because int might match the return type of a GCC
5834 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005835#ifdef __cplusplus
5836extern "C"
5837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005838char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005839int
5840main ()
5841{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005842return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005843 ;
5844 return 0;
5845}
5846_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005847for ac_lib in '' dir; do
5848 if test -z "$ac_lib"; then
5849 ac_res="none required"
5850 else
5851 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005852 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005853 fi
5854 rm -f conftest.$ac_objext conftest$ac_exeext
5855if { (ac_try="$ac_link"
5856case "(($ac_try" in
5857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5858 *) ac_try_echo=$ac_try;;
5859esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005861 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005862 ac_status=$?
5863 grep -v '^ *+' conftest.er1 >conftest.err
5864 rm -f conftest.er1
5865 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005867 (exit $ac_status); } && {
5868 test -z "$ac_c_werror_flag" ||
5869 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005870 } && test -s conftest$ac_exeext &&
5871 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005872 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005873else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005874 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005875sed 's/^/| /' conftest.$ac_ext >&5
5876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005877
Thomas Wouters477c8d52006-05-27 19:21:47 +00005878fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005879
5880rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5881 conftest$ac_exeext
5882 if test "${ac_cv_search_opendir+set}" = set; then
5883 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005885done
5886if test "${ac_cv_search_opendir+set}" = set; then
5887 :
5888else
5889 ac_cv_search_opendir=no
5890fi
5891rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005892LIBS=$ac_func_search_save_LIBS
5893fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005894{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5895echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005896ac_res=$ac_cv_search_opendir
5897if test "$ac_res" != no; then
5898 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005899
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005900fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005901
Michael W. Hudson54241132001-12-07 15:38:26 +00005902else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005903 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5904echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005905if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005906 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005907else
5908 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005909cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005910/* confdefs.h. */
5911_ACEOF
5912cat confdefs.h >>conftest.$ac_ext
5913cat >>conftest.$ac_ext <<_ACEOF
5914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005916/* Override any GCC internal prototype to avoid an error.
5917 Use char because int might match the return type of a GCC
5918 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005919#ifdef __cplusplus
5920extern "C"
5921#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005922char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005923int
5924main ()
5925{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005926return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005927 ;
5928 return 0;
5929}
5930_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005931for ac_lib in '' x; do
5932 if test -z "$ac_lib"; then
5933 ac_res="none required"
5934 else
5935 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005936 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005937 fi
5938 rm -f conftest.$ac_objext conftest$ac_exeext
5939if { (ac_try="$ac_link"
5940case "(($ac_try" in
5941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5942 *) ac_try_echo=$ac_try;;
5943esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005945 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005946 ac_status=$?
5947 grep -v '^ *+' conftest.er1 >conftest.err
5948 rm -f conftest.er1
5949 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005951 (exit $ac_status); } && {
5952 test -z "$ac_c_werror_flag" ||
5953 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005954 } && test -s conftest$ac_exeext &&
5955 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005956 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005957else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005958 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005959sed 's/^/| /' conftest.$ac_ext >&5
5960
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005961
Thomas Wouters477c8d52006-05-27 19:21:47 +00005962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005963
5964rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5965 conftest$ac_exeext
5966 if test "${ac_cv_search_opendir+set}" = set; then
5967 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005969done
5970if test "${ac_cv_search_opendir+set}" = set; then
5971 :
5972else
5973 ac_cv_search_opendir=no
5974fi
5975rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005976LIBS=$ac_func_search_save_LIBS
5977fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005978{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5979echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005980ac_res=$ac_cv_search_opendir
5981if test "$ac_res" != no; then
5982 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005983
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005984fi
5985
5986fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005987
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005988{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5989echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005990if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005991 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005992else
5993 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005994/* confdefs.h. */
5995_ACEOF
5996cat confdefs.h >>conftest.$ac_ext
5997cat >>conftest.$ac_ext <<_ACEOF
5998/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005999#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006000int
6001main ()
6002{
6003return makedev(0, 0);
6004 ;
6005 return 0;
6006}
6007_ACEOF
6008rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006009if { (ac_try="$ac_link"
6010case "(($ac_try" in
6011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6012 *) ac_try_echo=$ac_try;;
6013esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006015 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006017 grep -v '^ *+' conftest.er1 >conftest.err
6018 rm -f conftest.er1
6019 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006021 (exit $ac_status); } && {
6022 test -z "$ac_c_werror_flag" ||
6023 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006024 } && test -s conftest$ac_exeext &&
6025 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006026 ac_cv_header_sys_types_h_makedev=yes
6027else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006029sed 's/^/| /' conftest.$ac_ext >&5
6030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006031 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006033
6034rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006035 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006036
6037fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006038{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6039echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006040
6041if test $ac_cv_header_sys_types_h_makedev = no; then
6042if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006043 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6044echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006045if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006046 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006047fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006048{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6049echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006050else
6051 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006052{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6053echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006054cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006055/* confdefs.h. */
6056_ACEOF
6057cat confdefs.h >>conftest.$ac_ext
6058cat >>conftest.$ac_ext <<_ACEOF
6059/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006060$ac_includes_default
6061#include <sys/mkdev.h>
6062_ACEOF
6063rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006064if { (ac_try="$ac_compile"
6065case "(($ac_try" in
6066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6067 *) ac_try_echo=$ac_try;;
6068esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006070 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006071 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006072 grep -v '^ *+' conftest.er1 >conftest.err
6073 rm -f conftest.er1
6074 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006076 (exit $ac_status); } && {
6077 test -z "$ac_c_werror_flag" ||
6078 test ! -s conftest.err
6079 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006080 ac_header_compiler=yes
6081else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006083sed 's/^/| /' conftest.$ac_ext >&5
6084
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006085 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006087
6088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006089{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6090echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091
6092# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006093{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6094echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006095cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006096/* confdefs.h. */
6097_ACEOF
6098cat confdefs.h >>conftest.$ac_ext
6099cat >>conftest.$ac_ext <<_ACEOF
6100/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006101#include <sys/mkdev.h>
6102_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006103if { (ac_try="$ac_cpp conftest.$ac_ext"
6104case "(($ac_try" in
6105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6106 *) ac_try_echo=$ac_try;;
6107esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006109 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006110 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006111 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006112 rm -f conftest.er1
6113 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006115 (exit $ac_status); } >/dev/null && {
6116 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6117 test ! -s conftest.err
6118 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006119 ac_header_preproc=yes
6120else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006122sed 's/^/| /' conftest.$ac_ext >&5
6123
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006124 ac_header_preproc=no
6125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006126
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006127rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006128{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6129echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006130
6131# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006132case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6133 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006134 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6135echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6136 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6137echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006138 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006139 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006140 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006141 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6142echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6143 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6144echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6145 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6146echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6147 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6148echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6149 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6150echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6151 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6152echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006153 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006154## -------------------------------------- ##
6155## Report this to http://bugs.python.org/ ##
6156## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006157_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006158 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006159 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006160esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006161{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6162echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006164 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006165else
6166 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6167fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006168{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6169echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006170
6171fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006172if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173
6174cat >>confdefs.h <<\_ACEOF
6175#define MAJOR_IN_MKDEV 1
6176_ACEOF
6177
6178fi
6179
6180
6181
6182 if test $ac_cv_header_sys_mkdev_h = no; then
6183 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006184 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6185echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006186if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006187 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006189{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6190echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191else
6192 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006193{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6194echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006195cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006196/* confdefs.h. */
6197_ACEOF
6198cat confdefs.h >>conftest.$ac_ext
6199cat >>conftest.$ac_ext <<_ACEOF
6200/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006201$ac_includes_default
6202#include <sys/sysmacros.h>
6203_ACEOF
6204rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006205if { (ac_try="$ac_compile"
6206case "(($ac_try" in
6207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6208 *) ac_try_echo=$ac_try;;
6209esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006211 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006213 grep -v '^ *+' conftest.er1 >conftest.err
6214 rm -f conftest.er1
6215 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006217 (exit $ac_status); } && {
6218 test -z "$ac_c_werror_flag" ||
6219 test ! -s conftest.err
6220 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006221 ac_header_compiler=yes
6222else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006224sed 's/^/| /' conftest.$ac_ext >&5
6225
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006226 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006228
6229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006230{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6231echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232
6233# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006234{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6235echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006236cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006237/* confdefs.h. */
6238_ACEOF
6239cat confdefs.h >>conftest.$ac_ext
6240cat >>conftest.$ac_ext <<_ACEOF
6241/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006242#include <sys/sysmacros.h>
6243_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006244if { (ac_try="$ac_cpp conftest.$ac_ext"
6245case "(($ac_try" in
6246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6247 *) ac_try_echo=$ac_try;;
6248esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006250 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006251 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006252 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253 rm -f conftest.er1
6254 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006256 (exit $ac_status); } >/dev/null && {
6257 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6258 test ! -s conftest.err
6259 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006260 ac_header_preproc=yes
6261else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006262 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006263sed 's/^/| /' conftest.$ac_ext >&5
6264
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006265 ac_header_preproc=no
6266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006267
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006268rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006269{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6270echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006271
6272# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006273case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6274 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006275 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6276echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6277 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6278echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006279 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006280 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006281 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006282 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6283echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6284 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6285echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6286 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6287echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6288 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6289echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6290 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6291echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6292 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6293echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006294 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006295## -------------------------------------- ##
6296## Report this to http://bugs.python.org/ ##
6297## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006298_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006299 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006300 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006302{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6303echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006305 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006306else
6307 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6308fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006309{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6310echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006311
6312fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006313if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006314
6315cat >>confdefs.h <<\_ACEOF
6316#define MAJOR_IN_SYSMACROS 1
6317_ACEOF
6318
6319fi
6320
6321
6322 fi
6323fi
6324
Michael W. Hudson54241132001-12-07 15:38:26 +00006325
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006326# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006327
6328for ac_header in term.h
6329do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006330as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6331{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6332echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006333if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006334 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006335else
6336 cat >conftest.$ac_ext <<_ACEOF
6337/* confdefs.h. */
6338_ACEOF
6339cat confdefs.h >>conftest.$ac_ext
6340cat >>conftest.$ac_ext <<_ACEOF
6341/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006342
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006343#ifdef HAVE_CURSES_H
6344#include <curses.h>
6345#endif
6346
6347
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006348#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006349_ACEOF
6350rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006351if { (ac_try="$ac_compile"
6352case "(($ac_try" in
6353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6354 *) ac_try_echo=$ac_try;;
6355esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006357 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006358 ac_status=$?
6359 grep -v '^ *+' conftest.er1 >conftest.err
6360 rm -f conftest.er1
6361 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006363 (exit $ac_status); } && {
6364 test -z "$ac_c_werror_flag" ||
6365 test ! -s conftest.err
6366 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006367 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006368else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006369 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006370sed 's/^/| /' conftest.$ac_ext >&5
6371
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006372 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006374
6375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006376fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006377ac_res=`eval echo '${'$as_ac_Header'}'`
6378 { echo "$as_me:$LINENO: result: $ac_res" >&5
6379echo "${ECHO_T}$ac_res" >&6; }
6380if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006381 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006382#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006383_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006384
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006385fi
6386
6387done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006388
6389
Martin v. Löwis11017b12006-01-14 18:12:57 +00006390# On Linux, netlink.h requires asm/types.h
6391
6392for ac_header in linux/netlink.h
6393do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006394as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6395{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6396echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006397if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006398 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006399else
6400 cat >conftest.$ac_ext <<_ACEOF
6401/* confdefs.h. */
6402_ACEOF
6403cat confdefs.h >>conftest.$ac_ext
6404cat >>conftest.$ac_ext <<_ACEOF
6405/* end confdefs.h. */
6406
6407#ifdef HAVE_ASM_TYPES_H
6408#include <asm/types.h>
6409#endif
6410#ifdef HAVE_SYS_SOCKET_H
6411#include <sys/socket.h>
6412#endif
6413
6414
6415#include <$ac_header>
6416_ACEOF
6417rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006418if { (ac_try="$ac_compile"
6419case "(($ac_try" in
6420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6421 *) ac_try_echo=$ac_try;;
6422esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006425 ac_status=$?
6426 grep -v '^ *+' conftest.er1 >conftest.err
6427 rm -f conftest.er1
6428 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006430 (exit $ac_status); } && {
6431 test -z "$ac_c_werror_flag" ||
6432 test ! -s conftest.err
6433 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006434 eval "$as_ac_Header=yes"
6435else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006436 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006437sed 's/^/| /' conftest.$ac_ext >&5
6438
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006439 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006441
6442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006443fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006444ac_res=`eval echo '${'$as_ac_Header'}'`
6445 { echo "$as_me:$LINENO: result: $ac_res" >&5
6446echo "${ECHO_T}$ac_res" >&6; }
6447if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006448 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006449#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006450_ACEOF
6451
6452fi
6453
6454done
6455
6456
Guido van Rossum627b2d71993-12-24 10:39:16 +00006457# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006458was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006459{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6460echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006461cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006462/* confdefs.h. */
6463_ACEOF
6464cat confdefs.h >>conftest.$ac_ext
6465cat >>conftest.$ac_ext <<_ACEOF
6466/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006467#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006468
6469_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006470if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006471 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006472 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006473else
Martin v. Löwis11437992002-04-12 09:54:03 +00006474
6475
6476cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006477#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006478_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006479
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006480
Guido van Rossum627b2d71993-12-24 10:39:16 +00006481fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00006482rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006483
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006484{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6485echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006486
Neal Norwitz11690112002-07-30 01:08:28 +00006487# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006488{ echo "$as_me:$LINENO: checking for makedev" >&5
6489echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006490cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006491/* confdefs.h. */
6492_ACEOF
6493cat confdefs.h >>conftest.$ac_ext
6494cat >>conftest.$ac_ext <<_ACEOF
6495/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006496#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006497int
6498main ()
6499{
6500 makedev(0, 0)
6501 ;
6502 return 0;
6503}
6504_ACEOF
6505rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006506if { (ac_try="$ac_link"
6507case "(($ac_try" in
6508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6509 *) ac_try_echo=$ac_try;;
6510esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006512 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006514 grep -v '^ *+' conftest.er1 >conftest.err
6515 rm -f conftest.er1
6516 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006518 (exit $ac_status); } && {
6519 test -z "$ac_c_werror_flag" ||
6520 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006521 } && test -s conftest$ac_exeext &&
6522 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006523 ac_cv_has_makedev=yes
6524else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006526sed 's/^/| /' conftest.$ac_ext >&5
6527
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006528 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006530
6531rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006532 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006533if test "$ac_cv_has_makedev" = "no"; then
6534 # we didn't link, try if _OSF_SOURCE will allow us to link
6535 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006536/* confdefs.h. */
6537_ACEOF
6538cat confdefs.h >>conftest.$ac_ext
6539cat >>conftest.$ac_ext <<_ACEOF
6540/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006541
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006542#define _OSF_SOURCE 1
6543#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006544
Neal Norwitz11690112002-07-30 01:08:28 +00006545int
6546main ()
6547{
6548 makedev(0, 0)
6549 ;
6550 return 0;
6551}
6552_ACEOF
6553rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006554if { (ac_try="$ac_link"
6555case "(($ac_try" in
6556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6557 *) ac_try_echo=$ac_try;;
6558esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006560 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006562 grep -v '^ *+' conftest.er1 >conftest.err
6563 rm -f conftest.er1
6564 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006566 (exit $ac_status); } && {
6567 test -z "$ac_c_werror_flag" ||
6568 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006569 } && test -s conftest$ac_exeext &&
6570 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006571 ac_cv_has_makedev=yes
6572else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006574sed 's/^/| /' conftest.$ac_ext >&5
6575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006576 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006578
6579rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006580 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006581 if test "$ac_cv_has_makedev" = "yes"; then
6582
6583cat >>confdefs.h <<\_ACEOF
6584#define _OSF_SOURCE 1
6585_ACEOF
6586
6587 fi
6588fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006589{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6590echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006591if test "$ac_cv_has_makedev" = "yes"; then
6592
6593cat >>confdefs.h <<\_ACEOF
6594#define HAVE_MAKEDEV 1
6595_ACEOF
6596
6597fi
6598
Martin v. Löwis399a6892002-10-04 10:22:02 +00006599# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6600# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6601# defined, but the compiler does not support pragma redefine_extname,
6602# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6603# structures (such as rlimit64) without declaring them. As a
6604# work-around, disable LFS on such configurations
6605
6606use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006607{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6608echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006610/* confdefs.h. */
6611_ACEOF
6612cat confdefs.h >>conftest.$ac_ext
6613cat >>conftest.$ac_ext <<_ACEOF
6614/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006615
6616#define _LARGEFILE_SOURCE 1
6617#define _FILE_OFFSET_BITS 64
6618#include <sys/resource.h>
6619
Martin v. Löwis399a6892002-10-04 10:22:02 +00006620int
6621main ()
6622{
6623struct rlimit foo;
6624 ;
6625 return 0;
6626}
6627_ACEOF
6628rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006629if { (ac_try="$ac_compile"
6630case "(($ac_try" in
6631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6632 *) ac_try_echo=$ac_try;;
6633esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006637 grep -v '^ *+' conftest.er1 >conftest.err
6638 rm -f conftest.er1
6639 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006641 (exit $ac_status); } && {
6642 test -z "$ac_c_werror_flag" ||
6643 test ! -s conftest.err
6644 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006645 sol_lfs_bug=no
6646else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006648sed 's/^/| /' conftest.$ac_ext >&5
6649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006650 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006652
6653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006654{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6655echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006656if test "$sol_lfs_bug" = "yes"; then
6657 use_lfs=no
6658fi
6659
6660if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006661# Two defines needed to enable largefile support on various platforms
6662# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006663
Martin v. Löwis11437992002-04-12 09:54:03 +00006664cat >>confdefs.h <<\_ACEOF
6665#define _LARGEFILE_SOURCE 1
6666_ACEOF
6667
6668
6669cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006670#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006671_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006672
Martin v. Löwis399a6892002-10-04 10:22:02 +00006673fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006674
Guido van Rossum84e7b241996-08-19 21:59:00 +00006675# Add some code to confdefs.h so that the test for off_t works on SCO
6676cat >> confdefs.h <<\EOF
6677#if defined(SCO_DS)
6678#undef _OFF_T
6679#endif
6680EOF
6681
Guido van Rossumef2255b2000-03-10 22:30:29 +00006682# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006683{ echo "$as_me:$LINENO: checking for mode_t" >&5
6684echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006685if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006686 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006687else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006688 cat >conftest.$ac_ext <<_ACEOF
6689/* confdefs.h. */
6690_ACEOF
6691cat confdefs.h >>conftest.$ac_ext
6692cat >>conftest.$ac_ext <<_ACEOF
6693/* end confdefs.h. */
6694$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006695typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006696int
6697main ()
6698{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006699if ((ac__type_new_ *) 0)
6700 return 0;
6701if (sizeof (ac__type_new_))
6702 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006703 ;
6704 return 0;
6705}
6706_ACEOF
6707rm -f conftest.$ac_objext
6708if { (ac_try="$ac_compile"
6709case "(($ac_try" in
6710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6711 *) ac_try_echo=$ac_try;;
6712esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006714 (eval "$ac_compile") 2>conftest.er1
6715 ac_status=$?
6716 grep -v '^ *+' conftest.er1 >conftest.err
6717 rm -f conftest.er1
6718 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006720 (exit $ac_status); } && {
6721 test -z "$ac_c_werror_flag" ||
6722 test ! -s conftest.err
6723 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006724 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006725else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006727sed 's/^/| /' conftest.$ac_ext >&5
6728
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006729 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006731
6732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006733fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006734{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6735echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6736if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006737 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006738else
Martin v. Löwis11437992002-04-12 09:54:03 +00006739
6740cat >>confdefs.h <<_ACEOF
6741#define mode_t int
6742_ACEOF
6743
6744fi
6745
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006746{ echo "$as_me:$LINENO: checking for off_t" >&5
6747echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006748if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006749 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006750else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006751 cat >conftest.$ac_ext <<_ACEOF
6752/* confdefs.h. */
6753_ACEOF
6754cat confdefs.h >>conftest.$ac_ext
6755cat >>conftest.$ac_ext <<_ACEOF
6756/* end confdefs.h. */
6757$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006758typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006759int
6760main ()
6761{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006762if ((ac__type_new_ *) 0)
6763 return 0;
6764if (sizeof (ac__type_new_))
6765 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006766 ;
6767 return 0;
6768}
6769_ACEOF
6770rm -f conftest.$ac_objext
6771if { (ac_try="$ac_compile"
6772case "(($ac_try" in
6773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6774 *) ac_try_echo=$ac_try;;
6775esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006777 (eval "$ac_compile") 2>conftest.er1
6778 ac_status=$?
6779 grep -v '^ *+' conftest.er1 >conftest.err
6780 rm -f conftest.er1
6781 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006783 (exit $ac_status); } && {
6784 test -z "$ac_c_werror_flag" ||
6785 test ! -s conftest.err
6786 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006787 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006788else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006790sed 's/^/| /' conftest.$ac_ext >&5
6791
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006792 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006794
6795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006796fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006797{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6798echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6799if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006800 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006801else
Martin v. Löwis11437992002-04-12 09:54:03 +00006802
6803cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006804#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006805_ACEOF
6806
6807fi
6808
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006809{ echo "$as_me:$LINENO: checking for pid_t" >&5
6810echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006811if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006812 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006813else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006814 cat >conftest.$ac_ext <<_ACEOF
6815/* confdefs.h. */
6816_ACEOF
6817cat confdefs.h >>conftest.$ac_ext
6818cat >>conftest.$ac_ext <<_ACEOF
6819/* end confdefs.h. */
6820$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006821typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006822int
6823main ()
6824{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006825if ((ac__type_new_ *) 0)
6826 return 0;
6827if (sizeof (ac__type_new_))
6828 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006829 ;
6830 return 0;
6831}
6832_ACEOF
6833rm -f conftest.$ac_objext
6834if { (ac_try="$ac_compile"
6835case "(($ac_try" in
6836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6837 *) ac_try_echo=$ac_try;;
6838esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006840 (eval "$ac_compile") 2>conftest.er1
6841 ac_status=$?
6842 grep -v '^ *+' conftest.er1 >conftest.err
6843 rm -f conftest.er1
6844 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006846 (exit $ac_status); } && {
6847 test -z "$ac_c_werror_flag" ||
6848 test ! -s conftest.err
6849 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006850 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006851else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006853sed 's/^/| /' conftest.$ac_ext >&5
6854
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006855 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006857
6858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006859fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006860{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6861echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6862if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006863 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006864else
Martin v. Löwis11437992002-04-12 09:54:03 +00006865
6866cat >>confdefs.h <<_ACEOF
6867#define pid_t int
6868_ACEOF
6869
6870fi
6871
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006872{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6873echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006874if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006875 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006876else
6877 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006878/* confdefs.h. */
6879_ACEOF
6880cat confdefs.h >>conftest.$ac_ext
6881cat >>conftest.$ac_ext <<_ACEOF
6882/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006883#include <sys/types.h>
6884#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006885
Martin v. Löwis11437992002-04-12 09:54:03 +00006886int
6887main ()
6888{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006889return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006890 ;
6891 return 0;
6892}
6893_ACEOF
6894rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006895if { (ac_try="$ac_compile"
6896case "(($ac_try" in
6897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6898 *) ac_try_echo=$ac_try;;
6899esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006901 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006902 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006903 grep -v '^ *+' conftest.er1 >conftest.err
6904 rm -f conftest.er1
6905 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006907 (exit $ac_status); } && {
6908 test -z "$ac_c_werror_flag" ||
6909 test ! -s conftest.err
6910 } && test -s conftest.$ac_objext; then
6911 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006912else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006913 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006914sed 's/^/| /' conftest.$ac_ext >&5
6915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006916 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006917fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006918
6919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006920fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006921{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6922echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006923
Martin v. Löwis11437992002-04-12 09:54:03 +00006924cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006925#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006926_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006927
Michael W. Hudson54241132001-12-07 15:38:26 +00006928
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006929{ echo "$as_me:$LINENO: checking for size_t" >&5
6930echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006931if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006932 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006933else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006934 cat >conftest.$ac_ext <<_ACEOF
6935/* confdefs.h. */
6936_ACEOF
6937cat confdefs.h >>conftest.$ac_ext
6938cat >>conftest.$ac_ext <<_ACEOF
6939/* end confdefs.h. */
6940$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006941typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006942int
6943main ()
6944{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006945if ((ac__type_new_ *) 0)
6946 return 0;
6947if (sizeof (ac__type_new_))
6948 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006949 ;
6950 return 0;
6951}
6952_ACEOF
6953rm -f conftest.$ac_objext
6954if { (ac_try="$ac_compile"
6955case "(($ac_try" in
6956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6957 *) ac_try_echo=$ac_try;;
6958esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006960 (eval "$ac_compile") 2>conftest.er1
6961 ac_status=$?
6962 grep -v '^ *+' conftest.er1 >conftest.err
6963 rm -f conftest.er1
6964 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006966 (exit $ac_status); } && {
6967 test -z "$ac_c_werror_flag" ||
6968 test ! -s conftest.err
6969 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006970 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006971else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006973sed 's/^/| /' conftest.$ac_ext >&5
6974
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006975 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006977
6978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006979fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006980{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6981echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6982if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006983 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006984else
Martin v. Löwis11437992002-04-12 09:54:03 +00006985
6986cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006987#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006988_ACEOF
6989
6990fi
6991
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006992{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6993echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006994if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006995 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006996else
6997 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006998/* confdefs.h. */
6999_ACEOF
7000cat confdefs.h >>conftest.$ac_ext
7001cat >>conftest.$ac_ext <<_ACEOF
7002/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007003#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007004
7005_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007007 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007008 ac_cv_type_uid_t=yes
7009else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007010 ac_cv_type_uid_t=no
7011fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007012rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007013
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007014fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007015{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7016echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007017if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007018
Martin v. Löwis11437992002-04-12 09:54:03 +00007019cat >>confdefs.h <<\_ACEOF
7020#define uid_t int
7021_ACEOF
7022
7023
7024cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007025#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007026_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007027
7028fi
7029
Mark Dickinsonbd792642009-03-18 20:06:12 +00007030
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007031 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7032echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007033if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007034 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007035else
7036 ac_cv_c_uint32_t=no
7037 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7038 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7039 cat >conftest.$ac_ext <<_ACEOF
7040/* confdefs.h. */
7041_ACEOF
7042cat confdefs.h >>conftest.$ac_ext
7043cat >>conftest.$ac_ext <<_ACEOF
7044/* end confdefs.h. */
7045$ac_includes_default
7046int
7047main ()
7048{
7049static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7050test_array [0] = 0
7051
7052 ;
7053 return 0;
7054}
7055_ACEOF
7056rm -f conftest.$ac_objext
7057if { (ac_try="$ac_compile"
7058case "(($ac_try" in
7059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7060 *) ac_try_echo=$ac_try;;
7061esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007063 (eval "$ac_compile") 2>conftest.er1
7064 ac_status=$?
7065 grep -v '^ *+' conftest.er1 >conftest.err
7066 rm -f conftest.er1
7067 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007069 (exit $ac_status); } && {
7070 test -z "$ac_c_werror_flag" ||
7071 test ! -s conftest.err
7072 } && test -s conftest.$ac_objext; then
7073 case $ac_type in
7074 uint32_t) ac_cv_c_uint32_t=yes ;;
7075 *) ac_cv_c_uint32_t=$ac_type ;;
7076esac
7077
7078else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007079 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007080sed 's/^/| /' conftest.$ac_ext >&5
7081
7082
7083fi
7084
7085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7086 test "$ac_cv_c_uint32_t" != no && break
7087 done
7088fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007089{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7090echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007091 case $ac_cv_c_uint32_t in #(
7092 no|yes) ;; #(
7093 *)
7094
7095cat >>confdefs.h <<\_ACEOF
7096#define _UINT32_T 1
7097_ACEOF
7098
7099
7100cat >>confdefs.h <<_ACEOF
7101#define uint32_t $ac_cv_c_uint32_t
7102_ACEOF
7103;;
7104 esac
7105
7106
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007107 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7108echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007109if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007110 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007111else
7112 ac_cv_c_uint64_t=no
7113 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7114 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7115 cat >conftest.$ac_ext <<_ACEOF
7116/* confdefs.h. */
7117_ACEOF
7118cat confdefs.h >>conftest.$ac_ext
7119cat >>conftest.$ac_ext <<_ACEOF
7120/* end confdefs.h. */
7121$ac_includes_default
7122int
7123main ()
7124{
7125static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7126test_array [0] = 0
7127
7128 ;
7129 return 0;
7130}
7131_ACEOF
7132rm -f conftest.$ac_objext
7133if { (ac_try="$ac_compile"
7134case "(($ac_try" in
7135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7136 *) ac_try_echo=$ac_try;;
7137esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007139 (eval "$ac_compile") 2>conftest.er1
7140 ac_status=$?
7141 grep -v '^ *+' conftest.er1 >conftest.err
7142 rm -f conftest.er1
7143 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007145 (exit $ac_status); } && {
7146 test -z "$ac_c_werror_flag" ||
7147 test ! -s conftest.err
7148 } && test -s conftest.$ac_objext; then
7149 case $ac_type in
7150 uint64_t) ac_cv_c_uint64_t=yes ;;
7151 *) ac_cv_c_uint64_t=$ac_type ;;
7152esac
7153
7154else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007155 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007156sed 's/^/| /' conftest.$ac_ext >&5
7157
7158
7159fi
7160
7161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7162 test "$ac_cv_c_uint64_t" != no && break
7163 done
7164fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007165{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7166echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007167 case $ac_cv_c_uint64_t in #(
7168 no|yes) ;; #(
7169 *)
7170
7171cat >>confdefs.h <<\_ACEOF
7172#define _UINT64_T 1
7173_ACEOF
7174
7175
7176cat >>confdefs.h <<_ACEOF
7177#define uint64_t $ac_cv_c_uint64_t
7178_ACEOF
7179;;
7180 esac
7181
7182
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007183 { echo "$as_me:$LINENO: checking for int32_t" >&5
7184echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007185if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007186 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007187else
7188 ac_cv_c_int32_t=no
7189 for ac_type in 'int32_t' 'int' 'long int' \
7190 'long long int' 'short int' 'signed char'; do
7191 cat >conftest.$ac_ext <<_ACEOF
7192/* confdefs.h. */
7193_ACEOF
7194cat confdefs.h >>conftest.$ac_ext
7195cat >>conftest.$ac_ext <<_ACEOF
7196/* end confdefs.h. */
7197$ac_includes_default
7198int
7199main ()
7200{
7201static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7202test_array [0] = 0
7203
7204 ;
7205 return 0;
7206}
7207_ACEOF
7208rm -f conftest.$ac_objext
7209if { (ac_try="$ac_compile"
7210case "(($ac_try" in
7211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7212 *) ac_try_echo=$ac_try;;
7213esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007215 (eval "$ac_compile") 2>conftest.er1
7216 ac_status=$?
7217 grep -v '^ *+' conftest.er1 >conftest.err
7218 rm -f conftest.er1
7219 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007221 (exit $ac_status); } && {
7222 test -z "$ac_c_werror_flag" ||
7223 test ! -s conftest.err
7224 } && test -s conftest.$ac_objext; then
7225 cat >conftest.$ac_ext <<_ACEOF
7226/* confdefs.h. */
7227_ACEOF
7228cat confdefs.h >>conftest.$ac_ext
7229cat >>conftest.$ac_ext <<_ACEOF
7230/* end confdefs.h. */
7231$ac_includes_default
7232int
7233main ()
7234{
7235static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007236 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007237test_array [0] = 0
7238
7239 ;
7240 return 0;
7241}
7242_ACEOF
7243rm -f conftest.$ac_objext
7244if { (ac_try="$ac_compile"
7245case "(($ac_try" in
7246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7247 *) ac_try_echo=$ac_try;;
7248esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007250 (eval "$ac_compile") 2>conftest.er1
7251 ac_status=$?
7252 grep -v '^ *+' conftest.er1 >conftest.err
7253 rm -f conftest.er1
7254 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007256 (exit $ac_status); } && {
7257 test -z "$ac_c_werror_flag" ||
7258 test ! -s conftest.err
7259 } && test -s conftest.$ac_objext; then
7260 :
7261else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007262 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007263sed 's/^/| /' conftest.$ac_ext >&5
7264
7265 case $ac_type in
7266 int32_t) ac_cv_c_int32_t=yes ;;
7267 *) ac_cv_c_int32_t=$ac_type ;;
7268esac
7269
7270fi
7271
7272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7273else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007274 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007275sed 's/^/| /' conftest.$ac_ext >&5
7276
7277
7278fi
7279
7280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7281 test "$ac_cv_c_int32_t" != no && break
7282 done
7283fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007284{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7285echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007286 case $ac_cv_c_int32_t in #(
7287 no|yes) ;; #(
7288 *)
7289
7290cat >>confdefs.h <<_ACEOF
7291#define int32_t $ac_cv_c_int32_t
7292_ACEOF
7293;;
7294 esac
7295
7296
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007297 { echo "$as_me:$LINENO: checking for int64_t" >&5
7298echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007299if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007300 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007301else
7302 ac_cv_c_int64_t=no
7303 for ac_type in 'int64_t' 'int' 'long int' \
7304 'long long int' 'short int' 'signed char'; do
7305 cat >conftest.$ac_ext <<_ACEOF
7306/* confdefs.h. */
7307_ACEOF
7308cat confdefs.h >>conftest.$ac_ext
7309cat >>conftest.$ac_ext <<_ACEOF
7310/* end confdefs.h. */
7311$ac_includes_default
7312int
7313main ()
7314{
7315static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7316test_array [0] = 0
7317
7318 ;
7319 return 0;
7320}
7321_ACEOF
7322rm -f conftest.$ac_objext
7323if { (ac_try="$ac_compile"
7324case "(($ac_try" in
7325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7326 *) ac_try_echo=$ac_try;;
7327esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007329 (eval "$ac_compile") 2>conftest.er1
7330 ac_status=$?
7331 grep -v '^ *+' conftest.er1 >conftest.err
7332 rm -f conftest.er1
7333 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007335 (exit $ac_status); } && {
7336 test -z "$ac_c_werror_flag" ||
7337 test ! -s conftest.err
7338 } && test -s conftest.$ac_objext; then
7339 cat >conftest.$ac_ext <<_ACEOF
7340/* confdefs.h. */
7341_ACEOF
7342cat confdefs.h >>conftest.$ac_ext
7343cat >>conftest.$ac_ext <<_ACEOF
7344/* end confdefs.h. */
7345$ac_includes_default
7346int
7347main ()
7348{
7349static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007350 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007351test_array [0] = 0
7352
7353 ;
7354 return 0;
7355}
7356_ACEOF
7357rm -f conftest.$ac_objext
7358if { (ac_try="$ac_compile"
7359case "(($ac_try" in
7360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7361 *) ac_try_echo=$ac_try;;
7362esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007364 (eval "$ac_compile") 2>conftest.er1
7365 ac_status=$?
7366 grep -v '^ *+' conftest.er1 >conftest.err
7367 rm -f conftest.er1
7368 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007370 (exit $ac_status); } && {
7371 test -z "$ac_c_werror_flag" ||
7372 test ! -s conftest.err
7373 } && test -s conftest.$ac_objext; then
7374 :
7375else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007376 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007377sed 's/^/| /' conftest.$ac_ext >&5
7378
7379 case $ac_type in
7380 int64_t) ac_cv_c_int64_t=yes ;;
7381 *) ac_cv_c_int64_t=$ac_type ;;
7382esac
7383
7384fi
7385
7386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7387else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007388 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007389sed 's/^/| /' conftest.$ac_ext >&5
7390
7391
7392fi
7393
7394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7395 test "$ac_cv_c_int64_t" != no && break
7396 done
7397fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007398{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7399echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007400 case $ac_cv_c_int64_t in #(
7401 no|yes) ;; #(
7402 *)
7403
7404cat >>confdefs.h <<_ACEOF
7405#define int64_t $ac_cv_c_int64_t
7406_ACEOF
7407;;
7408 esac
7409
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007410{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7411echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007412if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007413 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007414else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007415 cat >conftest.$ac_ext <<_ACEOF
7416/* confdefs.h. */
7417_ACEOF
7418cat confdefs.h >>conftest.$ac_ext
7419cat >>conftest.$ac_ext <<_ACEOF
7420/* end confdefs.h. */
7421$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007422typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007423int
7424main ()
7425{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007426if ((ac__type_new_ *) 0)
7427 return 0;
7428if (sizeof (ac__type_new_))
7429 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007430 ;
7431 return 0;
7432}
7433_ACEOF
7434rm -f conftest.$ac_objext
7435if { (ac_try="$ac_compile"
7436case "(($ac_try" in
7437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7438 *) ac_try_echo=$ac_try;;
7439esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007441 (eval "$ac_compile") 2>conftest.er1
7442 ac_status=$?
7443 grep -v '^ *+' conftest.er1 >conftest.err
7444 rm -f conftest.er1
7445 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007447 (exit $ac_status); } && {
7448 test -z "$ac_c_werror_flag" ||
7449 test ! -s conftest.err
7450 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007451 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007452else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007453 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007454sed 's/^/| /' conftest.$ac_ext >&5
7455
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007456 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007458
7459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007460fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007461{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7462echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7463if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007464
7465cat >>confdefs.h <<\_ACEOF
7466#define HAVE_SSIZE_T 1
7467_ACEOF
7468
7469fi
7470
Jack Jansendd19cf82001-12-06 22:36:17 +00007471
Michael W. Hudson54241132001-12-07 15:38:26 +00007472# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007473# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007474{ echo "$as_me:$LINENO: checking for int" >&5
7475echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7476if test "${ac_cv_type_int+set}" = set; then
7477 echo $ECHO_N "(cached) $ECHO_C" >&6
7478else
7479 cat >conftest.$ac_ext <<_ACEOF
7480/* confdefs.h. */
7481_ACEOF
7482cat confdefs.h >>conftest.$ac_ext
7483cat >>conftest.$ac_ext <<_ACEOF
7484/* end confdefs.h. */
7485$ac_includes_default
7486typedef int ac__type_new_;
7487int
7488main ()
7489{
7490if ((ac__type_new_ *) 0)
7491 return 0;
7492if (sizeof (ac__type_new_))
7493 return 0;
7494 ;
7495 return 0;
7496}
7497_ACEOF
7498rm -f conftest.$ac_objext
7499if { (ac_try="$ac_compile"
7500case "(($ac_try" in
7501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7502 *) ac_try_echo=$ac_try;;
7503esac
7504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7505 (eval "$ac_compile") 2>conftest.er1
7506 ac_status=$?
7507 grep -v '^ *+' conftest.er1 >conftest.err
7508 rm -f conftest.er1
7509 cat conftest.err >&5
7510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7511 (exit $ac_status); } && {
7512 test -z "$ac_c_werror_flag" ||
7513 test ! -s conftest.err
7514 } && test -s conftest.$ac_objext; then
7515 ac_cv_type_int=yes
7516else
7517 echo "$as_me: failed program was:" >&5
7518sed 's/^/| /' conftest.$ac_ext >&5
7519
7520 ac_cv_type_int=no
7521fi
7522
7523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7524fi
7525{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7526echo "${ECHO_T}$ac_cv_type_int" >&6; }
7527
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007528# The cast to long int works around a bug in the HP C Compiler
7529# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7530# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7531# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007532{ echo "$as_me:$LINENO: checking size of int" >&5
7533echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007534if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007535 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007536else
Martin v. Löwis11437992002-04-12 09:54:03 +00007537 if test "$cross_compiling" = yes; then
7538 # Depending upon the size, compute the lo and hi bounds.
7539cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007540/* confdefs.h. */
7541_ACEOF
7542cat confdefs.h >>conftest.$ac_ext
7543cat >>conftest.$ac_ext <<_ACEOF
7544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007545$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007546 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007547int
7548main ()
7549{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007550static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007551test_array [0] = 0
7552
7553 ;
7554 return 0;
7555}
7556_ACEOF
7557rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007558if { (ac_try="$ac_compile"
7559case "(($ac_try" in
7560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7561 *) ac_try_echo=$ac_try;;
7562esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007564 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007566 grep -v '^ *+' conftest.er1 >conftest.err
7567 rm -f conftest.er1
7568 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007570 (exit $ac_status); } && {
7571 test -z "$ac_c_werror_flag" ||
7572 test ! -s conftest.err
7573 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007574 ac_lo=0 ac_mid=0
7575 while :; do
7576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007577/* confdefs.h. */
7578_ACEOF
7579cat confdefs.h >>conftest.$ac_ext
7580cat >>conftest.$ac_ext <<_ACEOF
7581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007582$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007583 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007584int
7585main ()
7586{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007587static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007588test_array [0] = 0
7589
7590 ;
7591 return 0;
7592}
7593_ACEOF
7594rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007595if { (ac_try="$ac_compile"
7596case "(($ac_try" in
7597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7598 *) ac_try_echo=$ac_try;;
7599esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007601 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007603 grep -v '^ *+' conftest.er1 >conftest.err
7604 rm -f conftest.er1
7605 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007607 (exit $ac_status); } && {
7608 test -z "$ac_c_werror_flag" ||
7609 test ! -s conftest.err
7610 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007611 ac_hi=$ac_mid; break
7612else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007614sed 's/^/| /' conftest.$ac_ext >&5
7615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007616 ac_lo=`expr $ac_mid + 1`
7617 if test $ac_lo -le $ac_mid; then
7618 ac_lo= ac_hi=
7619 break
7620 fi
7621 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007623
7624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007625 done
7626else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007628sed 's/^/| /' conftest.$ac_ext >&5
7629
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007630 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007631/* confdefs.h. */
7632_ACEOF
7633cat confdefs.h >>conftest.$ac_ext
7634cat >>conftest.$ac_ext <<_ACEOF
7635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007636$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007637 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007638int
7639main ()
7640{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007641static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007642test_array [0] = 0
7643
7644 ;
7645 return 0;
7646}
7647_ACEOF
7648rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007649if { (ac_try="$ac_compile"
7650case "(($ac_try" in
7651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7652 *) ac_try_echo=$ac_try;;
7653esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007655 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007657 grep -v '^ *+' conftest.er1 >conftest.err
7658 rm -f conftest.er1
7659 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007661 (exit $ac_status); } && {
7662 test -z "$ac_c_werror_flag" ||
7663 test ! -s conftest.err
7664 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007665 ac_hi=-1 ac_mid=-1
7666 while :; do
7667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007668/* confdefs.h. */
7669_ACEOF
7670cat confdefs.h >>conftest.$ac_ext
7671cat >>conftest.$ac_ext <<_ACEOF
7672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007673$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007674 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007675int
7676main ()
7677{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007678static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007679test_array [0] = 0
7680
7681 ;
7682 return 0;
7683}
7684_ACEOF
7685rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007686if { (ac_try="$ac_compile"
7687case "(($ac_try" in
7688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7689 *) ac_try_echo=$ac_try;;
7690esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007692 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007694 grep -v '^ *+' conftest.er1 >conftest.err
7695 rm -f conftest.er1
7696 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007698 (exit $ac_status); } && {
7699 test -z "$ac_c_werror_flag" ||
7700 test ! -s conftest.err
7701 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007702 ac_lo=$ac_mid; break
7703else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007705sed 's/^/| /' conftest.$ac_ext >&5
7706
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007707 ac_hi=`expr '(' $ac_mid ')' - 1`
7708 if test $ac_mid -le $ac_hi; then
7709 ac_lo= ac_hi=
7710 break
7711 fi
7712 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007714
7715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007716 done
7717else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007719sed 's/^/| /' conftest.$ac_ext >&5
7720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007721 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007723
7724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007726
7727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007728# Binary search between lo and hi bounds.
7729while test "x$ac_lo" != "x$ac_hi"; do
7730 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7731 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007732/* confdefs.h. */
7733_ACEOF
7734cat confdefs.h >>conftest.$ac_ext
7735cat >>conftest.$ac_ext <<_ACEOF
7736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007737$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007738 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007739int
7740main ()
7741{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007742static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007743test_array [0] = 0
7744
7745 ;
7746 return 0;
7747}
7748_ACEOF
7749rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750if { (ac_try="$ac_compile"
7751case "(($ac_try" in
7752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7753 *) ac_try_echo=$ac_try;;
7754esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007758 grep -v '^ *+' conftest.er1 >conftest.err
7759 rm -f conftest.er1
7760 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007762 (exit $ac_status); } && {
7763 test -z "$ac_c_werror_flag" ||
7764 test ! -s conftest.err
7765 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007766 ac_hi=$ac_mid
7767else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007769sed 's/^/| /' conftest.$ac_ext >&5
7770
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007771 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007773
7774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007775done
7776case $ac_lo in
7777?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007778'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007779 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007780See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007781echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007782See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007783 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007784 else
7785 ac_cv_sizeof_int=0
7786 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007787esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007788else
Martin v. Löwis11437992002-04-12 09:54:03 +00007789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007790/* confdefs.h. */
7791_ACEOF
7792cat confdefs.h >>conftest.$ac_ext
7793cat >>conftest.$ac_ext <<_ACEOF
7794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007795$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007796 typedef int ac__type_sizeof_;
7797static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7798static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007799#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007800#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007801int
7802main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007803{
Martin v. Löwis11437992002-04-12 09:54:03 +00007804
7805 FILE *f = fopen ("conftest.val", "w");
7806 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007807 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007808 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007809 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007811 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007813 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007814 }
7815 else
7816 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007818 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007819 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007820 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007821 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007822 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007823
7824 ;
7825 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007826}
Martin v. Löwis11437992002-04-12 09:54:03 +00007827_ACEOF
7828rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007829if { (ac_try="$ac_link"
7830case "(($ac_try" in
7831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7832 *) ac_try_echo=$ac_try;;
7833esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007836 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007838 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839 { (case "(($ac_try" in
7840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7841 *) ac_try_echo=$ac_try;;
7842esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007845 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007847 (exit $ac_status); }; }; then
7848 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007849else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007850 echo "$as_me: program exited with status $ac_status" >&5
7851echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007852sed 's/^/| /' conftest.$ac_ext >&5
7853
Martin v. Löwis11437992002-04-12 09:54:03 +00007854( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007855if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007856 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007857See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007858echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007859See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007860 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861 else
7862 ac_cv_sizeof_int=0
7863 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865rm -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 +00007866fi
7867rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007868fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007869{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7870echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007871
7872
7873
Martin v. Löwis11437992002-04-12 09:54:03 +00007874cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007875#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007876_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007877
7878
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007879{ echo "$as_me:$LINENO: checking for long" >&5
7880echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7881if test "${ac_cv_type_long+set}" = set; then
7882 echo $ECHO_N "(cached) $ECHO_C" >&6
7883else
7884 cat >conftest.$ac_ext <<_ACEOF
7885/* confdefs.h. */
7886_ACEOF
7887cat confdefs.h >>conftest.$ac_ext
7888cat >>conftest.$ac_ext <<_ACEOF
7889/* end confdefs.h. */
7890$ac_includes_default
7891typedef long ac__type_new_;
7892int
7893main ()
7894{
7895if ((ac__type_new_ *) 0)
7896 return 0;
7897if (sizeof (ac__type_new_))
7898 return 0;
7899 ;
7900 return 0;
7901}
7902_ACEOF
7903rm -f conftest.$ac_objext
7904if { (ac_try="$ac_compile"
7905case "(($ac_try" in
7906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7907 *) ac_try_echo=$ac_try;;
7908esac
7909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7910 (eval "$ac_compile") 2>conftest.er1
7911 ac_status=$?
7912 grep -v '^ *+' conftest.er1 >conftest.err
7913 rm -f conftest.er1
7914 cat conftest.err >&5
7915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7916 (exit $ac_status); } && {
7917 test -z "$ac_c_werror_flag" ||
7918 test ! -s conftest.err
7919 } && test -s conftest.$ac_objext; then
7920 ac_cv_type_long=yes
7921else
7922 echo "$as_me: failed program was:" >&5
7923sed 's/^/| /' conftest.$ac_ext >&5
7924
7925 ac_cv_type_long=no
7926fi
7927
7928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7929fi
7930{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7931echo "${ECHO_T}$ac_cv_type_long" >&6; }
7932
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007933# The cast to long int works around a bug in the HP C Compiler
7934# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7935# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7936# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007937{ echo "$as_me:$LINENO: checking size of long" >&5
7938echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007939if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007940 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007941else
Martin v. Löwis11437992002-04-12 09:54:03 +00007942 if test "$cross_compiling" = yes; then
7943 # Depending upon the size, compute the lo and hi bounds.
7944cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007945/* confdefs.h. */
7946_ACEOF
7947cat confdefs.h >>conftest.$ac_ext
7948cat >>conftest.$ac_ext <<_ACEOF
7949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007950$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007951 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007952int
7953main ()
7954{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007955static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007956test_array [0] = 0
7957
7958 ;
7959 return 0;
7960}
7961_ACEOF
7962rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007963if { (ac_try="$ac_compile"
7964case "(($ac_try" in
7965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7966 *) ac_try_echo=$ac_try;;
7967esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007969 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007971 grep -v '^ *+' conftest.er1 >conftest.err
7972 rm -f conftest.er1
7973 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007975 (exit $ac_status); } && {
7976 test -z "$ac_c_werror_flag" ||
7977 test ! -s conftest.err
7978 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007979 ac_lo=0 ac_mid=0
7980 while :; do
7981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007982/* confdefs.h. */
7983_ACEOF
7984cat confdefs.h >>conftest.$ac_ext
7985cat >>conftest.$ac_ext <<_ACEOF
7986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007987$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007988 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007989int
7990main ()
7991{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007992static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007993test_array [0] = 0
7994
7995 ;
7996 return 0;
7997}
7998_ACEOF
7999rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000if { (ac_try="$ac_compile"
8001case "(($ac_try" in
8002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8003 *) ac_try_echo=$ac_try;;
8004esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008008 grep -v '^ *+' conftest.er1 >conftest.err
8009 rm -f conftest.er1
8010 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008012 (exit $ac_status); } && {
8013 test -z "$ac_c_werror_flag" ||
8014 test ! -s conftest.err
8015 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008016 ac_hi=$ac_mid; break
8017else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008019sed 's/^/| /' conftest.$ac_ext >&5
8020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021 ac_lo=`expr $ac_mid + 1`
8022 if test $ac_lo -le $ac_mid; then
8023 ac_lo= ac_hi=
8024 break
8025 fi
8026 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008028
8029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008030 done
8031else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008033sed 's/^/| /' conftest.$ac_ext >&5
8034
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008036/* confdefs.h. */
8037_ACEOF
8038cat confdefs.h >>conftest.$ac_ext
8039cat >>conftest.$ac_ext <<_ACEOF
8040/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008041$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008042 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008043int
8044main ()
8045{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008046static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008047test_array [0] = 0
8048
8049 ;
8050 return 0;
8051}
8052_ACEOF
8053rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054if { (ac_try="$ac_compile"
8055case "(($ac_try" in
8056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8057 *) ac_try_echo=$ac_try;;
8058esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008060 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008061 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008062 grep -v '^ *+' conftest.er1 >conftest.err
8063 rm -f conftest.er1
8064 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066 (exit $ac_status); } && {
8067 test -z "$ac_c_werror_flag" ||
8068 test ! -s conftest.err
8069 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008070 ac_hi=-1 ac_mid=-1
8071 while :; do
8072 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008073/* confdefs.h. */
8074_ACEOF
8075cat confdefs.h >>conftest.$ac_ext
8076cat >>conftest.$ac_ext <<_ACEOF
8077/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008078$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008079 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008080int
8081main ()
8082{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008083static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008084test_array [0] = 0
8085
8086 ;
8087 return 0;
8088}
8089_ACEOF
8090rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008091if { (ac_try="$ac_compile"
8092case "(($ac_try" in
8093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8094 *) ac_try_echo=$ac_try;;
8095esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008099 grep -v '^ *+' conftest.er1 >conftest.err
8100 rm -f conftest.er1
8101 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008103 (exit $ac_status); } && {
8104 test -z "$ac_c_werror_flag" ||
8105 test ! -s conftest.err
8106 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008107 ac_lo=$ac_mid; break
8108else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008110sed 's/^/| /' conftest.$ac_ext >&5
8111
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008112 ac_hi=`expr '(' $ac_mid ')' - 1`
8113 if test $ac_mid -le $ac_hi; then
8114 ac_lo= ac_hi=
8115 break
8116 fi
8117 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008119
8120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008121 done
8122else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008123 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008124sed 's/^/| /' conftest.$ac_ext >&5
8125
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008126 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008128
8129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008131
8132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008133# Binary search between lo and hi bounds.
8134while test "x$ac_lo" != "x$ac_hi"; do
8135 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8136 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008137/* confdefs.h. */
8138_ACEOF
8139cat confdefs.h >>conftest.$ac_ext
8140cat >>conftest.$ac_ext <<_ACEOF
8141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008142$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008143 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008144int
8145main ()
8146{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008147static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008148test_array [0] = 0
8149
8150 ;
8151 return 0;
8152}
8153_ACEOF
8154rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008155if { (ac_try="$ac_compile"
8156case "(($ac_try" in
8157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8158 *) ac_try_echo=$ac_try;;
8159esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008161 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008163 grep -v '^ *+' conftest.er1 >conftest.err
8164 rm -f conftest.er1
8165 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008167 (exit $ac_status); } && {
8168 test -z "$ac_c_werror_flag" ||
8169 test ! -s conftest.err
8170 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008171 ac_hi=$ac_mid
8172else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008174sed 's/^/| /' conftest.$ac_ext >&5
8175
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008176 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008178
8179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008180done
8181case $ac_lo in
8182?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008183'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008184 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008185See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008186echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008187See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008188 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008189 else
8190 ac_cv_sizeof_long=0
8191 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008192esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008193else
Martin v. Löwis11437992002-04-12 09:54:03 +00008194 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008195/* confdefs.h. */
8196_ACEOF
8197cat confdefs.h >>conftest.$ac_ext
8198cat >>conftest.$ac_ext <<_ACEOF
8199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008200$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008201 typedef long ac__type_sizeof_;
8202static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8203static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008204#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008205#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008206int
8207main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008208{
Martin v. Löwis11437992002-04-12 09:54:03 +00008209
8210 FILE *f = fopen ("conftest.val", "w");
8211 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008213 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008214 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008215 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008216 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008217 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008218 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008219 }
8220 else
8221 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008222 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008223 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008224 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008225 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008226 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008227 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008228
8229 ;
8230 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008231}
Martin v. Löwis11437992002-04-12 09:54:03 +00008232_ACEOF
8233rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008234if { (ac_try="$ac_link"
8235case "(($ac_try" in
8236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8237 *) ac_try_echo=$ac_try;;
8238esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008240 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008241 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008243 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008244 { (case "(($ac_try" in
8245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8246 *) ac_try_echo=$ac_try;;
8247esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008249 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008250 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008252 (exit $ac_status); }; }; then
8253 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008254else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008255 echo "$as_me: program exited with status $ac_status" >&5
8256echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008257sed 's/^/| /' conftest.$ac_ext >&5
8258
Martin v. Löwis11437992002-04-12 09:54:03 +00008259( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008261 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008262See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008263echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008264See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008265 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008266 else
8267 ac_cv_sizeof_long=0
8268 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008270rm -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 +00008271fi
8272rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008273fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008274{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8275echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008276
8277
8278
Martin v. Löwis11437992002-04-12 09:54:03 +00008279cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008280#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008281_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008282
8283
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008284{ echo "$as_me:$LINENO: checking for void *" >&5
8285echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8286if test "${ac_cv_type_void_p+set}" = set; then
8287 echo $ECHO_N "(cached) $ECHO_C" >&6
8288else
8289 cat >conftest.$ac_ext <<_ACEOF
8290/* confdefs.h. */
8291_ACEOF
8292cat confdefs.h >>conftest.$ac_ext
8293cat >>conftest.$ac_ext <<_ACEOF
8294/* end confdefs.h. */
8295$ac_includes_default
8296typedef void * ac__type_new_;
8297int
8298main ()
8299{
8300if ((ac__type_new_ *) 0)
8301 return 0;
8302if (sizeof (ac__type_new_))
8303 return 0;
8304 ;
8305 return 0;
8306}
8307_ACEOF
8308rm -f conftest.$ac_objext
8309if { (ac_try="$ac_compile"
8310case "(($ac_try" in
8311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8312 *) ac_try_echo=$ac_try;;
8313esac
8314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8315 (eval "$ac_compile") 2>conftest.er1
8316 ac_status=$?
8317 grep -v '^ *+' conftest.er1 >conftest.err
8318 rm -f conftest.er1
8319 cat conftest.err >&5
8320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8321 (exit $ac_status); } && {
8322 test -z "$ac_c_werror_flag" ||
8323 test ! -s conftest.err
8324 } && test -s conftest.$ac_objext; then
8325 ac_cv_type_void_p=yes
8326else
8327 echo "$as_me: failed program was:" >&5
8328sed 's/^/| /' conftest.$ac_ext >&5
8329
8330 ac_cv_type_void_p=no
8331fi
8332
8333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8334fi
8335{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8336echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8337
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008338# The cast to long int works around a bug in the HP C Compiler
8339# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8340# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8341# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008342{ echo "$as_me:$LINENO: checking size of void *" >&5
8343echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008344if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008345 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008346else
Martin v. Löwis11437992002-04-12 09:54:03 +00008347 if test "$cross_compiling" = yes; then
8348 # Depending upon the size, compute the lo and hi bounds.
8349cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008350/* confdefs.h. */
8351_ACEOF
8352cat confdefs.h >>conftest.$ac_ext
8353cat >>conftest.$ac_ext <<_ACEOF
8354/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008355$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008356 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008357int
8358main ()
8359{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008360static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008361test_array [0] = 0
8362
8363 ;
8364 return 0;
8365}
8366_ACEOF
8367rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008368if { (ac_try="$ac_compile"
8369case "(($ac_try" in
8370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8371 *) ac_try_echo=$ac_try;;
8372esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008374 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008375 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008376 grep -v '^ *+' conftest.er1 >conftest.err
8377 rm -f conftest.er1
8378 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008380 (exit $ac_status); } && {
8381 test -z "$ac_c_werror_flag" ||
8382 test ! -s conftest.err
8383 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008384 ac_lo=0 ac_mid=0
8385 while :; do
8386 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008387/* confdefs.h. */
8388_ACEOF
8389cat confdefs.h >>conftest.$ac_ext
8390cat >>conftest.$ac_ext <<_ACEOF
8391/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008392$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008393 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008394int
8395main ()
8396{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008397static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008398test_array [0] = 0
8399
8400 ;
8401 return 0;
8402}
8403_ACEOF
8404rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008405if { (ac_try="$ac_compile"
8406case "(($ac_try" in
8407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8408 *) ac_try_echo=$ac_try;;
8409esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008411 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008413 grep -v '^ *+' conftest.er1 >conftest.err
8414 rm -f conftest.er1
8415 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008417 (exit $ac_status); } && {
8418 test -z "$ac_c_werror_flag" ||
8419 test ! -s conftest.err
8420 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008421 ac_hi=$ac_mid; break
8422else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008423 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008424sed 's/^/| /' conftest.$ac_ext >&5
8425
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008426 ac_lo=`expr $ac_mid + 1`
8427 if test $ac_lo -le $ac_mid; then
8428 ac_lo= ac_hi=
8429 break
8430 fi
8431 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008433
8434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008435 done
8436else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008437 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008438sed 's/^/| /' conftest.$ac_ext >&5
8439
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008441/* confdefs.h. */
8442_ACEOF
8443cat confdefs.h >>conftest.$ac_ext
8444cat >>conftest.$ac_ext <<_ACEOF
8445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008446$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008447 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008448int
8449main ()
8450{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008451static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008452test_array [0] = 0
8453
8454 ;
8455 return 0;
8456}
8457_ACEOF
8458rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008459if { (ac_try="$ac_compile"
8460case "(($ac_try" in
8461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8462 *) ac_try_echo=$ac_try;;
8463esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008465 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008466 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008467 grep -v '^ *+' conftest.er1 >conftest.err
8468 rm -f conftest.er1
8469 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008471 (exit $ac_status); } && {
8472 test -z "$ac_c_werror_flag" ||
8473 test ! -s conftest.err
8474 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008475 ac_hi=-1 ac_mid=-1
8476 while :; do
8477 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008478/* confdefs.h. */
8479_ACEOF
8480cat confdefs.h >>conftest.$ac_ext
8481cat >>conftest.$ac_ext <<_ACEOF
8482/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008483$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008484 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008485int
8486main ()
8487{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008488static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008489test_array [0] = 0
8490
8491 ;
8492 return 0;
8493}
8494_ACEOF
8495rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008496if { (ac_try="$ac_compile"
8497case "(($ac_try" in
8498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8499 *) ac_try_echo=$ac_try;;
8500esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008502 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008504 grep -v '^ *+' conftest.er1 >conftest.err
8505 rm -f conftest.er1
8506 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008508 (exit $ac_status); } && {
8509 test -z "$ac_c_werror_flag" ||
8510 test ! -s conftest.err
8511 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008512 ac_lo=$ac_mid; break
8513else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008514 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008515sed 's/^/| /' conftest.$ac_ext >&5
8516
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008517 ac_hi=`expr '(' $ac_mid ')' - 1`
8518 if test $ac_mid -le $ac_hi; then
8519 ac_lo= ac_hi=
8520 break
8521 fi
8522 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008524
8525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008526 done
8527else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008528 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008529sed 's/^/| /' conftest.$ac_ext >&5
8530
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008531 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008533
8534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008536
8537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008538# Binary search between lo and hi bounds.
8539while test "x$ac_lo" != "x$ac_hi"; do
8540 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8541 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008542/* confdefs.h. */
8543_ACEOF
8544cat confdefs.h >>conftest.$ac_ext
8545cat >>conftest.$ac_ext <<_ACEOF
8546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008547$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008548 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008549int
8550main ()
8551{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008552static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008553test_array [0] = 0
8554
8555 ;
8556 return 0;
8557}
8558_ACEOF
8559rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008560if { (ac_try="$ac_compile"
8561case "(($ac_try" in
8562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8563 *) ac_try_echo=$ac_try;;
8564esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008566 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008568 grep -v '^ *+' conftest.er1 >conftest.err
8569 rm -f conftest.er1
8570 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008572 (exit $ac_status); } && {
8573 test -z "$ac_c_werror_flag" ||
8574 test ! -s conftest.err
8575 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 ac_hi=$ac_mid
8577else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008579sed 's/^/| /' conftest.$ac_ext >&5
8580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008583
8584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008585done
8586case $ac_lo in
8587?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008588'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008589 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008590See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008591echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008592See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008593 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008594 else
8595 ac_cv_sizeof_void_p=0
8596 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008597esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008598else
Martin v. Löwis11437992002-04-12 09:54:03 +00008599 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008600/* confdefs.h. */
8601_ACEOF
8602cat confdefs.h >>conftest.$ac_ext
8603cat >>conftest.$ac_ext <<_ACEOF
8604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008605$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008606 typedef void * ac__type_sizeof_;
8607static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8608static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008609#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008610#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008611int
8612main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008613{
Martin v. Löwis11437992002-04-12 09:54:03 +00008614
8615 FILE *f = fopen ("conftest.val", "w");
8616 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008618 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008619 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008620 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008621 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008623 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 }
8625 else
8626 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008628 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008630 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008631 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008632 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008633
8634 ;
8635 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008636}
Martin v. Löwis11437992002-04-12 09:54:03 +00008637_ACEOF
8638rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008639if { (ac_try="$ac_link"
8640case "(($ac_try" in
8641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8642 *) ac_try_echo=$ac_try;;
8643esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008646 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008648 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008649 { (case "(($ac_try" in
8650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8651 *) ac_try_echo=$ac_try;;
8652esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008655 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008657 (exit $ac_status); }; }; then
8658 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008659else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008660 echo "$as_me: program exited with status $ac_status" >&5
8661echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008662sed 's/^/| /' conftest.$ac_ext >&5
8663
Martin v. Löwis11437992002-04-12 09:54:03 +00008664( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008665if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008666 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008667See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008668echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008669See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008670 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671 else
8672 ac_cv_sizeof_void_p=0
8673 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675rm -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 +00008676fi
8677rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008678fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008679{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8680echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008681
8682
8683
Martin v. Löwis11437992002-04-12 09:54:03 +00008684cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008685#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008686_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008687
8688
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008689{ echo "$as_me:$LINENO: checking for short" >&5
8690echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8691if test "${ac_cv_type_short+set}" = set; then
8692 echo $ECHO_N "(cached) $ECHO_C" >&6
8693else
8694 cat >conftest.$ac_ext <<_ACEOF
8695/* confdefs.h. */
8696_ACEOF
8697cat confdefs.h >>conftest.$ac_ext
8698cat >>conftest.$ac_ext <<_ACEOF
8699/* end confdefs.h. */
8700$ac_includes_default
8701typedef short ac__type_new_;
8702int
8703main ()
8704{
8705if ((ac__type_new_ *) 0)
8706 return 0;
8707if (sizeof (ac__type_new_))
8708 return 0;
8709 ;
8710 return 0;
8711}
8712_ACEOF
8713rm -f conftest.$ac_objext
8714if { (ac_try="$ac_compile"
8715case "(($ac_try" in
8716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8717 *) ac_try_echo=$ac_try;;
8718esac
8719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8720 (eval "$ac_compile") 2>conftest.er1
8721 ac_status=$?
8722 grep -v '^ *+' conftest.er1 >conftest.err
8723 rm -f conftest.er1
8724 cat conftest.err >&5
8725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8726 (exit $ac_status); } && {
8727 test -z "$ac_c_werror_flag" ||
8728 test ! -s conftest.err
8729 } && test -s conftest.$ac_objext; then
8730 ac_cv_type_short=yes
8731else
8732 echo "$as_me: failed program was:" >&5
8733sed 's/^/| /' conftest.$ac_ext >&5
8734
8735 ac_cv_type_short=no
8736fi
8737
8738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8739fi
8740{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8741echo "${ECHO_T}$ac_cv_type_short" >&6; }
8742
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008743# The cast to long int works around a bug in the HP C Compiler
8744# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8745# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8746# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008747{ echo "$as_me:$LINENO: checking size of short" >&5
8748echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008749if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008750 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008751else
Martin v. Löwis11437992002-04-12 09:54:03 +00008752 if test "$cross_compiling" = yes; then
8753 # Depending upon the size, compute the lo and hi bounds.
8754cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008755/* confdefs.h. */
8756_ACEOF
8757cat confdefs.h >>conftest.$ac_ext
8758cat >>conftest.$ac_ext <<_ACEOF
8759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008760$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008761 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008762int
8763main ()
8764{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008765static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008766test_array [0] = 0
8767
8768 ;
8769 return 0;
8770}
8771_ACEOF
8772rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008773if { (ac_try="$ac_compile"
8774case "(($ac_try" in
8775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8776 *) ac_try_echo=$ac_try;;
8777esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008781 grep -v '^ *+' conftest.er1 >conftest.err
8782 rm -f conftest.er1
8783 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008785 (exit $ac_status); } && {
8786 test -z "$ac_c_werror_flag" ||
8787 test ! -s conftest.err
8788 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008789 ac_lo=0 ac_mid=0
8790 while :; do
8791 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008792/* confdefs.h. */
8793_ACEOF
8794cat confdefs.h >>conftest.$ac_ext
8795cat >>conftest.$ac_ext <<_ACEOF
8796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008797$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008798 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008799int
8800main ()
8801{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008802static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008803test_array [0] = 0
8804
8805 ;
8806 return 0;
8807}
8808_ACEOF
8809rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008810if { (ac_try="$ac_compile"
8811case "(($ac_try" in
8812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8813 *) ac_try_echo=$ac_try;;
8814esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008816 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008818 grep -v '^ *+' conftest.er1 >conftest.err
8819 rm -f conftest.er1
8820 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008822 (exit $ac_status); } && {
8823 test -z "$ac_c_werror_flag" ||
8824 test ! -s conftest.err
8825 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 ac_hi=$ac_mid; break
8827else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008829sed 's/^/| /' conftest.$ac_ext >&5
8830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008831 ac_lo=`expr $ac_mid + 1`
8832 if test $ac_lo -le $ac_mid; then
8833 ac_lo= ac_hi=
8834 break
8835 fi
8836 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008838
8839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008840 done
8841else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008843sed 's/^/| /' conftest.$ac_ext >&5
8844
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008845 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008846/* confdefs.h. */
8847_ACEOF
8848cat confdefs.h >>conftest.$ac_ext
8849cat >>conftest.$ac_ext <<_ACEOF
8850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008851$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008852 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008853int
8854main ()
8855{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008856static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008857test_array [0] = 0
8858
8859 ;
8860 return 0;
8861}
8862_ACEOF
8863rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008864if { (ac_try="$ac_compile"
8865case "(($ac_try" in
8866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8867 *) ac_try_echo=$ac_try;;
8868esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008870 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008872 grep -v '^ *+' conftest.er1 >conftest.err
8873 rm -f conftest.er1
8874 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008876 (exit $ac_status); } && {
8877 test -z "$ac_c_werror_flag" ||
8878 test ! -s conftest.err
8879 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008880 ac_hi=-1 ac_mid=-1
8881 while :; do
8882 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008883/* confdefs.h. */
8884_ACEOF
8885cat confdefs.h >>conftest.$ac_ext
8886cat >>conftest.$ac_ext <<_ACEOF
8887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008888$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008889 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008890int
8891main ()
8892{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008893static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008894test_array [0] = 0
8895
8896 ;
8897 return 0;
8898}
8899_ACEOF
8900rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008901if { (ac_try="$ac_compile"
8902case "(($ac_try" in
8903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8904 *) ac_try_echo=$ac_try;;
8905esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008909 grep -v '^ *+' conftest.er1 >conftest.err
8910 rm -f conftest.er1
8911 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008913 (exit $ac_status); } && {
8914 test -z "$ac_c_werror_flag" ||
8915 test ! -s conftest.err
8916 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008917 ac_lo=$ac_mid; break
8918else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008920sed 's/^/| /' conftest.$ac_ext >&5
8921
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008922 ac_hi=`expr '(' $ac_mid ')' - 1`
8923 if test $ac_mid -le $ac_hi; then
8924 ac_lo= ac_hi=
8925 break
8926 fi
8927 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008929
8930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008931 done
8932else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008934sed 's/^/| /' conftest.$ac_ext >&5
8935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008936 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008938
8939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008941
8942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008943# Binary search between lo and hi bounds.
8944while test "x$ac_lo" != "x$ac_hi"; do
8945 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8946 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008947/* confdefs.h. */
8948_ACEOF
8949cat confdefs.h >>conftest.$ac_ext
8950cat >>conftest.$ac_ext <<_ACEOF
8951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008952$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008953 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008954int
8955main ()
8956{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008957static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008958test_array [0] = 0
8959
8960 ;
8961 return 0;
8962}
8963_ACEOF
8964rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008965if { (ac_try="$ac_compile"
8966case "(($ac_try" in
8967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8968 *) ac_try_echo=$ac_try;;
8969esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008971 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008973 grep -v '^ *+' conftest.er1 >conftest.err
8974 rm -f conftest.er1
8975 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008977 (exit $ac_status); } && {
8978 test -z "$ac_c_werror_flag" ||
8979 test ! -s conftest.err
8980 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 ac_hi=$ac_mid
8982else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008984sed 's/^/| /' conftest.$ac_ext >&5
8985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008986 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008988
8989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008990done
8991case $ac_lo in
8992?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008993'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008994 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008995See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008996echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008997See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008998 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008999 else
9000 ac_cv_sizeof_short=0
9001 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009002esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009003else
Martin v. Löwis11437992002-04-12 09:54:03 +00009004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009005/* confdefs.h. */
9006_ACEOF
9007cat confdefs.h >>conftest.$ac_ext
9008cat >>conftest.$ac_ext <<_ACEOF
9009/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009010$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009011 typedef short ac__type_sizeof_;
9012static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9013static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009014#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009015#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009016int
9017main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009018{
Martin v. Löwis11437992002-04-12 09:54:03 +00009019
9020 FILE *f = fopen ("conftest.val", "w");
9021 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009022 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009023 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009024 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009025 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009026 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009027 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009028 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009029 }
9030 else
9031 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009032 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009033 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009034 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009035 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009036 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009037 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009038
9039 ;
9040 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009041}
Martin v. Löwis11437992002-04-12 09:54:03 +00009042_ACEOF
9043rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009044if { (ac_try="$ac_link"
9045case "(($ac_try" in
9046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9047 *) ac_try_echo=$ac_try;;
9048esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009050 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009051 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009053 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009054 { (case "(($ac_try" in
9055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9056 *) ac_try_echo=$ac_try;;
9057esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009059 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009060 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009062 (exit $ac_status); }; }; then
9063 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009064else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009065 echo "$as_me: program exited with status $ac_status" >&5
9066echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009067sed 's/^/| /' conftest.$ac_ext >&5
9068
Martin v. Löwis11437992002-04-12 09:54:03 +00009069( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009070if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009071 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009072See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009073echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009074See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009075 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009076 else
9077 ac_cv_sizeof_short=0
9078 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009080rm -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 +00009081fi
9082rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009083fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009084{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9085echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009086
9087
9088
Martin v. Löwis11437992002-04-12 09:54:03 +00009089cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009090#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009091_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009092
9093
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009094{ echo "$as_me:$LINENO: checking for float" >&5
9095echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9096if test "${ac_cv_type_float+set}" = set; then
9097 echo $ECHO_N "(cached) $ECHO_C" >&6
9098else
9099 cat >conftest.$ac_ext <<_ACEOF
9100/* confdefs.h. */
9101_ACEOF
9102cat confdefs.h >>conftest.$ac_ext
9103cat >>conftest.$ac_ext <<_ACEOF
9104/* end confdefs.h. */
9105$ac_includes_default
9106typedef float ac__type_new_;
9107int
9108main ()
9109{
9110if ((ac__type_new_ *) 0)
9111 return 0;
9112if (sizeof (ac__type_new_))
9113 return 0;
9114 ;
9115 return 0;
9116}
9117_ACEOF
9118rm -f conftest.$ac_objext
9119if { (ac_try="$ac_compile"
9120case "(($ac_try" in
9121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9122 *) ac_try_echo=$ac_try;;
9123esac
9124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9125 (eval "$ac_compile") 2>conftest.er1
9126 ac_status=$?
9127 grep -v '^ *+' conftest.er1 >conftest.err
9128 rm -f conftest.er1
9129 cat conftest.err >&5
9130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9131 (exit $ac_status); } && {
9132 test -z "$ac_c_werror_flag" ||
9133 test ! -s conftest.err
9134 } && test -s conftest.$ac_objext; then
9135 ac_cv_type_float=yes
9136else
9137 echo "$as_me: failed program was:" >&5
9138sed 's/^/| /' conftest.$ac_ext >&5
9139
9140 ac_cv_type_float=no
9141fi
9142
9143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9144fi
9145{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9146echo "${ECHO_T}$ac_cv_type_float" >&6; }
9147
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009148# The cast to long int works around a bug in the HP C Compiler
9149# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9150# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9151# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009152{ echo "$as_me:$LINENO: checking size of float" >&5
9153echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009154if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009155 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009156else
Martin v. Löwis11437992002-04-12 09:54:03 +00009157 if test "$cross_compiling" = yes; then
9158 # Depending upon the size, compute the lo and hi bounds.
9159cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009160/* confdefs.h. */
9161_ACEOF
9162cat confdefs.h >>conftest.$ac_ext
9163cat >>conftest.$ac_ext <<_ACEOF
9164/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009165$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009166 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009167int
9168main ()
9169{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009170static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009171test_array [0] = 0
9172
9173 ;
9174 return 0;
9175}
9176_ACEOF
9177rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009178if { (ac_try="$ac_compile"
9179case "(($ac_try" in
9180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9181 *) ac_try_echo=$ac_try;;
9182esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009184 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009186 grep -v '^ *+' conftest.er1 >conftest.err
9187 rm -f conftest.er1
9188 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009190 (exit $ac_status); } && {
9191 test -z "$ac_c_werror_flag" ||
9192 test ! -s conftest.err
9193 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009194 ac_lo=0 ac_mid=0
9195 while :; do
9196 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009197/* confdefs.h. */
9198_ACEOF
9199cat confdefs.h >>conftest.$ac_ext
9200cat >>conftest.$ac_ext <<_ACEOF
9201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009202$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009203 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009204int
9205main ()
9206{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009207static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009208test_array [0] = 0
9209
9210 ;
9211 return 0;
9212}
9213_ACEOF
9214rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009215if { (ac_try="$ac_compile"
9216case "(($ac_try" in
9217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9218 *) ac_try_echo=$ac_try;;
9219esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009221 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009223 grep -v '^ *+' conftest.er1 >conftest.err
9224 rm -f conftest.er1
9225 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009227 (exit $ac_status); } && {
9228 test -z "$ac_c_werror_flag" ||
9229 test ! -s conftest.err
9230 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009231 ac_hi=$ac_mid; break
9232else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009234sed 's/^/| /' conftest.$ac_ext >&5
9235
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009236 ac_lo=`expr $ac_mid + 1`
9237 if test $ac_lo -le $ac_mid; then
9238 ac_lo= ac_hi=
9239 break
9240 fi
9241 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009243
9244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009245 done
9246else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009248sed 's/^/| /' conftest.$ac_ext >&5
9249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009250 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009251/* confdefs.h. */
9252_ACEOF
9253cat confdefs.h >>conftest.$ac_ext
9254cat >>conftest.$ac_ext <<_ACEOF
9255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009256$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009257 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009258int
9259main ()
9260{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009261static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009262test_array [0] = 0
9263
9264 ;
9265 return 0;
9266}
9267_ACEOF
9268rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009269if { (ac_try="$ac_compile"
9270case "(($ac_try" in
9271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9272 *) ac_try_echo=$ac_try;;
9273esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009275 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009276 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009277 grep -v '^ *+' conftest.er1 >conftest.err
9278 rm -f conftest.er1
9279 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009281 (exit $ac_status); } && {
9282 test -z "$ac_c_werror_flag" ||
9283 test ! -s conftest.err
9284 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009285 ac_hi=-1 ac_mid=-1
9286 while :; do
9287 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009288/* confdefs.h. */
9289_ACEOF
9290cat confdefs.h >>conftest.$ac_ext
9291cat >>conftest.$ac_ext <<_ACEOF
9292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009293$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009294 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009295int
9296main ()
9297{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009298static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009299test_array [0] = 0
9300
9301 ;
9302 return 0;
9303}
9304_ACEOF
9305rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009306if { (ac_try="$ac_compile"
9307case "(($ac_try" in
9308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9309 *) ac_try_echo=$ac_try;;
9310esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009312 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009314 grep -v '^ *+' conftest.er1 >conftest.err
9315 rm -f conftest.er1
9316 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009318 (exit $ac_status); } && {
9319 test -z "$ac_c_werror_flag" ||
9320 test ! -s conftest.err
9321 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009322 ac_lo=$ac_mid; break
9323else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009325sed 's/^/| /' conftest.$ac_ext >&5
9326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009327 ac_hi=`expr '(' $ac_mid ')' - 1`
9328 if test $ac_mid -le $ac_hi; then
9329 ac_lo= ac_hi=
9330 break
9331 fi
9332 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009334
9335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009336 done
9337else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009338 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009339sed 's/^/| /' conftest.$ac_ext >&5
9340
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009341 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009343
9344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009346
9347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009348# Binary search between lo and hi bounds.
9349while test "x$ac_lo" != "x$ac_hi"; do
9350 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9351 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009352/* confdefs.h. */
9353_ACEOF
9354cat confdefs.h >>conftest.$ac_ext
9355cat >>conftest.$ac_ext <<_ACEOF
9356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009357$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009358 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009359int
9360main ()
9361{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009362static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009363test_array [0] = 0
9364
9365 ;
9366 return 0;
9367}
9368_ACEOF
9369rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009370if { (ac_try="$ac_compile"
9371case "(($ac_try" in
9372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9373 *) ac_try_echo=$ac_try;;
9374esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009376 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009377 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009378 grep -v '^ *+' conftest.er1 >conftest.err
9379 rm -f conftest.er1
9380 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009382 (exit $ac_status); } && {
9383 test -z "$ac_c_werror_flag" ||
9384 test ! -s conftest.err
9385 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 ac_hi=$ac_mid
9387else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009389sed 's/^/| /' conftest.$ac_ext >&5
9390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009391 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009393
9394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009395done
9396case $ac_lo in
9397?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009398'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009399 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009400See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009401echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009402See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009403 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009404 else
9405 ac_cv_sizeof_float=0
9406 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009407esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009408else
Martin v. Löwis11437992002-04-12 09:54:03 +00009409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009410/* confdefs.h. */
9411_ACEOF
9412cat confdefs.h >>conftest.$ac_ext
9413cat >>conftest.$ac_ext <<_ACEOF
9414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009415$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009416 typedef float ac__type_sizeof_;
9417static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9418static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009419#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009420#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009421int
9422main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009423{
Martin v. Löwis11437992002-04-12 09:54:03 +00009424
9425 FILE *f = fopen ("conftest.val", "w");
9426 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009427 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009428 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009429 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009430 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009431 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009432 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009433 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009434 }
9435 else
9436 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009437 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009438 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009439 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009440 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009441 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009442 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009443
9444 ;
9445 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009446}
Martin v. Löwis11437992002-04-12 09:54:03 +00009447_ACEOF
9448rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009449if { (ac_try="$ac_link"
9450case "(($ac_try" in
9451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9452 *) ac_try_echo=$ac_try;;
9453esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009455 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009456 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009458 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009459 { (case "(($ac_try" in
9460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9461 *) ac_try_echo=$ac_try;;
9462esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009464 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009465 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009467 (exit $ac_status); }; }; then
9468 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009469else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009470 echo "$as_me: program exited with status $ac_status" >&5
9471echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009472sed 's/^/| /' conftest.$ac_ext >&5
9473
Martin v. Löwis11437992002-04-12 09:54:03 +00009474( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009475if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009476 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009477See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009478echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009479See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009480 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009481 else
9482 ac_cv_sizeof_float=0
9483 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009485rm -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 +00009486fi
9487rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009488fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009489{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9490echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009491
9492
9493
Martin v. Löwis11437992002-04-12 09:54:03 +00009494cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009495#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009496_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009497
9498
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009499{ echo "$as_me:$LINENO: checking for double" >&5
9500echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9501if test "${ac_cv_type_double+set}" = set; then
9502 echo $ECHO_N "(cached) $ECHO_C" >&6
9503else
9504 cat >conftest.$ac_ext <<_ACEOF
9505/* confdefs.h. */
9506_ACEOF
9507cat confdefs.h >>conftest.$ac_ext
9508cat >>conftest.$ac_ext <<_ACEOF
9509/* end confdefs.h. */
9510$ac_includes_default
9511typedef double ac__type_new_;
9512int
9513main ()
9514{
9515if ((ac__type_new_ *) 0)
9516 return 0;
9517if (sizeof (ac__type_new_))
9518 return 0;
9519 ;
9520 return 0;
9521}
9522_ACEOF
9523rm -f conftest.$ac_objext
9524if { (ac_try="$ac_compile"
9525case "(($ac_try" in
9526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9527 *) ac_try_echo=$ac_try;;
9528esac
9529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9530 (eval "$ac_compile") 2>conftest.er1
9531 ac_status=$?
9532 grep -v '^ *+' conftest.er1 >conftest.err
9533 rm -f conftest.er1
9534 cat conftest.err >&5
9535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9536 (exit $ac_status); } && {
9537 test -z "$ac_c_werror_flag" ||
9538 test ! -s conftest.err
9539 } && test -s conftest.$ac_objext; then
9540 ac_cv_type_double=yes
9541else
9542 echo "$as_me: failed program was:" >&5
9543sed 's/^/| /' conftest.$ac_ext >&5
9544
9545 ac_cv_type_double=no
9546fi
9547
9548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9549fi
9550{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9551echo "${ECHO_T}$ac_cv_type_double" >&6; }
9552
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009553# The cast to long int works around a bug in the HP C Compiler
9554# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9555# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9556# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009557{ echo "$as_me:$LINENO: checking size of double" >&5
9558echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009559if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009560 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009561else
Martin v. Löwis11437992002-04-12 09:54:03 +00009562 if test "$cross_compiling" = yes; then
9563 # Depending upon the size, compute the lo and hi bounds.
9564cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009565/* confdefs.h. */
9566_ACEOF
9567cat confdefs.h >>conftest.$ac_ext
9568cat >>conftest.$ac_ext <<_ACEOF
9569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009570$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009571 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009572int
9573main ()
9574{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009575static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009576test_array [0] = 0
9577
9578 ;
9579 return 0;
9580}
9581_ACEOF
9582rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009583if { (ac_try="$ac_compile"
9584case "(($ac_try" in
9585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9586 *) ac_try_echo=$ac_try;;
9587esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009589 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009591 grep -v '^ *+' conftest.er1 >conftest.err
9592 rm -f conftest.er1
9593 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009595 (exit $ac_status); } && {
9596 test -z "$ac_c_werror_flag" ||
9597 test ! -s conftest.err
9598 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009599 ac_lo=0 ac_mid=0
9600 while :; do
9601 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009602/* confdefs.h. */
9603_ACEOF
9604cat confdefs.h >>conftest.$ac_ext
9605cat >>conftest.$ac_ext <<_ACEOF
9606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009607$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009608 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009609int
9610main ()
9611{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009612static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009613test_array [0] = 0
9614
9615 ;
9616 return 0;
9617}
9618_ACEOF
9619rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620if { (ac_try="$ac_compile"
9621case "(($ac_try" in
9622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9623 *) ac_try_echo=$ac_try;;
9624esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009626 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009627 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009628 grep -v '^ *+' conftest.er1 >conftest.err
9629 rm -f conftest.er1
9630 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009632 (exit $ac_status); } && {
9633 test -z "$ac_c_werror_flag" ||
9634 test ! -s conftest.err
9635 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009636 ac_hi=$ac_mid; break
9637else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009639sed 's/^/| /' conftest.$ac_ext >&5
9640
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009641 ac_lo=`expr $ac_mid + 1`
9642 if test $ac_lo -le $ac_mid; then
9643 ac_lo= ac_hi=
9644 break
9645 fi
9646 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009648
9649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009650 done
9651else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009653sed 's/^/| /' conftest.$ac_ext >&5
9654
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009655 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009656/* confdefs.h. */
9657_ACEOF
9658cat confdefs.h >>conftest.$ac_ext
9659cat >>conftest.$ac_ext <<_ACEOF
9660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009661$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009662 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009663int
9664main ()
9665{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009666static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009667test_array [0] = 0
9668
9669 ;
9670 return 0;
9671}
9672_ACEOF
9673rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009674if { (ac_try="$ac_compile"
9675case "(($ac_try" in
9676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9677 *) ac_try_echo=$ac_try;;
9678esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009680 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009682 grep -v '^ *+' conftest.er1 >conftest.err
9683 rm -f conftest.er1
9684 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009686 (exit $ac_status); } && {
9687 test -z "$ac_c_werror_flag" ||
9688 test ! -s conftest.err
9689 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009690 ac_hi=-1 ac_mid=-1
9691 while :; do
9692 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009693/* confdefs.h. */
9694_ACEOF
9695cat confdefs.h >>conftest.$ac_ext
9696cat >>conftest.$ac_ext <<_ACEOF
9697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009698$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009699 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009700int
9701main ()
9702{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009703static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009704test_array [0] = 0
9705
9706 ;
9707 return 0;
9708}
9709_ACEOF
9710rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009711if { (ac_try="$ac_compile"
9712case "(($ac_try" in
9713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9714 *) ac_try_echo=$ac_try;;
9715esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009717 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009719 grep -v '^ *+' conftest.er1 >conftest.err
9720 rm -f conftest.er1
9721 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009723 (exit $ac_status); } && {
9724 test -z "$ac_c_werror_flag" ||
9725 test ! -s conftest.err
9726 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009727 ac_lo=$ac_mid; break
9728else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009730sed 's/^/| /' conftest.$ac_ext >&5
9731
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009732 ac_hi=`expr '(' $ac_mid ')' - 1`
9733 if test $ac_mid -le $ac_hi; then
9734 ac_lo= ac_hi=
9735 break
9736 fi
9737 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009739
9740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009741 done
9742else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009744sed 's/^/| /' conftest.$ac_ext >&5
9745
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009746 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009748
9749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009751
9752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009753# Binary search between lo and hi bounds.
9754while test "x$ac_lo" != "x$ac_hi"; do
9755 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9756 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009757/* confdefs.h. */
9758_ACEOF
9759cat confdefs.h >>conftest.$ac_ext
9760cat >>conftest.$ac_ext <<_ACEOF
9761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009762$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009763 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009764int
9765main ()
9766{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009767static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009768test_array [0] = 0
9769
9770 ;
9771 return 0;
9772}
9773_ACEOF
9774rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009775if { (ac_try="$ac_compile"
9776case "(($ac_try" in
9777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9778 *) ac_try_echo=$ac_try;;
9779esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009783 grep -v '^ *+' conftest.er1 >conftest.err
9784 rm -f conftest.er1
9785 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009787 (exit $ac_status); } && {
9788 test -z "$ac_c_werror_flag" ||
9789 test ! -s conftest.err
9790 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 ac_hi=$ac_mid
9792else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009794sed 's/^/| /' conftest.$ac_ext >&5
9795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009796 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009798
9799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009800done
9801case $ac_lo in
9802?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009803'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009804 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009805See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009806echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009807See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009808 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009809 else
9810 ac_cv_sizeof_double=0
9811 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009812esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009813else
Martin v. Löwis11437992002-04-12 09:54:03 +00009814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009815/* confdefs.h. */
9816_ACEOF
9817cat confdefs.h >>conftest.$ac_ext
9818cat >>conftest.$ac_ext <<_ACEOF
9819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009820$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009821 typedef double ac__type_sizeof_;
9822static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9823static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009824#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009825#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009826int
9827main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009828{
Martin v. Löwis11437992002-04-12 09:54:03 +00009829
9830 FILE *f = fopen ("conftest.val", "w");
9831 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009833 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009834 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009835 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009836 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009837 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009838 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009839 }
9840 else
9841 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009842 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009843 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009844 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009845 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009846 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009847 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009848
9849 ;
9850 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009851}
Martin v. Löwis11437992002-04-12 09:54:03 +00009852_ACEOF
9853rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854if { (ac_try="$ac_link"
9855case "(($ac_try" in
9856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9857 *) ac_try_echo=$ac_try;;
9858esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009860 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009861 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009863 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864 { (case "(($ac_try" in
9865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9866 *) ac_try_echo=$ac_try;;
9867esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009870 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009872 (exit $ac_status); }; }; then
9873 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009874else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009875 echo "$as_me: program exited with status $ac_status" >&5
9876echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009877sed 's/^/| /' conftest.$ac_ext >&5
9878
Martin v. Löwis11437992002-04-12 09:54:03 +00009879( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009881 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009882See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009883echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009884See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009885 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886 else
9887 ac_cv_sizeof_double=0
9888 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009890rm -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 +00009891fi
9892rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009893fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009894{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9895echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009896
9897
9898
Martin v. Löwis11437992002-04-12 09:54:03 +00009899cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009900#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009901_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009902
9903
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009904{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9905echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9906if test "${ac_cv_type_fpos_t+set}" = set; then
9907 echo $ECHO_N "(cached) $ECHO_C" >&6
9908else
9909 cat >conftest.$ac_ext <<_ACEOF
9910/* confdefs.h. */
9911_ACEOF
9912cat confdefs.h >>conftest.$ac_ext
9913cat >>conftest.$ac_ext <<_ACEOF
9914/* end confdefs.h. */
9915$ac_includes_default
9916typedef fpos_t ac__type_new_;
9917int
9918main ()
9919{
9920if ((ac__type_new_ *) 0)
9921 return 0;
9922if (sizeof (ac__type_new_))
9923 return 0;
9924 ;
9925 return 0;
9926}
9927_ACEOF
9928rm -f conftest.$ac_objext
9929if { (ac_try="$ac_compile"
9930case "(($ac_try" in
9931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9932 *) ac_try_echo=$ac_try;;
9933esac
9934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9935 (eval "$ac_compile") 2>conftest.er1
9936 ac_status=$?
9937 grep -v '^ *+' conftest.er1 >conftest.err
9938 rm -f conftest.er1
9939 cat conftest.err >&5
9940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9941 (exit $ac_status); } && {
9942 test -z "$ac_c_werror_flag" ||
9943 test ! -s conftest.err
9944 } && test -s conftest.$ac_objext; then
9945 ac_cv_type_fpos_t=yes
9946else
9947 echo "$as_me: failed program was:" >&5
9948sed 's/^/| /' conftest.$ac_ext >&5
9949
9950 ac_cv_type_fpos_t=no
9951fi
9952
9953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9954fi
9955{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9956echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9957
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009958# The cast to long int works around a bug in the HP C Compiler
9959# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9960# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9961# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009962{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9963echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009964if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009965 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009966else
Martin v. Löwis11437992002-04-12 09:54:03 +00009967 if test "$cross_compiling" = yes; then
9968 # Depending upon the size, compute the lo and hi bounds.
9969cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009970/* confdefs.h. */
9971_ACEOF
9972cat confdefs.h >>conftest.$ac_ext
9973cat >>conftest.$ac_ext <<_ACEOF
9974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009975$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009976 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009977int
9978main ()
9979{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009980static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009981test_array [0] = 0
9982
9983 ;
9984 return 0;
9985}
9986_ACEOF
9987rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009988if { (ac_try="$ac_compile"
9989case "(($ac_try" in
9990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9991 *) ac_try_echo=$ac_try;;
9992esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009994 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009996 grep -v '^ *+' conftest.er1 >conftest.err
9997 rm -f conftest.er1
9998 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010000 (exit $ac_status); } && {
10001 test -z "$ac_c_werror_flag" ||
10002 test ! -s conftest.err
10003 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010004 ac_lo=0 ac_mid=0
10005 while :; do
10006 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010007/* confdefs.h. */
10008_ACEOF
10009cat confdefs.h >>conftest.$ac_ext
10010cat >>conftest.$ac_ext <<_ACEOF
10011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010012$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010013 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010014int
10015main ()
10016{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010017static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010018test_array [0] = 0
10019
10020 ;
10021 return 0;
10022}
10023_ACEOF
10024rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010025if { (ac_try="$ac_compile"
10026case "(($ac_try" in
10027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10028 *) ac_try_echo=$ac_try;;
10029esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010031 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010032 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010033 grep -v '^ *+' conftest.er1 >conftest.err
10034 rm -f conftest.er1
10035 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010037 (exit $ac_status); } && {
10038 test -z "$ac_c_werror_flag" ||
10039 test ! -s conftest.err
10040 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010041 ac_hi=$ac_mid; break
10042else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010044sed 's/^/| /' conftest.$ac_ext >&5
10045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010046 ac_lo=`expr $ac_mid + 1`
10047 if test $ac_lo -le $ac_mid; then
10048 ac_lo= ac_hi=
10049 break
10050 fi
10051 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010053
10054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010055 done
10056else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010058sed 's/^/| /' conftest.$ac_ext >&5
10059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010060 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010061/* confdefs.h. */
10062_ACEOF
10063cat confdefs.h >>conftest.$ac_ext
10064cat >>conftest.$ac_ext <<_ACEOF
10065/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010066$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010067 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010068int
10069main ()
10070{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010071static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010072test_array [0] = 0
10073
10074 ;
10075 return 0;
10076}
10077_ACEOF
10078rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010079if { (ac_try="$ac_compile"
10080case "(($ac_try" in
10081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10082 *) ac_try_echo=$ac_try;;
10083esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010085 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010087 grep -v '^ *+' conftest.er1 >conftest.err
10088 rm -f conftest.er1
10089 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010091 (exit $ac_status); } && {
10092 test -z "$ac_c_werror_flag" ||
10093 test ! -s conftest.err
10094 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 ac_hi=-1 ac_mid=-1
10096 while :; do
10097 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010098/* confdefs.h. */
10099_ACEOF
10100cat confdefs.h >>conftest.$ac_ext
10101cat >>conftest.$ac_ext <<_ACEOF
10102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010103$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010104 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010105int
10106main ()
10107{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010108static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010109test_array [0] = 0
10110
10111 ;
10112 return 0;
10113}
10114_ACEOF
10115rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010116if { (ac_try="$ac_compile"
10117case "(($ac_try" in
10118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10119 *) ac_try_echo=$ac_try;;
10120esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010122 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010124 grep -v '^ *+' conftest.er1 >conftest.err
10125 rm -f conftest.er1
10126 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010128 (exit $ac_status); } && {
10129 test -z "$ac_c_werror_flag" ||
10130 test ! -s conftest.err
10131 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010132 ac_lo=$ac_mid; break
10133else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010135sed 's/^/| /' conftest.$ac_ext >&5
10136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010137 ac_hi=`expr '(' $ac_mid ')' - 1`
10138 if test $ac_mid -le $ac_hi; then
10139 ac_lo= ac_hi=
10140 break
10141 fi
10142 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010144
10145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010146 done
10147else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010149sed 's/^/| /' conftest.$ac_ext >&5
10150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010151 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010153
10154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010156
10157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010158# Binary search between lo and hi bounds.
10159while test "x$ac_lo" != "x$ac_hi"; do
10160 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10161 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010162/* confdefs.h. */
10163_ACEOF
10164cat confdefs.h >>conftest.$ac_ext
10165cat >>conftest.$ac_ext <<_ACEOF
10166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010167$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010168 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010169int
10170main ()
10171{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010172static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010173test_array [0] = 0
10174
10175 ;
10176 return 0;
10177}
10178_ACEOF
10179rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180if { (ac_try="$ac_compile"
10181case "(($ac_try" in
10182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10183 *) ac_try_echo=$ac_try;;
10184esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010186 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010187 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010188 grep -v '^ *+' conftest.er1 >conftest.err
10189 rm -f conftest.er1
10190 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010192 (exit $ac_status); } && {
10193 test -z "$ac_c_werror_flag" ||
10194 test ! -s conftest.err
10195 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010196 ac_hi=$ac_mid
10197else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010199sed 's/^/| /' conftest.$ac_ext >&5
10200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010201 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010203
10204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010205done
10206case $ac_lo in
10207?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010208'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010209 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010210See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010211echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010212See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010213 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010214 else
10215 ac_cv_sizeof_fpos_t=0
10216 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010217esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010218else
Martin v. Löwis11437992002-04-12 09:54:03 +000010219 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010220/* confdefs.h. */
10221_ACEOF
10222cat confdefs.h >>conftest.$ac_ext
10223cat >>conftest.$ac_ext <<_ACEOF
10224/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010225$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010226 typedef fpos_t ac__type_sizeof_;
10227static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10228static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010229#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010230#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010231int
10232main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010233{
Martin v. Löwis11437992002-04-12 09:54:03 +000010234
10235 FILE *f = fopen ("conftest.val", "w");
10236 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010238 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010239 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010240 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010241 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010242 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010243 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 }
10245 else
10246 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010247 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010248 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010249 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010250 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010251 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010252 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010253
10254 ;
10255 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010256}
Martin v. Löwis11437992002-04-12 09:54:03 +000010257_ACEOF
10258rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010259if { (ac_try="$ac_link"
10260case "(($ac_try" in
10261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10262 *) ac_try_echo=$ac_try;;
10263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010265 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010268 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010269 { (case "(($ac_try" in
10270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10271 *) ac_try_echo=$ac_try;;
10272esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010274 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010275 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010277 (exit $ac_status); }; }; then
10278 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010279else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010280 echo "$as_me: program exited with status $ac_status" >&5
10281echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010282sed 's/^/| /' conftest.$ac_ext >&5
10283
Martin v. Löwis11437992002-04-12 09:54:03 +000010284( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010285if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010286 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010287See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010288echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010289See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010290 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010291 else
10292 ac_cv_sizeof_fpos_t=0
10293 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010295rm -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 +000010296fi
10297rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010298fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010299{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10300echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010301
10302
10303
Martin v. Löwis11437992002-04-12 09:54:03 +000010304cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010305#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010306_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010307
Michael W. Hudson54241132001-12-07 15:38:26 +000010308
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010309{ echo "$as_me:$LINENO: checking for size_t" >&5
10310echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10311if test "${ac_cv_type_size_t+set}" = set; then
10312 echo $ECHO_N "(cached) $ECHO_C" >&6
10313else
10314 cat >conftest.$ac_ext <<_ACEOF
10315/* confdefs.h. */
10316_ACEOF
10317cat confdefs.h >>conftest.$ac_ext
10318cat >>conftest.$ac_ext <<_ACEOF
10319/* end confdefs.h. */
10320$ac_includes_default
10321typedef size_t ac__type_new_;
10322int
10323main ()
10324{
10325if ((ac__type_new_ *) 0)
10326 return 0;
10327if (sizeof (ac__type_new_))
10328 return 0;
10329 ;
10330 return 0;
10331}
10332_ACEOF
10333rm -f conftest.$ac_objext
10334if { (ac_try="$ac_compile"
10335case "(($ac_try" in
10336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10337 *) ac_try_echo=$ac_try;;
10338esac
10339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10340 (eval "$ac_compile") 2>conftest.er1
10341 ac_status=$?
10342 grep -v '^ *+' conftest.er1 >conftest.err
10343 rm -f conftest.er1
10344 cat conftest.err >&5
10345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10346 (exit $ac_status); } && {
10347 test -z "$ac_c_werror_flag" ||
10348 test ! -s conftest.err
10349 } && test -s conftest.$ac_objext; then
10350 ac_cv_type_size_t=yes
10351else
10352 echo "$as_me: failed program was:" >&5
10353sed 's/^/| /' conftest.$ac_ext >&5
10354
10355 ac_cv_type_size_t=no
10356fi
10357
10358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10359fi
10360{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10361echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010363# The cast to long int works around a bug in the HP C Compiler
10364# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10365# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10366# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010367{ echo "$as_me:$LINENO: checking size of size_t" >&5
10368echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010369if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010370 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010371else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010372 if test "$cross_compiling" = yes; then
10373 # Depending upon the size, compute the lo and hi bounds.
10374cat >conftest.$ac_ext <<_ACEOF
10375/* confdefs.h. */
10376_ACEOF
10377cat confdefs.h >>conftest.$ac_ext
10378cat >>conftest.$ac_ext <<_ACEOF
10379/* end confdefs.h. */
10380$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010381 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010382int
10383main ()
10384{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010385static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010386test_array [0] = 0
10387
10388 ;
10389 return 0;
10390}
10391_ACEOF
10392rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010393if { (ac_try="$ac_compile"
10394case "(($ac_try" in
10395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10396 *) ac_try_echo=$ac_try;;
10397esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010399 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010400 ac_status=$?
10401 grep -v '^ *+' conftest.er1 >conftest.err
10402 rm -f conftest.er1
10403 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010405 (exit $ac_status); } && {
10406 test -z "$ac_c_werror_flag" ||
10407 test ! -s conftest.err
10408 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010409 ac_lo=0 ac_mid=0
10410 while :; do
10411 cat >conftest.$ac_ext <<_ACEOF
10412/* confdefs.h. */
10413_ACEOF
10414cat confdefs.h >>conftest.$ac_ext
10415cat >>conftest.$ac_ext <<_ACEOF
10416/* end confdefs.h. */
10417$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010418 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010419int
10420main ()
10421{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010422static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010423test_array [0] = 0
10424
10425 ;
10426 return 0;
10427}
10428_ACEOF
10429rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010430if { (ac_try="$ac_compile"
10431case "(($ac_try" in
10432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10433 *) ac_try_echo=$ac_try;;
10434esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010436 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010437 ac_status=$?
10438 grep -v '^ *+' conftest.er1 >conftest.err
10439 rm -f conftest.er1
10440 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010442 (exit $ac_status); } && {
10443 test -z "$ac_c_werror_flag" ||
10444 test ! -s conftest.err
10445 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010446 ac_hi=$ac_mid; break
10447else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010448 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010449sed 's/^/| /' conftest.$ac_ext >&5
10450
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010451 ac_lo=`expr $ac_mid + 1`
10452 if test $ac_lo -le $ac_mid; then
10453 ac_lo= ac_hi=
10454 break
10455 fi
10456 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010458
10459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010460 done
10461else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010462 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010463sed 's/^/| /' conftest.$ac_ext >&5
10464
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010465 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010466/* confdefs.h. */
10467_ACEOF
10468cat confdefs.h >>conftest.$ac_ext
10469cat >>conftest.$ac_ext <<_ACEOF
10470/* end confdefs.h. */
10471$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010472 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010473int
10474main ()
10475{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010476static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010477test_array [0] = 0
10478
10479 ;
10480 return 0;
10481}
10482_ACEOF
10483rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010484if { (ac_try="$ac_compile"
10485case "(($ac_try" in
10486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10487 *) ac_try_echo=$ac_try;;
10488esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010490 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010491 ac_status=$?
10492 grep -v '^ *+' conftest.er1 >conftest.err
10493 rm -f conftest.er1
10494 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010496 (exit $ac_status); } && {
10497 test -z "$ac_c_werror_flag" ||
10498 test ! -s conftest.err
10499 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010500 ac_hi=-1 ac_mid=-1
10501 while :; do
10502 cat >conftest.$ac_ext <<_ACEOF
10503/* confdefs.h. */
10504_ACEOF
10505cat confdefs.h >>conftest.$ac_ext
10506cat >>conftest.$ac_ext <<_ACEOF
10507/* end confdefs.h. */
10508$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010509 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010510int
10511main ()
10512{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010513static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010514test_array [0] = 0
10515
10516 ;
10517 return 0;
10518}
10519_ACEOF
10520rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010521if { (ac_try="$ac_compile"
10522case "(($ac_try" in
10523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10524 *) ac_try_echo=$ac_try;;
10525esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010527 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010528 ac_status=$?
10529 grep -v '^ *+' conftest.er1 >conftest.err
10530 rm -f conftest.er1
10531 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010533 (exit $ac_status); } && {
10534 test -z "$ac_c_werror_flag" ||
10535 test ! -s conftest.err
10536 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010537 ac_lo=$ac_mid; break
10538else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010539 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010540sed 's/^/| /' conftest.$ac_ext >&5
10541
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010542 ac_hi=`expr '(' $ac_mid ')' - 1`
10543 if test $ac_mid -le $ac_hi; then
10544 ac_lo= ac_hi=
10545 break
10546 fi
10547 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010549
10550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010551 done
10552else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010553 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010554sed 's/^/| /' conftest.$ac_ext >&5
10555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010556 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010558
10559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010561
10562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010563# Binary search between lo and hi bounds.
10564while test "x$ac_lo" != "x$ac_hi"; do
10565 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10566 cat >conftest.$ac_ext <<_ACEOF
10567/* confdefs.h. */
10568_ACEOF
10569cat confdefs.h >>conftest.$ac_ext
10570cat >>conftest.$ac_ext <<_ACEOF
10571/* end confdefs.h. */
10572$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010573 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010574int
10575main ()
10576{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010577static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010578test_array [0] = 0
10579
10580 ;
10581 return 0;
10582}
10583_ACEOF
10584rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010585if { (ac_try="$ac_compile"
10586case "(($ac_try" in
10587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10588 *) ac_try_echo=$ac_try;;
10589esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010591 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010592 ac_status=$?
10593 grep -v '^ *+' conftest.er1 >conftest.err
10594 rm -f conftest.er1
10595 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010597 (exit $ac_status); } && {
10598 test -z "$ac_c_werror_flag" ||
10599 test ! -s conftest.err
10600 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010601 ac_hi=$ac_mid
10602else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010603 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010604sed 's/^/| /' conftest.$ac_ext >&5
10605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010606 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010608
10609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010610done
10611case $ac_lo in
10612?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010613'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010614 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010615See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010616echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010617See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010618 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010619 else
10620 ac_cv_sizeof_size_t=0
10621 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010622esac
10623else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010624 cat >conftest.$ac_ext <<_ACEOF
10625/* confdefs.h. */
10626_ACEOF
10627cat confdefs.h >>conftest.$ac_ext
10628cat >>conftest.$ac_ext <<_ACEOF
10629/* end confdefs.h. */
10630$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010631 typedef size_t ac__type_sizeof_;
10632static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10633static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010634#include <stdio.h>
10635#include <stdlib.h>
10636int
10637main ()
10638{
10639
10640 FILE *f = fopen ("conftest.val", "w");
10641 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010643 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010644 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010645 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010646 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010647 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010648 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010649 }
10650 else
10651 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010652 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010653 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010654 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010655 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010656 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010657 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010658
10659 ;
10660 return 0;
10661}
10662_ACEOF
10663rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010664if { (ac_try="$ac_link"
10665case "(($ac_try" in
10666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10667 *) ac_try_echo=$ac_try;;
10668esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010670 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010671 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010673 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010674 { (case "(($ac_try" in
10675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10676 *) ac_try_echo=$ac_try;;
10677esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010679 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010680 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010682 (exit $ac_status); }; }; then
10683 ac_cv_sizeof_size_t=`cat conftest.val`
10684else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010685 echo "$as_me: program exited with status $ac_status" >&5
10686echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010687sed 's/^/| /' conftest.$ac_ext >&5
10688
10689( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010690if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010691 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010692See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010693echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010694See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010695 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010696 else
10697 ac_cv_sizeof_size_t=0
10698 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010700rm -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 +000010701fi
10702rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010703fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010704{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10705echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010706
10707
10708
Martin v. Löwis18e16552006-02-15 17:27:45 +000010709cat >>confdefs.h <<_ACEOF
10710#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10711_ACEOF
10712
10713
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010714{ echo "$as_me:$LINENO: checking for pid_t" >&5
10715echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10716if test "${ac_cv_type_pid_t+set}" = set; then
10717 echo $ECHO_N "(cached) $ECHO_C" >&6
10718else
10719 cat >conftest.$ac_ext <<_ACEOF
10720/* confdefs.h. */
10721_ACEOF
10722cat confdefs.h >>conftest.$ac_ext
10723cat >>conftest.$ac_ext <<_ACEOF
10724/* end confdefs.h. */
10725$ac_includes_default
10726typedef pid_t ac__type_new_;
10727int
10728main ()
10729{
10730if ((ac__type_new_ *) 0)
10731 return 0;
10732if (sizeof (ac__type_new_))
10733 return 0;
10734 ;
10735 return 0;
10736}
10737_ACEOF
10738rm -f conftest.$ac_objext
10739if { (ac_try="$ac_compile"
10740case "(($ac_try" in
10741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10742 *) ac_try_echo=$ac_try;;
10743esac
10744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10745 (eval "$ac_compile") 2>conftest.er1
10746 ac_status=$?
10747 grep -v '^ *+' conftest.er1 >conftest.err
10748 rm -f conftest.er1
10749 cat conftest.err >&5
10750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10751 (exit $ac_status); } && {
10752 test -z "$ac_c_werror_flag" ||
10753 test ! -s conftest.err
10754 } && test -s conftest.$ac_objext; then
10755 ac_cv_type_pid_t=yes
10756else
10757 echo "$as_me: failed program was:" >&5
10758sed 's/^/| /' conftest.$ac_ext >&5
10759
10760 ac_cv_type_pid_t=no
10761fi
10762
10763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10764fi
10765{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10766echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10767
Christian Heimes400adb02008-02-01 08:12:03 +000010768# The cast to long int works around a bug in the HP C Compiler
10769# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10770# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10771# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010772{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10773echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010774if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010775 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010776else
10777 if test "$cross_compiling" = yes; then
10778 # Depending upon the size, compute the lo and hi bounds.
10779cat >conftest.$ac_ext <<_ACEOF
10780/* confdefs.h. */
10781_ACEOF
10782cat confdefs.h >>conftest.$ac_ext
10783cat >>conftest.$ac_ext <<_ACEOF
10784/* end confdefs.h. */
10785$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010786 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010787int
10788main ()
10789{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010790static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010791test_array [0] = 0
10792
10793 ;
10794 return 0;
10795}
10796_ACEOF
10797rm -f conftest.$ac_objext
10798if { (ac_try="$ac_compile"
10799case "(($ac_try" in
10800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10801 *) ac_try_echo=$ac_try;;
10802esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010804 (eval "$ac_compile") 2>conftest.er1
10805 ac_status=$?
10806 grep -v '^ *+' conftest.er1 >conftest.err
10807 rm -f conftest.er1
10808 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010810 (exit $ac_status); } && {
10811 test -z "$ac_c_werror_flag" ||
10812 test ! -s conftest.err
10813 } && test -s conftest.$ac_objext; then
10814 ac_lo=0 ac_mid=0
10815 while :; do
10816 cat >conftest.$ac_ext <<_ACEOF
10817/* confdefs.h. */
10818_ACEOF
10819cat confdefs.h >>conftest.$ac_ext
10820cat >>conftest.$ac_ext <<_ACEOF
10821/* end confdefs.h. */
10822$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010823 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010824int
10825main ()
10826{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010827static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010828test_array [0] = 0
10829
10830 ;
10831 return 0;
10832}
10833_ACEOF
10834rm -f conftest.$ac_objext
10835if { (ac_try="$ac_compile"
10836case "(($ac_try" in
10837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10838 *) ac_try_echo=$ac_try;;
10839esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010841 (eval "$ac_compile") 2>conftest.er1
10842 ac_status=$?
10843 grep -v '^ *+' conftest.er1 >conftest.err
10844 rm -f conftest.er1
10845 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010847 (exit $ac_status); } && {
10848 test -z "$ac_c_werror_flag" ||
10849 test ! -s conftest.err
10850 } && test -s conftest.$ac_objext; then
10851 ac_hi=$ac_mid; break
10852else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010853 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010854sed 's/^/| /' conftest.$ac_ext >&5
10855
10856 ac_lo=`expr $ac_mid + 1`
10857 if test $ac_lo -le $ac_mid; then
10858 ac_lo= ac_hi=
10859 break
10860 fi
10861 ac_mid=`expr 2 '*' $ac_mid + 1`
10862fi
10863
10864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10865 done
10866else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010867 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010868sed 's/^/| /' conftest.$ac_ext >&5
10869
10870 cat >conftest.$ac_ext <<_ACEOF
10871/* confdefs.h. */
10872_ACEOF
10873cat confdefs.h >>conftest.$ac_ext
10874cat >>conftest.$ac_ext <<_ACEOF
10875/* end confdefs.h. */
10876$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010877 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010878int
10879main ()
10880{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010881static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010882test_array [0] = 0
10883
10884 ;
10885 return 0;
10886}
10887_ACEOF
10888rm -f conftest.$ac_objext
10889if { (ac_try="$ac_compile"
10890case "(($ac_try" in
10891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10892 *) ac_try_echo=$ac_try;;
10893esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010895 (eval "$ac_compile") 2>conftest.er1
10896 ac_status=$?
10897 grep -v '^ *+' conftest.er1 >conftest.err
10898 rm -f conftest.er1
10899 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010901 (exit $ac_status); } && {
10902 test -z "$ac_c_werror_flag" ||
10903 test ! -s conftest.err
10904 } && test -s conftest.$ac_objext; then
10905 ac_hi=-1 ac_mid=-1
10906 while :; do
10907 cat >conftest.$ac_ext <<_ACEOF
10908/* confdefs.h. */
10909_ACEOF
10910cat confdefs.h >>conftest.$ac_ext
10911cat >>conftest.$ac_ext <<_ACEOF
10912/* end confdefs.h. */
10913$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010914 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010915int
10916main ()
10917{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010918static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010919test_array [0] = 0
10920
10921 ;
10922 return 0;
10923}
10924_ACEOF
10925rm -f conftest.$ac_objext
10926if { (ac_try="$ac_compile"
10927case "(($ac_try" in
10928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10929 *) ac_try_echo=$ac_try;;
10930esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010932 (eval "$ac_compile") 2>conftest.er1
10933 ac_status=$?
10934 grep -v '^ *+' conftest.er1 >conftest.err
10935 rm -f conftest.er1
10936 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010938 (exit $ac_status); } && {
10939 test -z "$ac_c_werror_flag" ||
10940 test ! -s conftest.err
10941 } && test -s conftest.$ac_objext; then
10942 ac_lo=$ac_mid; break
10943else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010944 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010945sed 's/^/| /' conftest.$ac_ext >&5
10946
10947 ac_hi=`expr '(' $ac_mid ')' - 1`
10948 if test $ac_mid -le $ac_hi; then
10949 ac_lo= ac_hi=
10950 break
10951 fi
10952 ac_mid=`expr 2 '*' $ac_mid`
10953fi
10954
10955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10956 done
10957else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010958 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010959sed 's/^/| /' conftest.$ac_ext >&5
10960
10961 ac_lo= ac_hi=
10962fi
10963
10964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10965fi
10966
10967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10968# Binary search between lo and hi bounds.
10969while test "x$ac_lo" != "x$ac_hi"; do
10970 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10971 cat >conftest.$ac_ext <<_ACEOF
10972/* confdefs.h. */
10973_ACEOF
10974cat confdefs.h >>conftest.$ac_ext
10975cat >>conftest.$ac_ext <<_ACEOF
10976/* end confdefs.h. */
10977$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010978 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010979int
10980main ()
10981{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010982static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010983test_array [0] = 0
10984
10985 ;
10986 return 0;
10987}
10988_ACEOF
10989rm -f conftest.$ac_objext
10990if { (ac_try="$ac_compile"
10991case "(($ac_try" in
10992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10993 *) ac_try_echo=$ac_try;;
10994esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010996 (eval "$ac_compile") 2>conftest.er1
10997 ac_status=$?
10998 grep -v '^ *+' conftest.er1 >conftest.err
10999 rm -f conftest.er1
11000 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011002 (exit $ac_status); } && {
11003 test -z "$ac_c_werror_flag" ||
11004 test ! -s conftest.err
11005 } && test -s conftest.$ac_objext; then
11006 ac_hi=$ac_mid
11007else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011008 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011009sed 's/^/| /' conftest.$ac_ext >&5
11010
11011 ac_lo=`expr '(' $ac_mid ')' + 1`
11012fi
11013
11014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11015done
11016case $ac_lo in
11017?*) ac_cv_sizeof_pid_t=$ac_lo;;
11018'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011019 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011020See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011021echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011022See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011023 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011024 else
11025 ac_cv_sizeof_pid_t=0
11026 fi ;;
11027esac
11028else
11029 cat >conftest.$ac_ext <<_ACEOF
11030/* confdefs.h. */
11031_ACEOF
11032cat confdefs.h >>conftest.$ac_ext
11033cat >>conftest.$ac_ext <<_ACEOF
11034/* end confdefs.h. */
11035$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011036 typedef pid_t ac__type_sizeof_;
11037static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11038static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011039#include <stdio.h>
11040#include <stdlib.h>
11041int
11042main ()
11043{
11044
11045 FILE *f = fopen ("conftest.val", "w");
11046 if (! f)
11047 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011048 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011049 {
11050 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011051 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011052 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011053 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011054 }
11055 else
11056 {
11057 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011058 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011059 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011060 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011061 }
11062 return ferror (f) || fclose (f) != 0;
11063
11064 ;
11065 return 0;
11066}
11067_ACEOF
11068rm -f conftest$ac_exeext
11069if { (ac_try="$ac_link"
11070case "(($ac_try" in
11071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11072 *) ac_try_echo=$ac_try;;
11073esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011075 (eval "$ac_link") 2>&5
11076 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011078 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11079 { (case "(($ac_try" in
11080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11081 *) ac_try_echo=$ac_try;;
11082esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011084 (eval "$ac_try") 2>&5
11085 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011087 (exit $ac_status); }; }; then
11088 ac_cv_sizeof_pid_t=`cat conftest.val`
11089else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011090 echo "$as_me: program exited with status $ac_status" >&5
11091echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011092sed 's/^/| /' conftest.$ac_ext >&5
11093
11094( exit $ac_status )
11095if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011096 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011097See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011098echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011099See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011100 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011101 else
11102 ac_cv_sizeof_pid_t=0
11103 fi
11104fi
11105rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11106fi
11107rm -f conftest.val
11108fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011109{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11110echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011111
11112
11113
11114cat >>confdefs.h <<_ACEOF
11115#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11116_ACEOF
11117
11118
Michael W. Hudson54241132001-12-07 15:38:26 +000011119
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011120{ echo "$as_me:$LINENO: checking for long long support" >&5
11121echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011122have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011123cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011124/* confdefs.h. */
11125_ACEOF
11126cat confdefs.h >>conftest.$ac_ext
11127cat >>conftest.$ac_ext <<_ACEOF
11128/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011129
Martin v. Löwis11437992002-04-12 09:54:03 +000011130int
11131main ()
11132{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011133long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011134 ;
11135 return 0;
11136}
11137_ACEOF
11138rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011139if { (ac_try="$ac_compile"
11140case "(($ac_try" in
11141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11142 *) ac_try_echo=$ac_try;;
11143esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011145 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011147 grep -v '^ *+' conftest.er1 >conftest.err
11148 rm -f conftest.er1
11149 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011151 (exit $ac_status); } && {
11152 test -z "$ac_c_werror_flag" ||
11153 test ! -s conftest.err
11154 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011155
11156
11157cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011158#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011159_ACEOF
11160
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011161 have_long_long=yes
11162
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011163else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011165sed 's/^/| /' conftest.$ac_ext >&5
11166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011167
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011169
11170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011171{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11172echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011173if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011174{ echo "$as_me:$LINENO: checking for long long" >&5
11175echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11176if test "${ac_cv_type_long_long+set}" = set; then
11177 echo $ECHO_N "(cached) $ECHO_C" >&6
11178else
11179 cat >conftest.$ac_ext <<_ACEOF
11180/* confdefs.h. */
11181_ACEOF
11182cat confdefs.h >>conftest.$ac_ext
11183cat >>conftest.$ac_ext <<_ACEOF
11184/* end confdefs.h. */
11185$ac_includes_default
11186typedef long long ac__type_new_;
11187int
11188main ()
11189{
11190if ((ac__type_new_ *) 0)
11191 return 0;
11192if (sizeof (ac__type_new_))
11193 return 0;
11194 ;
11195 return 0;
11196}
11197_ACEOF
11198rm -f conftest.$ac_objext
11199if { (ac_try="$ac_compile"
11200case "(($ac_try" in
11201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11202 *) ac_try_echo=$ac_try;;
11203esac
11204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11205 (eval "$ac_compile") 2>conftest.er1
11206 ac_status=$?
11207 grep -v '^ *+' conftest.er1 >conftest.err
11208 rm -f conftest.er1
11209 cat conftest.err >&5
11210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11211 (exit $ac_status); } && {
11212 test -z "$ac_c_werror_flag" ||
11213 test ! -s conftest.err
11214 } && test -s conftest.$ac_objext; then
11215 ac_cv_type_long_long=yes
11216else
11217 echo "$as_me: failed program was:" >&5
11218sed 's/^/| /' conftest.$ac_ext >&5
11219
11220 ac_cv_type_long_long=no
11221fi
11222
11223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11224fi
11225{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11226echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011228# The cast to long int works around a bug in the HP C Compiler
11229# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11230# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11231# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011232{ echo "$as_me:$LINENO: checking size of long long" >&5
11233echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011234if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011235 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011236else
Martin v. Löwis11437992002-04-12 09:54:03 +000011237 if test "$cross_compiling" = yes; then
11238 # Depending upon the size, compute the lo and hi bounds.
11239cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011240/* confdefs.h. */
11241_ACEOF
11242cat confdefs.h >>conftest.$ac_ext
11243cat >>conftest.$ac_ext <<_ACEOF
11244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011245$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011246 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011247int
11248main ()
11249{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011250static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011251test_array [0] = 0
11252
11253 ;
11254 return 0;
11255}
11256_ACEOF
11257rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011258if { (ac_try="$ac_compile"
11259case "(($ac_try" in
11260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11261 *) ac_try_echo=$ac_try;;
11262esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011264 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011266 grep -v '^ *+' conftest.er1 >conftest.err
11267 rm -f conftest.er1
11268 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011270 (exit $ac_status); } && {
11271 test -z "$ac_c_werror_flag" ||
11272 test ! -s conftest.err
11273 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011274 ac_lo=0 ac_mid=0
11275 while :; do
11276 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011277/* confdefs.h. */
11278_ACEOF
11279cat confdefs.h >>conftest.$ac_ext
11280cat >>conftest.$ac_ext <<_ACEOF
11281/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011282$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011283 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011284int
11285main ()
11286{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011287static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011288test_array [0] = 0
11289
11290 ;
11291 return 0;
11292}
11293_ACEOF
11294rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011295if { (ac_try="$ac_compile"
11296case "(($ac_try" in
11297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11298 *) ac_try_echo=$ac_try;;
11299esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011301 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011303 grep -v '^ *+' conftest.er1 >conftest.err
11304 rm -f conftest.er1
11305 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011307 (exit $ac_status); } && {
11308 test -z "$ac_c_werror_flag" ||
11309 test ! -s conftest.err
11310 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011311 ac_hi=$ac_mid; break
11312else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011313 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011314sed 's/^/| /' conftest.$ac_ext >&5
11315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011316 ac_lo=`expr $ac_mid + 1`
11317 if test $ac_lo -le $ac_mid; then
11318 ac_lo= ac_hi=
11319 break
11320 fi
11321 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011323
11324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011325 done
11326else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011327 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011328sed 's/^/| /' conftest.$ac_ext >&5
11329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011331/* confdefs.h. */
11332_ACEOF
11333cat confdefs.h >>conftest.$ac_ext
11334cat >>conftest.$ac_ext <<_ACEOF
11335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011336$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011337 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011338int
11339main ()
11340{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011341static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011342test_array [0] = 0
11343
11344 ;
11345 return 0;
11346}
11347_ACEOF
11348rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011349if { (ac_try="$ac_compile"
11350case "(($ac_try" in
11351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11352 *) ac_try_echo=$ac_try;;
11353esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011355 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011357 grep -v '^ *+' conftest.er1 >conftest.err
11358 rm -f conftest.er1
11359 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011361 (exit $ac_status); } && {
11362 test -z "$ac_c_werror_flag" ||
11363 test ! -s conftest.err
11364 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011365 ac_hi=-1 ac_mid=-1
11366 while :; do
11367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011368/* confdefs.h. */
11369_ACEOF
11370cat confdefs.h >>conftest.$ac_ext
11371cat >>conftest.$ac_ext <<_ACEOF
11372/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011373$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011374 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011375int
11376main ()
11377{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011378static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011379test_array [0] = 0
11380
11381 ;
11382 return 0;
11383}
11384_ACEOF
11385rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011386if { (ac_try="$ac_compile"
11387case "(($ac_try" in
11388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11389 *) ac_try_echo=$ac_try;;
11390esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011392 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011393 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011394 grep -v '^ *+' conftest.er1 >conftest.err
11395 rm -f conftest.er1
11396 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011398 (exit $ac_status); } && {
11399 test -z "$ac_c_werror_flag" ||
11400 test ! -s conftest.err
11401 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011402 ac_lo=$ac_mid; break
11403else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011405sed 's/^/| /' conftest.$ac_ext >&5
11406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011407 ac_hi=`expr '(' $ac_mid ')' - 1`
11408 if test $ac_mid -le $ac_hi; then
11409 ac_lo= ac_hi=
11410 break
11411 fi
11412 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011414
11415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011416 done
11417else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011418 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011419sed 's/^/| /' conftest.$ac_ext >&5
11420
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011421 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011423
11424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011426
11427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011428# Binary search between lo and hi bounds.
11429while test "x$ac_lo" != "x$ac_hi"; do
11430 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11431 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011432/* confdefs.h. */
11433_ACEOF
11434cat confdefs.h >>conftest.$ac_ext
11435cat >>conftest.$ac_ext <<_ACEOF
11436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011437$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011438 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011439int
11440main ()
11441{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011442static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011443test_array [0] = 0
11444
11445 ;
11446 return 0;
11447}
11448_ACEOF
11449rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011450if { (ac_try="$ac_compile"
11451case "(($ac_try" in
11452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11453 *) ac_try_echo=$ac_try;;
11454esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011456 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011457 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011458 grep -v '^ *+' conftest.er1 >conftest.err
11459 rm -f conftest.er1
11460 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011462 (exit $ac_status); } && {
11463 test -z "$ac_c_werror_flag" ||
11464 test ! -s conftest.err
11465 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011466 ac_hi=$ac_mid
11467else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011469sed 's/^/| /' conftest.$ac_ext >&5
11470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011471 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011473
11474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011475done
11476case $ac_lo in
11477?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011478'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011479 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011480See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011481echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011482See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011483 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011484 else
11485 ac_cv_sizeof_long_long=0
11486 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011487esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011488else
Martin v. Löwis11437992002-04-12 09:54:03 +000011489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011490/* confdefs.h. */
11491_ACEOF
11492cat confdefs.h >>conftest.$ac_ext
11493cat >>conftest.$ac_ext <<_ACEOF
11494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011495$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011496 typedef long long ac__type_sizeof_;
11497static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11498static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011499#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011500#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011501int
11502main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011503{
Martin v. Löwis11437992002-04-12 09:54:03 +000011504
11505 FILE *f = fopen ("conftest.val", "w");
11506 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011508 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011509 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011510 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011511 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011512 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011513 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 }
11515 else
11516 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011517 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011518 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011519 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011520 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011521 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011522 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011523
11524 ;
11525 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011526}
Martin v. Löwis11437992002-04-12 09:54:03 +000011527_ACEOF
11528rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529if { (ac_try="$ac_link"
11530case "(($ac_try" in
11531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11532 *) ac_try_echo=$ac_try;;
11533esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011535 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011536 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011538 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011539 { (case "(($ac_try" in
11540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11541 *) ac_try_echo=$ac_try;;
11542esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011544 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011545 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011547 (exit $ac_status); }; }; then
11548 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011549else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011550 echo "$as_me: program exited with status $ac_status" >&5
11551echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011552sed 's/^/| /' conftest.$ac_ext >&5
11553
Martin v. Löwis11437992002-04-12 09:54:03 +000011554( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011555if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011556 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011557See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011558echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011559See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011560 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011561 else
11562 ac_cv_sizeof_long_long=0
11563 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011565rm -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 +000011566fi
11567rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011568fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011569{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11570echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011571
11572
11573
Martin v. Löwis11437992002-04-12 09:54:03 +000011574cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011575#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011576_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011577
Michael W. Hudson54241132001-12-07 15:38:26 +000011578
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011579fi
11580
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011581{ echo "$as_me:$LINENO: checking for long double support" >&5
11582echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011583have_long_double=no
11584cat >conftest.$ac_ext <<_ACEOF
11585/* confdefs.h. */
11586_ACEOF
11587cat confdefs.h >>conftest.$ac_ext
11588cat >>conftest.$ac_ext <<_ACEOF
11589/* end confdefs.h. */
11590
11591int
11592main ()
11593{
11594long double x; x = (long double)0;
11595 ;
11596 return 0;
11597}
11598_ACEOF
11599rm -f conftest.$ac_objext
11600if { (ac_try="$ac_compile"
11601case "(($ac_try" in
11602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11603 *) ac_try_echo=$ac_try;;
11604esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011606 (eval "$ac_compile") 2>conftest.er1
11607 ac_status=$?
11608 grep -v '^ *+' conftest.er1 >conftest.err
11609 rm -f conftest.er1
11610 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011612 (exit $ac_status); } && {
11613 test -z "$ac_c_werror_flag" ||
11614 test ! -s conftest.err
11615 } && test -s conftest.$ac_objext; then
11616
11617
11618cat >>confdefs.h <<\_ACEOF
11619#define HAVE_LONG_DOUBLE 1
11620_ACEOF
11621
11622 have_long_double=yes
11623
11624else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011625 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011626sed 's/^/| /' conftest.$ac_ext >&5
11627
11628
11629fi
11630
11631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011632{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11633echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011634if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011635{ echo "$as_me:$LINENO: checking for long double" >&5
11636echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11637if test "${ac_cv_type_long_double+set}" = set; then
11638 echo $ECHO_N "(cached) $ECHO_C" >&6
11639else
11640 cat >conftest.$ac_ext <<_ACEOF
11641/* confdefs.h. */
11642_ACEOF
11643cat confdefs.h >>conftest.$ac_ext
11644cat >>conftest.$ac_ext <<_ACEOF
11645/* end confdefs.h. */
11646$ac_includes_default
11647typedef long double ac__type_new_;
11648int
11649main ()
11650{
11651if ((ac__type_new_ *) 0)
11652 return 0;
11653if (sizeof (ac__type_new_))
11654 return 0;
11655 ;
11656 return 0;
11657}
11658_ACEOF
11659rm -f conftest.$ac_objext
11660if { (ac_try="$ac_compile"
11661case "(($ac_try" in
11662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11663 *) ac_try_echo=$ac_try;;
11664esac
11665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11666 (eval "$ac_compile") 2>conftest.er1
11667 ac_status=$?
11668 grep -v '^ *+' conftest.er1 >conftest.err
11669 rm -f conftest.er1
11670 cat conftest.err >&5
11671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11672 (exit $ac_status); } && {
11673 test -z "$ac_c_werror_flag" ||
11674 test ! -s conftest.err
11675 } && test -s conftest.$ac_objext; then
11676 ac_cv_type_long_double=yes
11677else
11678 echo "$as_me: failed program was:" >&5
11679sed 's/^/| /' conftest.$ac_ext >&5
11680
11681 ac_cv_type_long_double=no
11682fi
11683
11684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11685fi
11686{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11687echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11688
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011689# The cast to long int works around a bug in the HP C Compiler
11690# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11691# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11692# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011693{ echo "$as_me:$LINENO: checking size of long double" >&5
11694echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011695if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011696 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011697else
11698 if test "$cross_compiling" = yes; then
11699 # Depending upon the size, compute the lo and hi bounds.
11700cat >conftest.$ac_ext <<_ACEOF
11701/* confdefs.h. */
11702_ACEOF
11703cat confdefs.h >>conftest.$ac_ext
11704cat >>conftest.$ac_ext <<_ACEOF
11705/* end confdefs.h. */
11706$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011707 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011708int
11709main ()
11710{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011711static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011712test_array [0] = 0
11713
11714 ;
11715 return 0;
11716}
11717_ACEOF
11718rm -f conftest.$ac_objext
11719if { (ac_try="$ac_compile"
11720case "(($ac_try" in
11721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11722 *) ac_try_echo=$ac_try;;
11723esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011725 (eval "$ac_compile") 2>conftest.er1
11726 ac_status=$?
11727 grep -v '^ *+' conftest.er1 >conftest.err
11728 rm -f conftest.er1
11729 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011731 (exit $ac_status); } && {
11732 test -z "$ac_c_werror_flag" ||
11733 test ! -s conftest.err
11734 } && test -s conftest.$ac_objext; then
11735 ac_lo=0 ac_mid=0
11736 while :; do
11737 cat >conftest.$ac_ext <<_ACEOF
11738/* confdefs.h. */
11739_ACEOF
11740cat confdefs.h >>conftest.$ac_ext
11741cat >>conftest.$ac_ext <<_ACEOF
11742/* end confdefs.h. */
11743$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011744 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011745int
11746main ()
11747{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011748static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011749test_array [0] = 0
11750
11751 ;
11752 return 0;
11753}
11754_ACEOF
11755rm -f conftest.$ac_objext
11756if { (ac_try="$ac_compile"
11757case "(($ac_try" in
11758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11759 *) ac_try_echo=$ac_try;;
11760esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011762 (eval "$ac_compile") 2>conftest.er1
11763 ac_status=$?
11764 grep -v '^ *+' conftest.er1 >conftest.err
11765 rm -f conftest.er1
11766 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011768 (exit $ac_status); } && {
11769 test -z "$ac_c_werror_flag" ||
11770 test ! -s conftest.err
11771 } && test -s conftest.$ac_objext; then
11772 ac_hi=$ac_mid; break
11773else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011774 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011775sed 's/^/| /' conftest.$ac_ext >&5
11776
11777 ac_lo=`expr $ac_mid + 1`
11778 if test $ac_lo -le $ac_mid; then
11779 ac_lo= ac_hi=
11780 break
11781 fi
11782 ac_mid=`expr 2 '*' $ac_mid + 1`
11783fi
11784
11785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11786 done
11787else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011788 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011789sed 's/^/| /' conftest.$ac_ext >&5
11790
11791 cat >conftest.$ac_ext <<_ACEOF
11792/* confdefs.h. */
11793_ACEOF
11794cat confdefs.h >>conftest.$ac_ext
11795cat >>conftest.$ac_ext <<_ACEOF
11796/* end confdefs.h. */
11797$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011798 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011799int
11800main ()
11801{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011802static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011803test_array [0] = 0
11804
11805 ;
11806 return 0;
11807}
11808_ACEOF
11809rm -f conftest.$ac_objext
11810if { (ac_try="$ac_compile"
11811case "(($ac_try" in
11812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11813 *) ac_try_echo=$ac_try;;
11814esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011816 (eval "$ac_compile") 2>conftest.er1
11817 ac_status=$?
11818 grep -v '^ *+' conftest.er1 >conftest.err
11819 rm -f conftest.er1
11820 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011822 (exit $ac_status); } && {
11823 test -z "$ac_c_werror_flag" ||
11824 test ! -s conftest.err
11825 } && test -s conftest.$ac_objext; then
11826 ac_hi=-1 ac_mid=-1
11827 while :; do
11828 cat >conftest.$ac_ext <<_ACEOF
11829/* confdefs.h. */
11830_ACEOF
11831cat confdefs.h >>conftest.$ac_ext
11832cat >>conftest.$ac_ext <<_ACEOF
11833/* end confdefs.h. */
11834$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011835 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011836int
11837main ()
11838{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011839static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011840test_array [0] = 0
11841
11842 ;
11843 return 0;
11844}
11845_ACEOF
11846rm -f conftest.$ac_objext
11847if { (ac_try="$ac_compile"
11848case "(($ac_try" in
11849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11850 *) ac_try_echo=$ac_try;;
11851esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011853 (eval "$ac_compile") 2>conftest.er1
11854 ac_status=$?
11855 grep -v '^ *+' conftest.er1 >conftest.err
11856 rm -f conftest.er1
11857 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011859 (exit $ac_status); } && {
11860 test -z "$ac_c_werror_flag" ||
11861 test ! -s conftest.err
11862 } && test -s conftest.$ac_objext; then
11863 ac_lo=$ac_mid; break
11864else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011865 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011866sed 's/^/| /' conftest.$ac_ext >&5
11867
11868 ac_hi=`expr '(' $ac_mid ')' - 1`
11869 if test $ac_mid -le $ac_hi; then
11870 ac_lo= ac_hi=
11871 break
11872 fi
11873 ac_mid=`expr 2 '*' $ac_mid`
11874fi
11875
11876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11877 done
11878else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011879 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011880sed 's/^/| /' conftest.$ac_ext >&5
11881
11882 ac_lo= ac_hi=
11883fi
11884
11885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11886fi
11887
11888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11889# Binary search between lo and hi bounds.
11890while test "x$ac_lo" != "x$ac_hi"; do
11891 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11892 cat >conftest.$ac_ext <<_ACEOF
11893/* confdefs.h. */
11894_ACEOF
11895cat confdefs.h >>conftest.$ac_ext
11896cat >>conftest.$ac_ext <<_ACEOF
11897/* end confdefs.h. */
11898$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011899 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011900int
11901main ()
11902{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011903static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011904test_array [0] = 0
11905
11906 ;
11907 return 0;
11908}
11909_ACEOF
11910rm -f conftest.$ac_objext
11911if { (ac_try="$ac_compile"
11912case "(($ac_try" in
11913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11914 *) ac_try_echo=$ac_try;;
11915esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011917 (eval "$ac_compile") 2>conftest.er1
11918 ac_status=$?
11919 grep -v '^ *+' conftest.er1 >conftest.err
11920 rm -f conftest.er1
11921 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011923 (exit $ac_status); } && {
11924 test -z "$ac_c_werror_flag" ||
11925 test ! -s conftest.err
11926 } && test -s conftest.$ac_objext; then
11927 ac_hi=$ac_mid
11928else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011929 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011930sed 's/^/| /' conftest.$ac_ext >&5
11931
11932 ac_lo=`expr '(' $ac_mid ')' + 1`
11933fi
11934
11935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11936done
11937case $ac_lo in
11938?*) ac_cv_sizeof_long_double=$ac_lo;;
11939'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011940 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011941See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011942echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011943See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011944 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011945 else
11946 ac_cv_sizeof_long_double=0
11947 fi ;;
11948esac
11949else
11950 cat >conftest.$ac_ext <<_ACEOF
11951/* confdefs.h. */
11952_ACEOF
11953cat confdefs.h >>conftest.$ac_ext
11954cat >>conftest.$ac_ext <<_ACEOF
11955/* end confdefs.h. */
11956$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011957 typedef long double ac__type_sizeof_;
11958static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11959static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011960#include <stdio.h>
11961#include <stdlib.h>
11962int
11963main ()
11964{
11965
11966 FILE *f = fopen ("conftest.val", "w");
11967 if (! f)
11968 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011969 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011970 {
11971 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011972 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011973 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011974 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011975 }
11976 else
11977 {
11978 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011979 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011980 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011981 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011982 }
11983 return ferror (f) || fclose (f) != 0;
11984
11985 ;
11986 return 0;
11987}
11988_ACEOF
11989rm -f conftest$ac_exeext
11990if { (ac_try="$ac_link"
11991case "(($ac_try" in
11992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11993 *) ac_try_echo=$ac_try;;
11994esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011996 (eval "$ac_link") 2>&5
11997 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011999 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12000 { (case "(($ac_try" in
12001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12002 *) ac_try_echo=$ac_try;;
12003esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012005 (eval "$ac_try") 2>&5
12006 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012008 (exit $ac_status); }; }; then
12009 ac_cv_sizeof_long_double=`cat conftest.val`
12010else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012011 echo "$as_me: program exited with status $ac_status" >&5
12012echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012013sed 's/^/| /' conftest.$ac_ext >&5
12014
12015( exit $ac_status )
12016if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012017 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012018See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012019echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012020See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012021 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012022 else
12023 ac_cv_sizeof_long_double=0
12024 fi
12025fi
12026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12027fi
12028rm -f conftest.val
12029fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012030{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12031echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012032
12033
12034
12035cat >>confdefs.h <<_ACEOF
12036#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12037_ACEOF
12038
12039
12040fi
12041
12042
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012043{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12044echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012045have_c99_bool=no
12046cat >conftest.$ac_ext <<_ACEOF
12047/* confdefs.h. */
12048_ACEOF
12049cat confdefs.h >>conftest.$ac_ext
12050cat >>conftest.$ac_ext <<_ACEOF
12051/* end confdefs.h. */
12052
12053int
12054main ()
12055{
12056_Bool x; x = (_Bool)0;
12057 ;
12058 return 0;
12059}
12060_ACEOF
12061rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012062if { (ac_try="$ac_compile"
12063case "(($ac_try" in
12064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12065 *) ac_try_echo=$ac_try;;
12066esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012068 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012069 ac_status=$?
12070 grep -v '^ *+' conftest.er1 >conftest.err
12071 rm -f conftest.er1
12072 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012074 (exit $ac_status); } && {
12075 test -z "$ac_c_werror_flag" ||
12076 test ! -s conftest.err
12077 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012078
12079
12080cat >>confdefs.h <<\_ACEOF
12081#define HAVE_C99_BOOL 1
12082_ACEOF
12083
12084 have_c99_bool=yes
12085
12086else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012087 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012088sed 's/^/| /' conftest.$ac_ext >&5
12089
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012090
Thomas Woutersb2137042007-02-01 18:02:27 +000012091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012092
12093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012094{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12095echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012096if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012097{ echo "$as_me:$LINENO: checking for _Bool" >&5
12098echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12099if test "${ac_cv_type__Bool+set}" = set; then
12100 echo $ECHO_N "(cached) $ECHO_C" >&6
12101else
12102 cat >conftest.$ac_ext <<_ACEOF
12103/* confdefs.h. */
12104_ACEOF
12105cat confdefs.h >>conftest.$ac_ext
12106cat >>conftest.$ac_ext <<_ACEOF
12107/* end confdefs.h. */
12108$ac_includes_default
12109typedef _Bool ac__type_new_;
12110int
12111main ()
12112{
12113if ((ac__type_new_ *) 0)
12114 return 0;
12115if (sizeof (ac__type_new_))
12116 return 0;
12117 ;
12118 return 0;
12119}
12120_ACEOF
12121rm -f conftest.$ac_objext
12122if { (ac_try="$ac_compile"
12123case "(($ac_try" in
12124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12125 *) ac_try_echo=$ac_try;;
12126esac
12127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12128 (eval "$ac_compile") 2>conftest.er1
12129 ac_status=$?
12130 grep -v '^ *+' conftest.er1 >conftest.err
12131 rm -f conftest.er1
12132 cat conftest.err >&5
12133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12134 (exit $ac_status); } && {
12135 test -z "$ac_c_werror_flag" ||
12136 test ! -s conftest.err
12137 } && test -s conftest.$ac_objext; then
12138 ac_cv_type__Bool=yes
12139else
12140 echo "$as_me: failed program was:" >&5
12141sed 's/^/| /' conftest.$ac_ext >&5
12142
12143 ac_cv_type__Bool=no
12144fi
12145
12146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12147fi
12148{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12149echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012151# The cast to long int works around a bug in the HP C Compiler
12152# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12153# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12154# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012155{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12156echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012157if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012158 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012159else
12160 if test "$cross_compiling" = yes; then
12161 # Depending upon the size, compute the lo and hi bounds.
12162cat >conftest.$ac_ext <<_ACEOF
12163/* confdefs.h. */
12164_ACEOF
12165cat confdefs.h >>conftest.$ac_ext
12166cat >>conftest.$ac_ext <<_ACEOF
12167/* end confdefs.h. */
12168$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012169 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012170int
12171main ()
12172{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012173static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012174test_array [0] = 0
12175
12176 ;
12177 return 0;
12178}
12179_ACEOF
12180rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012181if { (ac_try="$ac_compile"
12182case "(($ac_try" in
12183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12184 *) ac_try_echo=$ac_try;;
12185esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012187 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012188 ac_status=$?
12189 grep -v '^ *+' conftest.er1 >conftest.err
12190 rm -f conftest.er1
12191 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012193 (exit $ac_status); } && {
12194 test -z "$ac_c_werror_flag" ||
12195 test ! -s conftest.err
12196 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012197 ac_lo=0 ac_mid=0
12198 while :; do
12199 cat >conftest.$ac_ext <<_ACEOF
12200/* confdefs.h. */
12201_ACEOF
12202cat confdefs.h >>conftest.$ac_ext
12203cat >>conftest.$ac_ext <<_ACEOF
12204/* end confdefs.h. */
12205$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012206 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012207int
12208main ()
12209{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012210static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012211test_array [0] = 0
12212
12213 ;
12214 return 0;
12215}
12216_ACEOF
12217rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218if { (ac_try="$ac_compile"
12219case "(($ac_try" in
12220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12221 *) ac_try_echo=$ac_try;;
12222esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012224 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012225 ac_status=$?
12226 grep -v '^ *+' conftest.er1 >conftest.err
12227 rm -f conftest.er1
12228 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012230 (exit $ac_status); } && {
12231 test -z "$ac_c_werror_flag" ||
12232 test ! -s conftest.err
12233 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012234 ac_hi=$ac_mid; break
12235else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012236 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012237sed 's/^/| /' conftest.$ac_ext >&5
12238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012239 ac_lo=`expr $ac_mid + 1`
12240 if test $ac_lo -le $ac_mid; then
12241 ac_lo= ac_hi=
12242 break
12243 fi
12244 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012246
12247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012248 done
12249else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012250 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012251sed 's/^/| /' conftest.$ac_ext >&5
12252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012253 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012254/* confdefs.h. */
12255_ACEOF
12256cat confdefs.h >>conftest.$ac_ext
12257cat >>conftest.$ac_ext <<_ACEOF
12258/* end confdefs.h. */
12259$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012260 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012261int
12262main ()
12263{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012264static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012265test_array [0] = 0
12266
12267 ;
12268 return 0;
12269}
12270_ACEOF
12271rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012272if { (ac_try="$ac_compile"
12273case "(($ac_try" in
12274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12275 *) ac_try_echo=$ac_try;;
12276esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012278 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012279 ac_status=$?
12280 grep -v '^ *+' conftest.er1 >conftest.err
12281 rm -f conftest.er1
12282 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012284 (exit $ac_status); } && {
12285 test -z "$ac_c_werror_flag" ||
12286 test ! -s conftest.err
12287 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012288 ac_hi=-1 ac_mid=-1
12289 while :; do
12290 cat >conftest.$ac_ext <<_ACEOF
12291/* confdefs.h. */
12292_ACEOF
12293cat confdefs.h >>conftest.$ac_ext
12294cat >>conftest.$ac_ext <<_ACEOF
12295/* end confdefs.h. */
12296$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012297 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012298int
12299main ()
12300{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012301static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012302test_array [0] = 0
12303
12304 ;
12305 return 0;
12306}
12307_ACEOF
12308rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012309if { (ac_try="$ac_compile"
12310case "(($ac_try" in
12311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12312 *) ac_try_echo=$ac_try;;
12313esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012315 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012316 ac_status=$?
12317 grep -v '^ *+' conftest.er1 >conftest.err
12318 rm -f conftest.er1
12319 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012321 (exit $ac_status); } && {
12322 test -z "$ac_c_werror_flag" ||
12323 test ! -s conftest.err
12324 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012325 ac_lo=$ac_mid; break
12326else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012327 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012328sed 's/^/| /' conftest.$ac_ext >&5
12329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012330 ac_hi=`expr '(' $ac_mid ')' - 1`
12331 if test $ac_mid -le $ac_hi; then
12332 ac_lo= ac_hi=
12333 break
12334 fi
12335 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012337
12338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012339 done
12340else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012341 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012342sed 's/^/| /' conftest.$ac_ext >&5
12343
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012344 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012346
12347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012349
12350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012351# Binary search between lo and hi bounds.
12352while test "x$ac_lo" != "x$ac_hi"; do
12353 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12354 cat >conftest.$ac_ext <<_ACEOF
12355/* confdefs.h. */
12356_ACEOF
12357cat confdefs.h >>conftest.$ac_ext
12358cat >>conftest.$ac_ext <<_ACEOF
12359/* end confdefs.h. */
12360$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012361 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012362int
12363main ()
12364{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012365static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012366test_array [0] = 0
12367
12368 ;
12369 return 0;
12370}
12371_ACEOF
12372rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012373if { (ac_try="$ac_compile"
12374case "(($ac_try" in
12375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12376 *) ac_try_echo=$ac_try;;
12377esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012379 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012380 ac_status=$?
12381 grep -v '^ *+' conftest.er1 >conftest.err
12382 rm -f conftest.er1
12383 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012385 (exit $ac_status); } && {
12386 test -z "$ac_c_werror_flag" ||
12387 test ! -s conftest.err
12388 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012389 ac_hi=$ac_mid
12390else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012391 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012392sed 's/^/| /' conftest.$ac_ext >&5
12393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012394 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012396
12397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012398done
12399case $ac_lo in
12400?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012401'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012402 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012403See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012404echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012405See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012406 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012407 else
12408 ac_cv_sizeof__Bool=0
12409 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012410esac
12411else
12412 cat >conftest.$ac_ext <<_ACEOF
12413/* confdefs.h. */
12414_ACEOF
12415cat confdefs.h >>conftest.$ac_ext
12416cat >>conftest.$ac_ext <<_ACEOF
12417/* end confdefs.h. */
12418$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012419 typedef _Bool ac__type_sizeof_;
12420static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12421static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012422#include <stdio.h>
12423#include <stdlib.h>
12424int
12425main ()
12426{
12427
12428 FILE *f = fopen ("conftest.val", "w");
12429 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012431 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012432 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012433 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012434 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012435 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012436 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012437 }
12438 else
12439 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012440 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012441 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012442 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012443 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012444 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012445 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012446
12447 ;
12448 return 0;
12449}
12450_ACEOF
12451rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012452if { (ac_try="$ac_link"
12453case "(($ac_try" in
12454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12455 *) ac_try_echo=$ac_try;;
12456esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012458 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012459 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012461 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012462 { (case "(($ac_try" in
12463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12464 *) ac_try_echo=$ac_try;;
12465esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012467 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012468 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012470 (exit $ac_status); }; }; then
12471 ac_cv_sizeof__Bool=`cat conftest.val`
12472else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012473 echo "$as_me: program exited with status $ac_status" >&5
12474echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012475sed 's/^/| /' conftest.$ac_ext >&5
12476
12477( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012478if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012479 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012480See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012481echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012482See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012483 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012484 else
12485 ac_cv_sizeof__Bool=0
12486 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012488rm -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 +000012489fi
12490rm -f conftest.val
12491fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012492{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12493echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012494
12495
12496
Thomas Woutersb2137042007-02-01 18:02:27 +000012497cat >>confdefs.h <<_ACEOF
12498#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12499_ACEOF
12500
12501
12502fi
12503
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012504{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12505echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012506if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012507 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012508else
12509 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012510/* confdefs.h. */
12511_ACEOF
12512cat confdefs.h >>conftest.$ac_ext
12513cat >>conftest.$ac_ext <<_ACEOF
12514/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012515#ifdef HAVE_STDINT_H
12516 #include <stdint.h>
12517 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012518
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012519typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012520int
12521main ()
12522{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012523if ((ac__type_new_ *) 0)
12524 return 0;
12525if (sizeof (ac__type_new_))
12526 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012527 ;
12528 return 0;
12529}
12530_ACEOF
12531rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012532if { (ac_try="$ac_compile"
12533case "(($ac_try" in
12534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12535 *) ac_try_echo=$ac_try;;
12536esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012538 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012539 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012540 grep -v '^ *+' conftest.er1 >conftest.err
12541 rm -f conftest.er1
12542 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012544 (exit $ac_status); } && {
12545 test -z "$ac_c_werror_flag" ||
12546 test ! -s conftest.err
12547 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012548 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012549else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012551sed 's/^/| /' conftest.$ac_ext >&5
12552
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012553 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012555
12556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012557fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012558{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12559echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12560if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012561
12562cat >>confdefs.h <<_ACEOF
12563#define HAVE_UINTPTR_T 1
12564_ACEOF
12565
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012566{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12567echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12568if test "${ac_cv_type_uintptr_t+set}" = set; then
12569 echo $ECHO_N "(cached) $ECHO_C" >&6
12570else
12571 cat >conftest.$ac_ext <<_ACEOF
12572/* confdefs.h. */
12573_ACEOF
12574cat confdefs.h >>conftest.$ac_ext
12575cat >>conftest.$ac_ext <<_ACEOF
12576/* end confdefs.h. */
12577$ac_includes_default
12578typedef uintptr_t ac__type_new_;
12579int
12580main ()
12581{
12582if ((ac__type_new_ *) 0)
12583 return 0;
12584if (sizeof (ac__type_new_))
12585 return 0;
12586 ;
12587 return 0;
12588}
12589_ACEOF
12590rm -f conftest.$ac_objext
12591if { (ac_try="$ac_compile"
12592case "(($ac_try" in
12593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12594 *) ac_try_echo=$ac_try;;
12595esac
12596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12597 (eval "$ac_compile") 2>conftest.er1
12598 ac_status=$?
12599 grep -v '^ *+' conftest.er1 >conftest.err
12600 rm -f conftest.er1
12601 cat conftest.err >&5
12602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12603 (exit $ac_status); } && {
12604 test -z "$ac_c_werror_flag" ||
12605 test ! -s conftest.err
12606 } && test -s conftest.$ac_objext; then
12607 ac_cv_type_uintptr_t=yes
12608else
12609 echo "$as_me: failed program was:" >&5
12610sed 's/^/| /' conftest.$ac_ext >&5
12611
12612 ac_cv_type_uintptr_t=no
12613fi
12614
12615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12616fi
12617{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12618echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12619
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012620# The cast to long int works around a bug in the HP C Compiler
12621# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12622# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12623# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012624{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12625echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012626if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012627 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012628else
Martin v. Löwis11437992002-04-12 09:54:03 +000012629 if test "$cross_compiling" = yes; then
12630 # Depending upon the size, compute the lo and hi bounds.
12631cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012632/* confdefs.h. */
12633_ACEOF
12634cat confdefs.h >>conftest.$ac_ext
12635cat >>conftest.$ac_ext <<_ACEOF
12636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012637$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012638 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012639int
12640main ()
12641{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012642static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012643test_array [0] = 0
12644
12645 ;
12646 return 0;
12647}
12648_ACEOF
12649rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012650if { (ac_try="$ac_compile"
12651case "(($ac_try" in
12652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12653 *) ac_try_echo=$ac_try;;
12654esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012656 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012657 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012658 grep -v '^ *+' conftest.er1 >conftest.err
12659 rm -f conftest.er1
12660 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012662 (exit $ac_status); } && {
12663 test -z "$ac_c_werror_flag" ||
12664 test ! -s conftest.err
12665 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012666 ac_lo=0 ac_mid=0
12667 while :; do
12668 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012669/* confdefs.h. */
12670_ACEOF
12671cat confdefs.h >>conftest.$ac_ext
12672cat >>conftest.$ac_ext <<_ACEOF
12673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012674$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012675 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012676int
12677main ()
12678{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012679static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012680test_array [0] = 0
12681
12682 ;
12683 return 0;
12684}
12685_ACEOF
12686rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012687if { (ac_try="$ac_compile"
12688case "(($ac_try" in
12689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12690 *) ac_try_echo=$ac_try;;
12691esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012694 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012695 grep -v '^ *+' conftest.er1 >conftest.err
12696 rm -f conftest.er1
12697 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012699 (exit $ac_status); } && {
12700 test -z "$ac_c_werror_flag" ||
12701 test ! -s conftest.err
12702 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012703 ac_hi=$ac_mid; break
12704else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012706sed 's/^/| /' conftest.$ac_ext >&5
12707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012708 ac_lo=`expr $ac_mid + 1`
12709 if test $ac_lo -le $ac_mid; then
12710 ac_lo= ac_hi=
12711 break
12712 fi
12713 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012715
12716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012717 done
12718else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012720sed 's/^/| /' conftest.$ac_ext >&5
12721
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012722 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012723/* confdefs.h. */
12724_ACEOF
12725cat confdefs.h >>conftest.$ac_ext
12726cat >>conftest.$ac_ext <<_ACEOF
12727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012728$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012729 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012730int
12731main ()
12732{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012733static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012734test_array [0] = 0
12735
12736 ;
12737 return 0;
12738}
12739_ACEOF
12740rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012741if { (ac_try="$ac_compile"
12742case "(($ac_try" in
12743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12744 *) ac_try_echo=$ac_try;;
12745esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012747 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012749 grep -v '^ *+' conftest.er1 >conftest.err
12750 rm -f conftest.er1
12751 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012753 (exit $ac_status); } && {
12754 test -z "$ac_c_werror_flag" ||
12755 test ! -s conftest.err
12756 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012757 ac_hi=-1 ac_mid=-1
12758 while :; do
12759 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012760/* confdefs.h. */
12761_ACEOF
12762cat confdefs.h >>conftest.$ac_ext
12763cat >>conftest.$ac_ext <<_ACEOF
12764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012765$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012766 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012767int
12768main ()
12769{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012770static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012771test_array [0] = 0
12772
12773 ;
12774 return 0;
12775}
12776_ACEOF
12777rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012778if { (ac_try="$ac_compile"
12779case "(($ac_try" in
12780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12781 *) ac_try_echo=$ac_try;;
12782esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012785 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012786 grep -v '^ *+' conftest.er1 >conftest.err
12787 rm -f conftest.er1
12788 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012790 (exit $ac_status); } && {
12791 test -z "$ac_c_werror_flag" ||
12792 test ! -s conftest.err
12793 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012794 ac_lo=$ac_mid; break
12795else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012797sed 's/^/| /' conftest.$ac_ext >&5
12798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012799 ac_hi=`expr '(' $ac_mid ')' - 1`
12800 if test $ac_mid -le $ac_hi; then
12801 ac_lo= ac_hi=
12802 break
12803 fi
12804 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012806
12807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012808 done
12809else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012811sed 's/^/| /' conftest.$ac_ext >&5
12812
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012813 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012815
12816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012818
12819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012820# Binary search between lo and hi bounds.
12821while test "x$ac_lo" != "x$ac_hi"; do
12822 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012824/* confdefs.h. */
12825_ACEOF
12826cat confdefs.h >>conftest.$ac_ext
12827cat >>conftest.$ac_ext <<_ACEOF
12828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012829$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012830 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012831int
12832main ()
12833{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012834static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012835test_array [0] = 0
12836
12837 ;
12838 return 0;
12839}
12840_ACEOF
12841rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012842if { (ac_try="$ac_compile"
12843case "(($ac_try" in
12844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12845 *) ac_try_echo=$ac_try;;
12846esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012848 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012850 grep -v '^ *+' conftest.er1 >conftest.err
12851 rm -f conftest.er1
12852 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012854 (exit $ac_status); } && {
12855 test -z "$ac_c_werror_flag" ||
12856 test ! -s conftest.err
12857 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012858 ac_hi=$ac_mid
12859else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012861sed 's/^/| /' conftest.$ac_ext >&5
12862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012863 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012865
12866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012867done
12868case $ac_lo in
12869?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012870'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012871 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012872See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012873echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012874See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012875 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012876 else
12877 ac_cv_sizeof_uintptr_t=0
12878 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012879esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012880else
Martin v. Löwis11437992002-04-12 09:54:03 +000012881 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012882/* confdefs.h. */
12883_ACEOF
12884cat confdefs.h >>conftest.$ac_ext
12885cat >>conftest.$ac_ext <<_ACEOF
12886/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012887$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012888 typedef uintptr_t ac__type_sizeof_;
12889static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12890static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012891#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012892#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012893int
12894main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012895{
Martin v. Löwis11437992002-04-12 09:54:03 +000012896
12897 FILE *f = fopen ("conftest.val", "w");
12898 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012900 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012901 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012902 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012903 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012904 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012905 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 }
12907 else
12908 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012910 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012912 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012913 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012914 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012915
12916 ;
12917 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012918}
Martin v. Löwis11437992002-04-12 09:54:03 +000012919_ACEOF
12920rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012921if { (ac_try="$ac_link"
12922case "(($ac_try" in
12923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12924 *) ac_try_echo=$ac_try;;
12925esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012927 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012928 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012930 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012931 { (case "(($ac_try" in
12932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12933 *) ac_try_echo=$ac_try;;
12934esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012937 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012939 (exit $ac_status); }; }; then
12940 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012941else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012942 echo "$as_me: program exited with status $ac_status" >&5
12943echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012944sed 's/^/| /' conftest.$ac_ext >&5
12945
Martin v. Löwis11437992002-04-12 09:54:03 +000012946( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012947if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012948 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012949See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012950echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012951See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012952 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012953 else
12954 ac_cv_sizeof_uintptr_t=0
12955 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012957rm -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 +000012958fi
12959rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012960fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012961{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12962echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012963
12964
12965
Martin v. Löwis11437992002-04-12 09:54:03 +000012966cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012967#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012968_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012969
Michael W. Hudson54241132001-12-07 15:38:26 +000012970
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012971fi
12972
Thomas Wouters89f507f2006-12-13 04:49:30 +000012973
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012974{ echo "$as_me:$LINENO: checking for off_t" >&5
12975echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
12976if test "${ac_cv_type_off_t+set}" = set; then
12977 echo $ECHO_N "(cached) $ECHO_C" >&6
12978else
12979 cat >conftest.$ac_ext <<_ACEOF
12980/* confdefs.h. */
12981_ACEOF
12982cat confdefs.h >>conftest.$ac_ext
12983cat >>conftest.$ac_ext <<_ACEOF
12984/* end confdefs.h. */
12985
12986#ifdef HAVE_SYS_TYPES_H
12987#include <sys/types.h>
12988#endif
12989
12990
12991typedef off_t ac__type_new_;
12992int
12993main ()
12994{
12995if ((ac__type_new_ *) 0)
12996 return 0;
12997if (sizeof (ac__type_new_))
12998 return 0;
12999 ;
13000 return 0;
13001}
13002_ACEOF
13003rm -f conftest.$ac_objext
13004if { (ac_try="$ac_compile"
13005case "(($ac_try" in
13006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13007 *) ac_try_echo=$ac_try;;
13008esac
13009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13010 (eval "$ac_compile") 2>conftest.er1
13011 ac_status=$?
13012 grep -v '^ *+' conftest.er1 >conftest.err
13013 rm -f conftest.er1
13014 cat conftest.err >&5
13015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13016 (exit $ac_status); } && {
13017 test -z "$ac_c_werror_flag" ||
13018 test ! -s conftest.err
13019 } && test -s conftest.$ac_objext; then
13020 ac_cv_type_off_t=yes
13021else
13022 echo "$as_me: failed program was:" >&5
13023sed 's/^/| /' conftest.$ac_ext >&5
13024
13025 ac_cv_type_off_t=no
13026fi
13027
13028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13029fi
13030{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13031echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13032
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013033# The cast to long int works around a bug in the HP C Compiler
13034# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13035# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13036# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013037{ echo "$as_me:$LINENO: checking size of off_t" >&5
13038echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013039if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013040 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013041else
13042 if test "$cross_compiling" = yes; then
13043 # Depending upon the size, compute the lo and hi bounds.
13044cat >conftest.$ac_ext <<_ACEOF
13045/* confdefs.h. */
13046_ACEOF
13047cat confdefs.h >>conftest.$ac_ext
13048cat >>conftest.$ac_ext <<_ACEOF
13049/* end confdefs.h. */
13050
13051#ifdef HAVE_SYS_TYPES_H
13052#include <sys/types.h>
13053#endif
13054
13055
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013056 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013057int
13058main ()
13059{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013060static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013061test_array [0] = 0
13062
13063 ;
13064 return 0;
13065}
13066_ACEOF
13067rm -f conftest.$ac_objext
13068if { (ac_try="$ac_compile"
13069case "(($ac_try" in
13070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13071 *) ac_try_echo=$ac_try;;
13072esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013074 (eval "$ac_compile") 2>conftest.er1
13075 ac_status=$?
13076 grep -v '^ *+' conftest.er1 >conftest.err
13077 rm -f conftest.er1
13078 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013080 (exit $ac_status); } && {
13081 test -z "$ac_c_werror_flag" ||
13082 test ! -s conftest.err
13083 } && test -s conftest.$ac_objext; then
13084 ac_lo=0 ac_mid=0
13085 while :; do
13086 cat >conftest.$ac_ext <<_ACEOF
13087/* confdefs.h. */
13088_ACEOF
13089cat confdefs.h >>conftest.$ac_ext
13090cat >>conftest.$ac_ext <<_ACEOF
13091/* end confdefs.h. */
13092
13093#ifdef HAVE_SYS_TYPES_H
13094#include <sys/types.h>
13095#endif
13096
13097
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013098 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013099int
13100main ()
13101{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013102static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013103test_array [0] = 0
13104
13105 ;
13106 return 0;
13107}
13108_ACEOF
13109rm -f conftest.$ac_objext
13110if { (ac_try="$ac_compile"
13111case "(($ac_try" in
13112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13113 *) ac_try_echo=$ac_try;;
13114esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013116 (eval "$ac_compile") 2>conftest.er1
13117 ac_status=$?
13118 grep -v '^ *+' conftest.er1 >conftest.err
13119 rm -f conftest.er1
13120 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013122 (exit $ac_status); } && {
13123 test -z "$ac_c_werror_flag" ||
13124 test ! -s conftest.err
13125 } && test -s conftest.$ac_objext; then
13126 ac_hi=$ac_mid; break
13127else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013128 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013129sed 's/^/| /' conftest.$ac_ext >&5
13130
13131 ac_lo=`expr $ac_mid + 1`
13132 if test $ac_lo -le $ac_mid; then
13133 ac_lo= ac_hi=
13134 break
13135 fi
13136 ac_mid=`expr 2 '*' $ac_mid + 1`
13137fi
13138
13139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13140 done
13141else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013142 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013143sed 's/^/| /' conftest.$ac_ext >&5
13144
13145 cat >conftest.$ac_ext <<_ACEOF
13146/* confdefs.h. */
13147_ACEOF
13148cat confdefs.h >>conftest.$ac_ext
13149cat >>conftest.$ac_ext <<_ACEOF
13150/* end confdefs.h. */
13151
13152#ifdef HAVE_SYS_TYPES_H
13153#include <sys/types.h>
13154#endif
13155
13156
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013157 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013158int
13159main ()
13160{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013161static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013162test_array [0] = 0
13163
13164 ;
13165 return 0;
13166}
13167_ACEOF
13168rm -f conftest.$ac_objext
13169if { (ac_try="$ac_compile"
13170case "(($ac_try" in
13171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13172 *) ac_try_echo=$ac_try;;
13173esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013175 (eval "$ac_compile") 2>conftest.er1
13176 ac_status=$?
13177 grep -v '^ *+' conftest.er1 >conftest.err
13178 rm -f conftest.er1
13179 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013181 (exit $ac_status); } && {
13182 test -z "$ac_c_werror_flag" ||
13183 test ! -s conftest.err
13184 } && test -s conftest.$ac_objext; then
13185 ac_hi=-1 ac_mid=-1
13186 while :; do
13187 cat >conftest.$ac_ext <<_ACEOF
13188/* confdefs.h. */
13189_ACEOF
13190cat confdefs.h >>conftest.$ac_ext
13191cat >>conftest.$ac_ext <<_ACEOF
13192/* end confdefs.h. */
13193
13194#ifdef HAVE_SYS_TYPES_H
13195#include <sys/types.h>
13196#endif
13197
13198
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013199 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013200int
13201main ()
13202{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013203static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013204test_array [0] = 0
13205
13206 ;
13207 return 0;
13208}
13209_ACEOF
13210rm -f conftest.$ac_objext
13211if { (ac_try="$ac_compile"
13212case "(($ac_try" in
13213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13214 *) ac_try_echo=$ac_try;;
13215esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013217 (eval "$ac_compile") 2>conftest.er1
13218 ac_status=$?
13219 grep -v '^ *+' conftest.er1 >conftest.err
13220 rm -f conftest.er1
13221 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013223 (exit $ac_status); } && {
13224 test -z "$ac_c_werror_flag" ||
13225 test ! -s conftest.err
13226 } && test -s conftest.$ac_objext; then
13227 ac_lo=$ac_mid; break
13228else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013229 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013230sed 's/^/| /' conftest.$ac_ext >&5
13231
13232 ac_hi=`expr '(' $ac_mid ')' - 1`
13233 if test $ac_mid -le $ac_hi; then
13234 ac_lo= ac_hi=
13235 break
13236 fi
13237 ac_mid=`expr 2 '*' $ac_mid`
13238fi
13239
13240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13241 done
13242else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013243 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013244sed 's/^/| /' conftest.$ac_ext >&5
13245
13246 ac_lo= ac_hi=
13247fi
13248
13249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13250fi
13251
13252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13253# Binary search between lo and hi bounds.
13254while test "x$ac_lo" != "x$ac_hi"; do
13255 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13256 cat >conftest.$ac_ext <<_ACEOF
13257/* confdefs.h. */
13258_ACEOF
13259cat confdefs.h >>conftest.$ac_ext
13260cat >>conftest.$ac_ext <<_ACEOF
13261/* end confdefs.h. */
13262
13263#ifdef HAVE_SYS_TYPES_H
13264#include <sys/types.h>
13265#endif
13266
13267
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013268 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013269int
13270main ()
13271{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013272static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013273test_array [0] = 0
13274
13275 ;
13276 return 0;
13277}
13278_ACEOF
13279rm -f conftest.$ac_objext
13280if { (ac_try="$ac_compile"
13281case "(($ac_try" in
13282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13283 *) ac_try_echo=$ac_try;;
13284esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013286 (eval "$ac_compile") 2>conftest.er1
13287 ac_status=$?
13288 grep -v '^ *+' conftest.er1 >conftest.err
13289 rm -f conftest.er1
13290 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013292 (exit $ac_status); } && {
13293 test -z "$ac_c_werror_flag" ||
13294 test ! -s conftest.err
13295 } && test -s conftest.$ac_objext; then
13296 ac_hi=$ac_mid
13297else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013298 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013299sed 's/^/| /' conftest.$ac_ext >&5
13300
13301 ac_lo=`expr '(' $ac_mid ')' + 1`
13302fi
13303
13304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13305done
13306case $ac_lo in
13307?*) ac_cv_sizeof_off_t=$ac_lo;;
13308'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013309 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013310See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013311echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013312See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013313 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013314 else
13315 ac_cv_sizeof_off_t=0
13316 fi ;;
13317esac
13318else
13319 cat >conftest.$ac_ext <<_ACEOF
13320/* confdefs.h. */
13321_ACEOF
13322cat confdefs.h >>conftest.$ac_ext
13323cat >>conftest.$ac_ext <<_ACEOF
13324/* end confdefs.h. */
13325
13326#ifdef HAVE_SYS_TYPES_H
13327#include <sys/types.h>
13328#endif
13329
13330
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013331 typedef off_t ac__type_sizeof_;
13332static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13333static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013334#include <stdio.h>
13335#include <stdlib.h>
13336int
13337main ()
13338{
13339
13340 FILE *f = fopen ("conftest.val", "w");
13341 if (! f)
13342 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013343 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013344 {
13345 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013346 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013347 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013348 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013349 }
13350 else
13351 {
13352 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013353 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013354 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013355 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013356 }
13357 return ferror (f) || fclose (f) != 0;
13358
13359 ;
13360 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013361}
Martin v. Löwis11437992002-04-12 09:54:03 +000013362_ACEOF
13363rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013364if { (ac_try="$ac_link"
13365case "(($ac_try" in
13366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13367 *) ac_try_echo=$ac_try;;
13368esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013370 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013371 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013373 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013374 { (case "(($ac_try" in
13375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13376 *) ac_try_echo=$ac_try;;
13377esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013379 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013380 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013382 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013383 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013384else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013385 echo "$as_me: program exited with status $ac_status" >&5
13386echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013387sed 's/^/| /' conftest.$ac_ext >&5
13388
Martin v. Löwis11437992002-04-12 09:54:03 +000013389( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013390if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013391 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013392See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013393echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013394See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013395 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013396 else
13397 ac_cv_sizeof_off_t=0
13398 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013400rm -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 +000013401fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013402rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013403fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013404{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13405echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013406
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013407
13408
Martin v. Löwis11437992002-04-12 09:54:03 +000013409cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013410#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013411_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013412
Michael W. Hudson54241132001-12-07 15:38:26 +000013413
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013414
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013415{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13416echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +000013417if test "$have_long_long" = yes
13418then
13419if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013420 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013421
Martin v. Löwis11437992002-04-12 09:54:03 +000013422cat >>confdefs.h <<\_ACEOF
13423#define HAVE_LARGEFILE_SUPPORT 1
13424_ACEOF
13425
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013426 { echo "$as_me:$LINENO: result: yes" >&5
13427echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013428else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013429 { echo "$as_me:$LINENO: result: no" >&5
13430echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013431fi
Mark Dickinson2df5d282009-12-31 21:22:50 +000013432else
13433 { echo "$as_me:$LINENO: result: no" >&5
13434echo "${ECHO_T}no" >&6; }
13435fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013436
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013437{ echo "$as_me:$LINENO: checking for time_t" >&5
13438echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13439if test "${ac_cv_type_time_t+set}" = set; then
13440 echo $ECHO_N "(cached) $ECHO_C" >&6
13441else
13442 cat >conftest.$ac_ext <<_ACEOF
13443/* confdefs.h. */
13444_ACEOF
13445cat confdefs.h >>conftest.$ac_ext
13446cat >>conftest.$ac_ext <<_ACEOF
13447/* end confdefs.h. */
13448
13449#ifdef HAVE_SYS_TYPES_H
13450#include <sys/types.h>
13451#endif
13452#ifdef HAVE_TIME_H
13453#include <time.h>
13454#endif
13455
13456
13457typedef time_t ac__type_new_;
13458int
13459main ()
13460{
13461if ((ac__type_new_ *) 0)
13462 return 0;
13463if (sizeof (ac__type_new_))
13464 return 0;
13465 ;
13466 return 0;
13467}
13468_ACEOF
13469rm -f conftest.$ac_objext
13470if { (ac_try="$ac_compile"
13471case "(($ac_try" in
13472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13473 *) ac_try_echo=$ac_try;;
13474esac
13475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13476 (eval "$ac_compile") 2>conftest.er1
13477 ac_status=$?
13478 grep -v '^ *+' conftest.er1 >conftest.err
13479 rm -f conftest.er1
13480 cat conftest.err >&5
13481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13482 (exit $ac_status); } && {
13483 test -z "$ac_c_werror_flag" ||
13484 test ! -s conftest.err
13485 } && test -s conftest.$ac_objext; then
13486 ac_cv_type_time_t=yes
13487else
13488 echo "$as_me: failed program was:" >&5
13489sed 's/^/| /' conftest.$ac_ext >&5
13490
13491 ac_cv_type_time_t=no
13492fi
13493
13494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13495fi
13496{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13497echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13498
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013499# The cast to long int works around a bug in the HP C Compiler
13500# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13501# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13502# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013503{ echo "$as_me:$LINENO: checking size of time_t" >&5
13504echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013505if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013506 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013507else
13508 if test "$cross_compiling" = yes; then
13509 # Depending upon the size, compute the lo and hi bounds.
13510cat >conftest.$ac_ext <<_ACEOF
13511/* confdefs.h. */
13512_ACEOF
13513cat confdefs.h >>conftest.$ac_ext
13514cat >>conftest.$ac_ext <<_ACEOF
13515/* end confdefs.h. */
13516
13517#ifdef HAVE_SYS_TYPES_H
13518#include <sys/types.h>
13519#endif
13520#ifdef HAVE_TIME_H
13521#include <time.h>
13522#endif
13523
13524
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013525 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013526int
13527main ()
13528{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013529static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013530test_array [0] = 0
13531
13532 ;
13533 return 0;
13534}
13535_ACEOF
13536rm -f conftest.$ac_objext
13537if { (ac_try="$ac_compile"
13538case "(($ac_try" in
13539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13540 *) ac_try_echo=$ac_try;;
13541esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013543 (eval "$ac_compile") 2>conftest.er1
13544 ac_status=$?
13545 grep -v '^ *+' conftest.er1 >conftest.err
13546 rm -f conftest.er1
13547 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013549 (exit $ac_status); } && {
13550 test -z "$ac_c_werror_flag" ||
13551 test ! -s conftest.err
13552 } && test -s conftest.$ac_objext; then
13553 ac_lo=0 ac_mid=0
13554 while :; do
13555 cat >conftest.$ac_ext <<_ACEOF
13556/* confdefs.h. */
13557_ACEOF
13558cat confdefs.h >>conftest.$ac_ext
13559cat >>conftest.$ac_ext <<_ACEOF
13560/* end confdefs.h. */
13561
13562#ifdef HAVE_SYS_TYPES_H
13563#include <sys/types.h>
13564#endif
13565#ifdef HAVE_TIME_H
13566#include <time.h>
13567#endif
13568
13569
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013570 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013571int
13572main ()
13573{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013574static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013575test_array [0] = 0
13576
13577 ;
13578 return 0;
13579}
13580_ACEOF
13581rm -f conftest.$ac_objext
13582if { (ac_try="$ac_compile"
13583case "(($ac_try" in
13584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13585 *) ac_try_echo=$ac_try;;
13586esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013588 (eval "$ac_compile") 2>conftest.er1
13589 ac_status=$?
13590 grep -v '^ *+' conftest.er1 >conftest.err
13591 rm -f conftest.er1
13592 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013594 (exit $ac_status); } && {
13595 test -z "$ac_c_werror_flag" ||
13596 test ! -s conftest.err
13597 } && test -s conftest.$ac_objext; then
13598 ac_hi=$ac_mid; break
13599else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013600 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013601sed 's/^/| /' conftest.$ac_ext >&5
13602
13603 ac_lo=`expr $ac_mid + 1`
13604 if test $ac_lo -le $ac_mid; then
13605 ac_lo= ac_hi=
13606 break
13607 fi
13608 ac_mid=`expr 2 '*' $ac_mid + 1`
13609fi
13610
13611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13612 done
13613else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013614 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013615sed 's/^/| /' conftest.$ac_ext >&5
13616
13617 cat >conftest.$ac_ext <<_ACEOF
13618/* confdefs.h. */
13619_ACEOF
13620cat confdefs.h >>conftest.$ac_ext
13621cat >>conftest.$ac_ext <<_ACEOF
13622/* end confdefs.h. */
13623
13624#ifdef HAVE_SYS_TYPES_H
13625#include <sys/types.h>
13626#endif
13627#ifdef HAVE_TIME_H
13628#include <time.h>
13629#endif
13630
13631
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013632 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013633int
13634main ()
13635{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013636static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013637test_array [0] = 0
13638
13639 ;
13640 return 0;
13641}
13642_ACEOF
13643rm -f conftest.$ac_objext
13644if { (ac_try="$ac_compile"
13645case "(($ac_try" in
13646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13647 *) ac_try_echo=$ac_try;;
13648esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013650 (eval "$ac_compile") 2>conftest.er1
13651 ac_status=$?
13652 grep -v '^ *+' conftest.er1 >conftest.err
13653 rm -f conftest.er1
13654 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013656 (exit $ac_status); } && {
13657 test -z "$ac_c_werror_flag" ||
13658 test ! -s conftest.err
13659 } && test -s conftest.$ac_objext; then
13660 ac_hi=-1 ac_mid=-1
13661 while :; do
13662 cat >conftest.$ac_ext <<_ACEOF
13663/* confdefs.h. */
13664_ACEOF
13665cat confdefs.h >>conftest.$ac_ext
13666cat >>conftest.$ac_ext <<_ACEOF
13667/* end confdefs.h. */
13668
13669#ifdef HAVE_SYS_TYPES_H
13670#include <sys/types.h>
13671#endif
13672#ifdef HAVE_TIME_H
13673#include <time.h>
13674#endif
13675
13676
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013677 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013678int
13679main ()
13680{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013681static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013682test_array [0] = 0
13683
13684 ;
13685 return 0;
13686}
13687_ACEOF
13688rm -f conftest.$ac_objext
13689if { (ac_try="$ac_compile"
13690case "(($ac_try" in
13691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13692 *) ac_try_echo=$ac_try;;
13693esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013695 (eval "$ac_compile") 2>conftest.er1
13696 ac_status=$?
13697 grep -v '^ *+' conftest.er1 >conftest.err
13698 rm -f conftest.er1
13699 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013701 (exit $ac_status); } && {
13702 test -z "$ac_c_werror_flag" ||
13703 test ! -s conftest.err
13704 } && test -s conftest.$ac_objext; then
13705 ac_lo=$ac_mid; break
13706else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013707 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013708sed 's/^/| /' conftest.$ac_ext >&5
13709
13710 ac_hi=`expr '(' $ac_mid ')' - 1`
13711 if test $ac_mid -le $ac_hi; then
13712 ac_lo= ac_hi=
13713 break
13714 fi
13715 ac_mid=`expr 2 '*' $ac_mid`
13716fi
13717
13718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13719 done
13720else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013721 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013722sed 's/^/| /' conftest.$ac_ext >&5
13723
13724 ac_lo= ac_hi=
13725fi
13726
13727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13728fi
13729
13730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13731# Binary search between lo and hi bounds.
13732while test "x$ac_lo" != "x$ac_hi"; do
13733 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13734 cat >conftest.$ac_ext <<_ACEOF
13735/* confdefs.h. */
13736_ACEOF
13737cat confdefs.h >>conftest.$ac_ext
13738cat >>conftest.$ac_ext <<_ACEOF
13739/* end confdefs.h. */
13740
13741#ifdef HAVE_SYS_TYPES_H
13742#include <sys/types.h>
13743#endif
13744#ifdef HAVE_TIME_H
13745#include <time.h>
13746#endif
13747
13748
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013749 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013750int
13751main ()
13752{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013753static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013754test_array [0] = 0
13755
13756 ;
13757 return 0;
13758}
13759_ACEOF
13760rm -f conftest.$ac_objext
13761if { (ac_try="$ac_compile"
13762case "(($ac_try" in
13763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13764 *) ac_try_echo=$ac_try;;
13765esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013767 (eval "$ac_compile") 2>conftest.er1
13768 ac_status=$?
13769 grep -v '^ *+' conftest.er1 >conftest.err
13770 rm -f conftest.er1
13771 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013773 (exit $ac_status); } && {
13774 test -z "$ac_c_werror_flag" ||
13775 test ! -s conftest.err
13776 } && test -s conftest.$ac_objext; then
13777 ac_hi=$ac_mid
13778else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013779 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013780sed 's/^/| /' conftest.$ac_ext >&5
13781
13782 ac_lo=`expr '(' $ac_mid ')' + 1`
13783fi
13784
13785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13786done
13787case $ac_lo in
13788?*) ac_cv_sizeof_time_t=$ac_lo;;
13789'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013790 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013791See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013792echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013793See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013794 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013795 else
13796 ac_cv_sizeof_time_t=0
13797 fi ;;
13798esac
13799else
13800 cat >conftest.$ac_ext <<_ACEOF
13801/* confdefs.h. */
13802_ACEOF
13803cat confdefs.h >>conftest.$ac_ext
13804cat >>conftest.$ac_ext <<_ACEOF
13805/* end confdefs.h. */
13806
13807#ifdef HAVE_SYS_TYPES_H
13808#include <sys/types.h>
13809#endif
13810#ifdef HAVE_TIME_H
13811#include <time.h>
13812#endif
13813
13814
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013815 typedef time_t ac__type_sizeof_;
13816static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13817static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013818#include <stdio.h>
13819#include <stdlib.h>
13820int
13821main ()
13822{
13823
13824 FILE *f = fopen ("conftest.val", "w");
13825 if (! f)
13826 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013827 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013828 {
13829 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013830 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013831 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013832 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013833 }
13834 else
13835 {
13836 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013837 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013838 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013839 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013840 }
13841 return ferror (f) || fclose (f) != 0;
13842
13843 ;
13844 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013845}
Martin v. Löwis11437992002-04-12 09:54:03 +000013846_ACEOF
13847rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013848if { (ac_try="$ac_link"
13849case "(($ac_try" in
13850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13851 *) ac_try_echo=$ac_try;;
13852esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013854 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013855 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013857 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013858 { (case "(($ac_try" in
13859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13860 *) ac_try_echo=$ac_try;;
13861esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013863 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013864 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013866 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013867 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013868else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013869 echo "$as_me: program exited with status $ac_status" >&5
13870echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013871sed 's/^/| /' conftest.$ac_ext >&5
13872
Martin v. Löwis11437992002-04-12 09:54:03 +000013873( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013874if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013875 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013876See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013877echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013878See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013879 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013880 else
13881 ac_cv_sizeof_time_t=0
13882 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013883fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013884rm -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 +000013885fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013886rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013887fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013888{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13889echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013890
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013891
13892
Martin v. Löwis11437992002-04-12 09:54:03 +000013893cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013894#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013895_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013896
Michael W. Hudson54241132001-12-07 15:38:26 +000013897
13898
Trent Mick635f6fb2000-08-23 21:33:05 +000013899# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013900ac_save_cc="$CC"
13901if test "$ac_cv_kpthread" = "yes"
13902then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013903elif test "$ac_cv_kthread" = "yes"
13904then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013905elif test "$ac_cv_pthread" = "yes"
13906then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013907fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013908
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013909{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13910echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013911have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013912cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013913/* confdefs.h. */
13914_ACEOF
13915cat confdefs.h >>conftest.$ac_ext
13916cat >>conftest.$ac_ext <<_ACEOF
13917/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013918#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013919int
13920main ()
13921{
Guido van Rossum12580492000-09-24 16:47:19 +000013922pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013923 ;
13924 return 0;
13925}
13926_ACEOF
13927rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013928if { (ac_try="$ac_compile"
13929case "(($ac_try" in
13930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13931 *) ac_try_echo=$ac_try;;
13932esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013934 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013935 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013936 grep -v '^ *+' conftest.er1 >conftest.err
13937 rm -f conftest.er1
13938 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013940 (exit $ac_status); } && {
13941 test -z "$ac_c_werror_flag" ||
13942 test ! -s conftest.err
13943 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013944 have_pthread_t=yes
13945else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013946 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013947sed 's/^/| /' conftest.$ac_ext >&5
13948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013949
Trent Mick635f6fb2000-08-23 21:33:05 +000013950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013951
13952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013953{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13954echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013955if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013956 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13957echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13958if test "${ac_cv_type_pthread_t+set}" = set; then
13959 echo $ECHO_N "(cached) $ECHO_C" >&6
13960else
13961 cat >conftest.$ac_ext <<_ACEOF
13962/* confdefs.h. */
13963_ACEOF
13964cat confdefs.h >>conftest.$ac_ext
13965cat >>conftest.$ac_ext <<_ACEOF
13966/* end confdefs.h. */
13967
13968#ifdef HAVE_PTHREAD_H
13969#include <pthread.h>
13970#endif
13971
13972
13973typedef pthread_t ac__type_new_;
13974int
13975main ()
13976{
13977if ((ac__type_new_ *) 0)
13978 return 0;
13979if (sizeof (ac__type_new_))
13980 return 0;
13981 ;
13982 return 0;
13983}
13984_ACEOF
13985rm -f conftest.$ac_objext
13986if { (ac_try="$ac_compile"
13987case "(($ac_try" in
13988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13989 *) ac_try_echo=$ac_try;;
13990esac
13991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13992 (eval "$ac_compile") 2>conftest.er1
13993 ac_status=$?
13994 grep -v '^ *+' conftest.er1 >conftest.err
13995 rm -f conftest.er1
13996 cat conftest.err >&5
13997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13998 (exit $ac_status); } && {
13999 test -z "$ac_c_werror_flag" ||
14000 test ! -s conftest.err
14001 } && test -s conftest.$ac_objext; then
14002 ac_cv_type_pthread_t=yes
14003else
14004 echo "$as_me: failed program was:" >&5
14005sed 's/^/| /' conftest.$ac_ext >&5
14006
14007 ac_cv_type_pthread_t=no
14008fi
14009
14010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14011fi
14012{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14013echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14014
14015# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014016# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14017# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14018# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014019{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14020echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014021if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014022 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014023else
14024 if test "$cross_compiling" = yes; then
14025 # Depending upon the size, compute the lo and hi bounds.
14026cat >conftest.$ac_ext <<_ACEOF
14027/* confdefs.h. */
14028_ACEOF
14029cat confdefs.h >>conftest.$ac_ext
14030cat >>conftest.$ac_ext <<_ACEOF
14031/* end confdefs.h. */
14032
14033#ifdef HAVE_PTHREAD_H
14034#include <pthread.h>
14035#endif
14036
14037
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014038 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014039int
14040main ()
14041{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014042static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014043test_array [0] = 0
14044
14045 ;
14046 return 0;
14047}
14048_ACEOF
14049rm -f conftest.$ac_objext
14050if { (ac_try="$ac_compile"
14051case "(($ac_try" in
14052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14053 *) ac_try_echo=$ac_try;;
14054esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014056 (eval "$ac_compile") 2>conftest.er1
14057 ac_status=$?
14058 grep -v '^ *+' conftest.er1 >conftest.err
14059 rm -f conftest.er1
14060 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014062 (exit $ac_status); } && {
14063 test -z "$ac_c_werror_flag" ||
14064 test ! -s conftest.err
14065 } && test -s conftest.$ac_objext; then
14066 ac_lo=0 ac_mid=0
14067 while :; do
14068 cat >conftest.$ac_ext <<_ACEOF
14069/* confdefs.h. */
14070_ACEOF
14071cat confdefs.h >>conftest.$ac_ext
14072cat >>conftest.$ac_ext <<_ACEOF
14073/* end confdefs.h. */
14074
14075#ifdef HAVE_PTHREAD_H
14076#include <pthread.h>
14077#endif
14078
14079
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014080 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014081int
14082main ()
14083{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014084static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014085test_array [0] = 0
14086
14087 ;
14088 return 0;
14089}
14090_ACEOF
14091rm -f conftest.$ac_objext
14092if { (ac_try="$ac_compile"
14093case "(($ac_try" in
14094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14095 *) ac_try_echo=$ac_try;;
14096esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014098 (eval "$ac_compile") 2>conftest.er1
14099 ac_status=$?
14100 grep -v '^ *+' conftest.er1 >conftest.err
14101 rm -f conftest.er1
14102 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014104 (exit $ac_status); } && {
14105 test -z "$ac_c_werror_flag" ||
14106 test ! -s conftest.err
14107 } && test -s conftest.$ac_objext; then
14108 ac_hi=$ac_mid; break
14109else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014110 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014111sed 's/^/| /' conftest.$ac_ext >&5
14112
14113 ac_lo=`expr $ac_mid + 1`
14114 if test $ac_lo -le $ac_mid; then
14115 ac_lo= ac_hi=
14116 break
14117 fi
14118 ac_mid=`expr 2 '*' $ac_mid + 1`
14119fi
14120
14121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14122 done
14123else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014124 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014125sed 's/^/| /' conftest.$ac_ext >&5
14126
14127 cat >conftest.$ac_ext <<_ACEOF
14128/* confdefs.h. */
14129_ACEOF
14130cat confdefs.h >>conftest.$ac_ext
14131cat >>conftest.$ac_ext <<_ACEOF
14132/* end confdefs.h. */
14133
14134#ifdef HAVE_PTHREAD_H
14135#include <pthread.h>
14136#endif
14137
14138
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014139 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014140int
14141main ()
14142{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014143static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014144test_array [0] = 0
14145
14146 ;
14147 return 0;
14148}
14149_ACEOF
14150rm -f conftest.$ac_objext
14151if { (ac_try="$ac_compile"
14152case "(($ac_try" in
14153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14154 *) ac_try_echo=$ac_try;;
14155esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014157 (eval "$ac_compile") 2>conftest.er1
14158 ac_status=$?
14159 grep -v '^ *+' conftest.er1 >conftest.err
14160 rm -f conftest.er1
14161 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014163 (exit $ac_status); } && {
14164 test -z "$ac_c_werror_flag" ||
14165 test ! -s conftest.err
14166 } && test -s conftest.$ac_objext; then
14167 ac_hi=-1 ac_mid=-1
14168 while :; do
14169 cat >conftest.$ac_ext <<_ACEOF
14170/* confdefs.h. */
14171_ACEOF
14172cat confdefs.h >>conftest.$ac_ext
14173cat >>conftest.$ac_ext <<_ACEOF
14174/* end confdefs.h. */
14175
14176#ifdef HAVE_PTHREAD_H
14177#include <pthread.h>
14178#endif
14179
14180
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014181 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014182int
14183main ()
14184{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014185static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014186test_array [0] = 0
14187
14188 ;
14189 return 0;
14190}
14191_ACEOF
14192rm -f conftest.$ac_objext
14193if { (ac_try="$ac_compile"
14194case "(($ac_try" in
14195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14196 *) ac_try_echo=$ac_try;;
14197esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014199 (eval "$ac_compile") 2>conftest.er1
14200 ac_status=$?
14201 grep -v '^ *+' conftest.er1 >conftest.err
14202 rm -f conftest.er1
14203 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014205 (exit $ac_status); } && {
14206 test -z "$ac_c_werror_flag" ||
14207 test ! -s conftest.err
14208 } && test -s conftest.$ac_objext; then
14209 ac_lo=$ac_mid; break
14210else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014211 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014212sed 's/^/| /' conftest.$ac_ext >&5
14213
14214 ac_hi=`expr '(' $ac_mid ')' - 1`
14215 if test $ac_mid -le $ac_hi; then
14216 ac_lo= ac_hi=
14217 break
14218 fi
14219 ac_mid=`expr 2 '*' $ac_mid`
14220fi
14221
14222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14223 done
14224else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014225 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014226sed 's/^/| /' conftest.$ac_ext >&5
14227
14228 ac_lo= ac_hi=
14229fi
14230
14231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14232fi
14233
14234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14235# Binary search between lo and hi bounds.
14236while test "x$ac_lo" != "x$ac_hi"; do
14237 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14238 cat >conftest.$ac_ext <<_ACEOF
14239/* confdefs.h. */
14240_ACEOF
14241cat confdefs.h >>conftest.$ac_ext
14242cat >>conftest.$ac_ext <<_ACEOF
14243/* end confdefs.h. */
14244
14245#ifdef HAVE_PTHREAD_H
14246#include <pthread.h>
14247#endif
14248
14249
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014250 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014251int
14252main ()
14253{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014254static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014255test_array [0] = 0
14256
14257 ;
14258 return 0;
14259}
14260_ACEOF
14261rm -f conftest.$ac_objext
14262if { (ac_try="$ac_compile"
14263case "(($ac_try" in
14264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14265 *) ac_try_echo=$ac_try;;
14266esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014268 (eval "$ac_compile") 2>conftest.er1
14269 ac_status=$?
14270 grep -v '^ *+' conftest.er1 >conftest.err
14271 rm -f conftest.er1
14272 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014274 (exit $ac_status); } && {
14275 test -z "$ac_c_werror_flag" ||
14276 test ! -s conftest.err
14277 } && test -s conftest.$ac_objext; then
14278 ac_hi=$ac_mid
14279else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014280 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014281sed 's/^/| /' conftest.$ac_ext >&5
14282
14283 ac_lo=`expr '(' $ac_mid ')' + 1`
14284fi
14285
14286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14287done
14288case $ac_lo in
14289?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14290'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014291 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014292See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014293echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014294See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014295 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014296 else
14297 ac_cv_sizeof_pthread_t=0
14298 fi ;;
14299esac
14300else
14301 cat >conftest.$ac_ext <<_ACEOF
14302/* confdefs.h. */
14303_ACEOF
14304cat confdefs.h >>conftest.$ac_ext
14305cat >>conftest.$ac_ext <<_ACEOF
14306/* end confdefs.h. */
14307
14308#ifdef HAVE_PTHREAD_H
14309#include <pthread.h>
14310#endif
14311
14312
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014313 typedef pthread_t ac__type_sizeof_;
14314static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14315static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014316#include <stdio.h>
14317#include <stdlib.h>
14318int
14319main ()
14320{
14321
14322 FILE *f = fopen ("conftest.val", "w");
14323 if (! f)
14324 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014325 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014326 {
14327 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014328 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014329 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014330 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014331 }
14332 else
14333 {
14334 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014335 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014336 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014337 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014338 }
14339 return ferror (f) || fclose (f) != 0;
14340
14341 ;
14342 return 0;
14343}
Martin v. Löwis11437992002-04-12 09:54:03 +000014344_ACEOF
14345rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014346if { (ac_try="$ac_link"
14347case "(($ac_try" in
14348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14349 *) ac_try_echo=$ac_try;;
14350esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014352 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014353 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014355 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014356 { (case "(($ac_try" in
14357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14358 *) ac_try_echo=$ac_try;;
14359esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014361 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014362 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014364 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014365 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014366else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014367 echo "$as_me: program exited with status $ac_status" >&5
14368echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014369sed 's/^/| /' conftest.$ac_ext >&5
14370
Martin v. Löwis11437992002-04-12 09:54:03 +000014371( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014372if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014373 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014374See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014375echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014376See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014377 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014378 else
14379 ac_cv_sizeof_pthread_t=0
14380 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014382rm -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 +000014383fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014384rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014385fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014386{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14387echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014388
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014389
14390
Martin v. Löwis11437992002-04-12 09:54:03 +000014391cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014392#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014393_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014394
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014395
Trent Mick635f6fb2000-08-23 21:33:05 +000014396fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014397CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014398
Michael W. Hudson54241132001-12-07 15:38:26 +000014399
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014400case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014401 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014402 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14403 ;;
14404 Darwin/*)
14405 OTHER_LIBTOOL_OPT=""
14406 ;;
14407esac
14408
14409
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014410ARCH_RUN_32BIT=""
14411
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014412case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014413 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014414 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14415 if test "${enable_universalsdk}"; then
14416 :
14417 else
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014418 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014419 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014420 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014421 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014422 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000014423 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014424 if test ${gcc_version} '<' 4.0
14425 then
14426 LIBTOOL_CRUFT="-lcc_dynamic"
14427 else
14428 LIBTOOL_CRUFT=""
14429 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014430 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014431 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014432else
14433 cat >conftest.$ac_ext <<_ACEOF
14434/* confdefs.h. */
14435_ACEOF
14436cat confdefs.h >>conftest.$ac_ext
14437cat >>conftest.$ac_ext <<_ACEOF
14438/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014439
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014440 #include <unistd.h>
14441 int main(int argc, char*argv[])
14442 {
14443 if (sizeof(long) == 4) {
14444 return 0;
14445 } else {
14446 return 1;
14447 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014448 }
14449
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014450_ACEOF
14451rm -f conftest$ac_exeext
14452if { (ac_try="$ac_link"
14453case "(($ac_try" in
14454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14455 *) ac_try_echo=$ac_try;;
14456esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014458 (eval "$ac_link") 2>&5
14459 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014461 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14462 { (case "(($ac_try" in
14463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14464 *) ac_try_echo=$ac_try;;
14465esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014467 (eval "$ac_try") 2>&5
14468 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014470 (exit $ac_status); }; }; then
14471 ac_osx_32bit=yes
14472else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014473 echo "$as_me: program exited with status $ac_status" >&5
14474echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014475sed 's/^/| /' conftest.$ac_ext >&5
14476
14477( exit $ac_status )
14478ac_osx_32bit=no
14479fi
14480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14481fi
14482
14483
14484
14485 if test "${ac_osx_32bit}" = "yes"; then
14486 case `arch` in
14487 i386)
14488 MACOSX_DEFAULT_ARCH="i386"
14489 ;;
14490 ppc)
14491 MACOSX_DEFAULT_ARCH="ppc"
14492 ;;
14493 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014494 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14495echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014496 { (exit 1); exit 1; }; }
14497 ;;
14498 esac
14499 else
14500 case `arch` in
14501 i386)
14502 MACOSX_DEFAULT_ARCH="x86_64"
14503 ;;
14504 ppc)
14505 MACOSX_DEFAULT_ARCH="ppc64"
14506 ;;
14507 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014508 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14509echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014510 { (exit 1); exit 1; }; }
14511 ;;
14512 esac
14513
14514 #ARCH_RUN_32BIT="true"
14515 fi
14516
14517 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014518 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014519 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014520esac
14521
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014522{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14523echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014524if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014525then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014526 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014527 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014528 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014529
Martin v. Löwis11437992002-04-12 09:54:03 +000014530cat >>confdefs.h <<\_ACEOF
14531#define WITH_NEXT_FRAMEWORK 1
14532_ACEOF
14533
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014534 { echo "$as_me:$LINENO: result: yes" >&5
14535echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014536 if test $enable_shared = "yes"
14537 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014538 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14539echo "$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 +000014540 { (exit 1); exit 1; }; }
14541 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014542else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014543 { echo "$as_me:$LINENO: result: no" >&5
14544echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014545fi
14546
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014547{ echo "$as_me:$LINENO: checking for dyld" >&5
14548echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014549case $ac_sys_system/$ac_sys_release in
14550 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014551
Martin v. Löwis11437992002-04-12 09:54:03 +000014552cat >>confdefs.h <<\_ACEOF
14553#define WITH_DYLD 1
14554_ACEOF
14555
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014556 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14557echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014558 ;;
14559 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014560 { echo "$as_me:$LINENO: result: no" >&5
14561echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014562 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014563esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014564
Guido van Rossum0a516c91994-09-12 10:58:40 +000014565# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014566
Michael W. Hudson54241132001-12-07 15:38:26 +000014567
14568
14569
14570
Guido van Rossum0a516c91994-09-12 10:58:40 +000014571# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014572# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014573{ echo "$as_me:$LINENO: checking SO" >&5
14574echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014575if test -z "$SO"
14576then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014577 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014578 hp*|HP*)
14579 case `uname -m` in
14580 ia64) SO=.so;;
14581 *) SO=.sl;;
14582 esac
14583 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014584 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014585 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014586 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014587else
14588 # this might also be a termcap variable, see #610332
14589 echo
14590 echo '====================================================================='
14591 echo '+ +'
14592 echo '+ WARNING: You have set SO in your environment. +'
14593 echo '+ Do you really mean to change the extension for shared libraries? +'
14594 echo '+ Continuing in 10 seconds to let you to ponder. +'
14595 echo '+ +'
14596 echo '====================================================================='
14597 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014598fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014599{ echo "$as_me:$LINENO: result: $SO" >&5
14600echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014601
Georg Brandlb1441c72009-01-03 22:33:39 +000014602
Thomas Wouters477c8d52006-05-27 19:21:47 +000014603cat >>confdefs.h <<_ACEOF
14604#define SHLIB_EXT "$SO"
14605_ACEOF
14606
Guido van Rossum0a516c91994-09-12 10:58:40 +000014607# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014608# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014609# (Shared libraries in this instance are shared modules to be loaded into
14610# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014611{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14612echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014613if test -z "$LDSHARED"
14614then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014615 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014616 AIX*)
14617 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014618 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014619 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014620 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014621 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014622 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014623 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014624 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014625 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014626 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014627 hp*|HP*)
14628 if test "$GCC" = "yes"
14629 then LDSHARED='$(CC) -shared'
14630 else LDSHARED='ld -b';
14631 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014632 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014633 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014634 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14635 if test "$enable_framework" ; then
14636 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014637 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14638 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014639 else
14640 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014641 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014642 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014643 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014644 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14645 if test "$enable_framework" ; then
14646 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014647 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14648 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014649 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014650 # No framework, use the Python app as bundle-loader
14651 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014652 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014653 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014654 Darwin/*)
14655 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14656 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014657
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014658 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014659 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014660 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014661 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014662 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014663 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14664 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014665 else
14666 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14667 if test "$enable_framework" ; then
14668 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014669 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14670 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014671 else
14672 # No framework, use the Python app as bundle-loader
14673 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14674 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14675 fi
14676 fi
14677 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014678 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014679 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014680 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014681 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014682 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014683 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014684 else
14685 LDSHARED="ld -Bshareable ${LDFLAGS}"
14686 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014687 OpenBSD*)
14688 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14689 then
14690 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14691 else
14692 case `uname -r` in
14693 [01].* | 2.[0-7] | 2.[0-7].*)
14694 LDSHARED="ld -Bshareable ${LDFLAGS}"
14695 ;;
14696 *)
14697 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14698 ;;
14699 esac
14700 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014701 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014702 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014703 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014704 then LDSHARED='$(CC) -shared'
14705 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014706 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014707 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014708 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014709 *) LDSHARED="ld";;
14710 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014711fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014712{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14713echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014714BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014715# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014716# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014717{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14718echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014719if test -z "$CCSHARED"
14720then
Guido van Rossum07397971997-04-29 21:49:50 +000014721 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014722 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014723 then CCSHARED="-fPIC";
14724 elif test `uname -p` = sparc;
14725 then CCSHARED="-xcode=pic32";
14726 else CCSHARED="-Kpic";
14727 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014728 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014729 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014730 else CCSHARED="+z";
14731 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014732 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014733 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014734 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014735 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014736 if test "$GCC" = "yes"
14737 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014738 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014739 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014740 SCO_SV*)
14741 if test "$GCC" = "yes"
14742 then CCSHARED="-fPIC"
14743 else CCSHARED="-Kpic -belf"
14744 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014745 IRIX*/6*) case $CC in
14746 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014747 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014748 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014749 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014750fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014751{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14752echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014753# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014754# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014755{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14756echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014757if test -z "$LINKFORSHARED"
14758then
Guido van Rossum07397971997-04-29 21:49:50 +000014759 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014760 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014761 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014762 LINKFORSHARED="-Wl,-E -Wl,+s";;
14763# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014764 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014765 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014766 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014767 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014768 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014769 if test "$enable_framework"
14770 then
Jack Jansenda49e192005-01-07 13:08:22 +000014771 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014772 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014773 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014774 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014775 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014776 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014777 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014778 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14779 then
14780 LINKFORSHARED="-Wl,--export-dynamic"
14781 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014782 SunOS/5*) case $CC in
14783 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014784 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014785 then
14786 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014787 fi;;
14788 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014789 CYGWIN*)
14790 if test $enable_shared = "no"
14791 then
14792 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14793 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014794 QNX*)
14795 # -Wl,-E causes the symbols to be added to the dynamic
14796 # symbol table so that they can be found when a module
14797 # is loaded. -N 2048K causes the stack size to be set
14798 # to 2048 kilobytes so that the stack doesn't overflow
14799 # when running test_compile.py.
14800 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014801 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014802fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014803{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14804echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014805
Michael W. Hudson54241132001-12-07 15:38:26 +000014806
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014807
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014808{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14809echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014810if test ! "$LIBRARY" = "$LDLIBRARY"
14811then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014812 case $ac_sys_system in
14813 CYGWIN*)
14814 # Cygwin needs CCSHARED when building extension DLLs
14815 # but not when building the interpreter DLL.
14816 CFLAGSFORSHARED='';;
14817 *)
14818 CFLAGSFORSHARED='$(CCSHARED)'
14819 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014820fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014821{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14822echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014823
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014824# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14825# library (with --enable-shared).
14826# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014827# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14828# if it is not required, since it creates a dependency of the shared library
14829# to LIBS. This, in turn, means that applications linking the shared libpython
14830# don't need to link LIBS explicitly. The default should be only changed
14831# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014832
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014833{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14834echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014835case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014836 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014837 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014838esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014839{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14840echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014841
14842
Guido van Rossum627b2d71993-12-24 10:39:16 +000014843# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014844
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014845{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14846echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014847if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014848 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014849else
Martin v. Löwis11437992002-04-12 09:54:03 +000014850 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014851LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014852cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014853/* confdefs.h. */
14854_ACEOF
14855cat confdefs.h >>conftest.$ac_ext
14856cat >>conftest.$ac_ext <<_ACEOF
14857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014859/* Override any GCC internal prototype to avoid an error.
14860 Use char because int might match the return type of a GCC
14861 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014862#ifdef __cplusplus
14863extern "C"
14864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014865char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014866int
14867main ()
14868{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014869return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014870 ;
14871 return 0;
14872}
14873_ACEOF
14874rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014875if { (ac_try="$ac_link"
14876case "(($ac_try" in
14877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14878 *) ac_try_echo=$ac_try;;
14879esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014881 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014882 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014883 grep -v '^ *+' conftest.er1 >conftest.err
14884 rm -f conftest.er1
14885 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014887 (exit $ac_status); } && {
14888 test -z "$ac_c_werror_flag" ||
14889 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014890 } && test -s conftest$ac_exeext &&
14891 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014892 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014893else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014895sed 's/^/| /' conftest.$ac_ext >&5
14896
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014897 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014899
14900rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014901 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014902LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014903fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014904{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14905echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14906if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014907 cat >>confdefs.h <<_ACEOF
14908#define HAVE_LIBDL 1
14909_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014910
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014911 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014912
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014913fi
14914 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014915
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014916{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14917echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014918if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014919 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014920else
Martin v. Löwis11437992002-04-12 09:54:03 +000014921 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014922LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014923cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014924/* confdefs.h. */
14925_ACEOF
14926cat confdefs.h >>conftest.$ac_ext
14927cat >>conftest.$ac_ext <<_ACEOF
14928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930/* Override any GCC internal prototype to avoid an error.
14931 Use char because int might match the return type of a GCC
14932 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014933#ifdef __cplusplus
14934extern "C"
14935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014936char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014937int
14938main ()
14939{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014941 ;
14942 return 0;
14943}
14944_ACEOF
14945rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014946if { (ac_try="$ac_link"
14947case "(($ac_try" in
14948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14949 *) ac_try_echo=$ac_try;;
14950esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014952 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014954 grep -v '^ *+' conftest.er1 >conftest.err
14955 rm -f conftest.er1
14956 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014958 (exit $ac_status); } && {
14959 test -z "$ac_c_werror_flag" ||
14960 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014961 } && test -s conftest$ac_exeext &&
14962 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014963 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014964else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014966sed 's/^/| /' conftest.$ac_ext >&5
14967
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014968 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014970
14971rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014972 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014973LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014974fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014975{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14976echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
14977if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014978 cat >>confdefs.h <<_ACEOF
14979#define HAVE_LIBDLD 1
14980_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014981
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014982 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014983
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014984fi
14985 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014986
Georg Brandlb1441c72009-01-03 22:33:39 +000014987# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014988if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014989 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14990echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014991if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014992 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014993else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014994 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014995cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014996/* confdefs.h. */
14997_ACEOF
14998cat confdefs.h >>conftest.$ac_ext
14999cat >>conftest.$ac_ext <<_ACEOF
15000/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002/* Override any GCC internal prototype to avoid an error.
15003 Use char because int might match the return type of a GCC
15004 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015005#ifdef __cplusplus
15006extern "C"
15007#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015008char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015009int
15010main ()
15011{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015012return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015013 ;
15014 return 0;
15015}
15016_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017for ac_lib in '' pthread rt posix4; do
15018 if test -z "$ac_lib"; then
15019 ac_res="none required"
15020 else
15021 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015022 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015023 fi
15024 rm -f conftest.$ac_objext conftest$ac_exeext
15025if { (ac_try="$ac_link"
15026case "(($ac_try" in
15027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15028 *) ac_try_echo=$ac_try;;
15029esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015031 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015032 ac_status=$?
15033 grep -v '^ *+' conftest.er1 >conftest.err
15034 rm -f conftest.er1
15035 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015037 (exit $ac_status); } && {
15038 test -z "$ac_c_werror_flag" ||
15039 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015040 } && test -s conftest$ac_exeext &&
15041 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015042 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015043else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015044 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015045sed 's/^/| /' conftest.$ac_ext >&5
15046
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015047
Thomas Wouters477c8d52006-05-27 19:21:47 +000015048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015049
15050rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15051 conftest$ac_exeext
15052 if test "${ac_cv_search_sem_init+set}" = set; then
15053 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015055done
15056if test "${ac_cv_search_sem_init+set}" = set; then
15057 :
15058else
15059 ac_cv_search_sem_init=no
15060fi
15061rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015062LIBS=$ac_func_search_save_LIBS
15063fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015064{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15065echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015066ac_res=$ac_cv_search_sem_init
15067if test "$ac_res" != no; then
15068 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015069
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015070fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015071 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015072 # posix4 on Solaris 2.6
15073 # pthread (first!) on Linux
15074fi
15075
Martin v. Löwis19d17342003-06-14 21:03:05 +000015076# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015077{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15078echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015079if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015080 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015081else
15082 ac_check_lib_save_LIBS=$LIBS
15083LIBS="-lintl $LIBS"
15084cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015085/* confdefs.h. */
15086_ACEOF
15087cat confdefs.h >>conftest.$ac_ext
15088cat >>conftest.$ac_ext <<_ACEOF
15089/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015091/* Override any GCC internal prototype to avoid an error.
15092 Use char because int might match the return type of a GCC
15093 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015094#ifdef __cplusplus
15095extern "C"
15096#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015097char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015098int
15099main ()
15100{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015101return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015102 ;
15103 return 0;
15104}
15105_ACEOF
15106rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015107if { (ac_try="$ac_link"
15108case "(($ac_try" in
15109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15110 *) ac_try_echo=$ac_try;;
15111esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015115 grep -v '^ *+' conftest.er1 >conftest.err
15116 rm -f conftest.er1
15117 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015119 (exit $ac_status); } && {
15120 test -z "$ac_c_werror_flag" ||
15121 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015122 } && test -s conftest$ac_exeext &&
15123 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015124 ac_cv_lib_intl_textdomain=yes
15125else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015127sed 's/^/| /' conftest.$ac_ext >&5
15128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015129 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015131
15132rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015133 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015134LIBS=$ac_check_lib_save_LIBS
15135fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015136{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15137echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15138if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015139
15140cat >>confdefs.h <<\_ACEOF
15141#define WITH_LIBINTL 1
15142_ACEOF
15143
Brett Cannonc6d936e2009-06-07 20:09:53 +000015144 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015145fi
15146
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015147
15148# checks for system dependent C++ extensions support
15149case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015150 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15151echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015152 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015153/* confdefs.h. */
15154_ACEOF
15155cat confdefs.h >>conftest.$ac_ext
15156cat >>conftest.$ac_ext <<_ACEOF
15157/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015158#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015159int
15160main ()
15161{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015162loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015163 ;
15164 return 0;
15165}
15166_ACEOF
15167rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015168if { (ac_try="$ac_link"
15169case "(($ac_try" in
15170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15171 *) ac_try_echo=$ac_try;;
15172esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015176 grep -v '^ *+' conftest.er1 >conftest.err
15177 rm -f conftest.er1
15178 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015180 (exit $ac_status); } && {
15181 test -z "$ac_c_werror_flag" ||
15182 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015183 } && test -s conftest$ac_exeext &&
15184 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015185
Martin v. Löwis11437992002-04-12 09:54:03 +000015186cat >>confdefs.h <<\_ACEOF
15187#define AIX_GENUINE_CPLUSPLUS 1
15188_ACEOF
15189
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015190 { echo "$as_me:$LINENO: result: yes" >&5
15191echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015192else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015193 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015194sed 's/^/| /' conftest.$ac_ext >&5
15195
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015196 { echo "$as_me:$LINENO: result: no" >&5
15197echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015199
15200rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015201 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015202 *) ;;
15203esac
15204
Guido van Rossum70c7f481998-03-26 18:44:10 +000015205# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015206{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15207echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015208if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015209 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015210else
Martin v. Löwis11437992002-04-12 09:54:03 +000015211 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015212LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015213cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015214/* confdefs.h. */
15215_ACEOF
15216cat confdefs.h >>conftest.$ac_ext
15217cat >>conftest.$ac_ext <<_ACEOF
15218/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015220/* Override any GCC internal prototype to avoid an error.
15221 Use char because int might match the return type of a GCC
15222 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015223#ifdef __cplusplus
15224extern "C"
15225#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015226char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015227int
15228main ()
15229{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015230return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015231 ;
15232 return 0;
15233}
15234_ACEOF
15235rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015236if { (ac_try="$ac_link"
15237case "(($ac_try" in
15238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15239 *) ac_try_echo=$ac_try;;
15240esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015242 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015244 grep -v '^ *+' conftest.er1 >conftest.err
15245 rm -f conftest.er1
15246 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015248 (exit $ac_status); } && {
15249 test -z "$ac_c_werror_flag" ||
15250 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015251 } && test -s conftest$ac_exeext &&
15252 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015253 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015254else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015255 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015256sed 's/^/| /' conftest.$ac_ext >&5
15257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015258 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015260
15261rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015262 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015263LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015264fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015265{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15266echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15267if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015268 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015269fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015270 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015271{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15272echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015273if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015274 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015275else
Martin v. Löwis11437992002-04-12 09:54:03 +000015276 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015277LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015278cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015279/* confdefs.h. */
15280_ACEOF
15281cat confdefs.h >>conftest.$ac_ext
15282cat >>conftest.$ac_ext <<_ACEOF
15283/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015284
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015285/* Override any GCC internal prototype to avoid an error.
15286 Use char because int might match the return type of a GCC
15287 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015288#ifdef __cplusplus
15289extern "C"
15290#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015291char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015292int
15293main ()
15294{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015295return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015296 ;
15297 return 0;
15298}
15299_ACEOF
15300rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015301if { (ac_try="$ac_link"
15302case "(($ac_try" in
15303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15304 *) ac_try_echo=$ac_try;;
15305esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015307 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015308 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015309 grep -v '^ *+' conftest.er1 >conftest.err
15310 rm -f conftest.er1
15311 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015313 (exit $ac_status); } && {
15314 test -z "$ac_c_werror_flag" ||
15315 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015316 } && test -s conftest$ac_exeext &&
15317 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015318 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015319else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015320 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015321sed 's/^/| /' conftest.$ac_ext >&5
15322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015323 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015325
15326rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015327 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015328LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015329fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015330{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15331echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15332if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015333 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015334fi
15335 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015336
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015337{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15338echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015340# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015341if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015342 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015343{ echo "$as_me:$LINENO: result: $withval" >&5
15344echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015345LIBS="$withval $LIBS"
15346
15347else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015348 { echo "$as_me:$LINENO: result: no" >&5
15349echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015350fi
15351
Guido van Rossum7f43da71994-08-01 12:15:30 +000015352
Benjamin Petersonb2d90462009-12-31 03:23:10 +000015353# Check for use of the system expat library
15354{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15355echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15356
15357# Check whether --with-system_expat was given.
15358if test "${with_system_expat+set}" = set; then
15359 withval=$with_system_expat;
15360fi
15361
15362
15363{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15364echo "${ECHO_T}$with_system_expat" >&6; }
15365
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015366# Check for use of the system libffi library
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015367{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15368echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015370# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015371if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015372 withval=$with_system_ffi;
15373fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015374
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015375
Benjamin Petersond78735d2010-01-01 16:04:23 +000015376if test "$with_system_ffi" = "yes"; then
15377 if test -n "$ac_tool_prefix"; then
15378 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15379set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15380{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15381echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15382if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15383 echo $ECHO_N "(cached) $ECHO_C" >&6
15384else
15385 case $PKG_CONFIG in
15386 [\\/]* | ?:[\\/]*)
15387 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15388 ;;
15389 *)
15390 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15391for as_dir in $PATH
15392do
15393 IFS=$as_save_IFS
15394 test -z "$as_dir" && as_dir=.
15395 for ac_exec_ext in '' $ac_executable_extensions; do
15396 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15397 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15398 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15399 break 2
15400 fi
15401done
15402done
15403IFS=$as_save_IFS
15404
15405 ;;
15406esac
15407fi
15408PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15409if test -n "$PKG_CONFIG"; then
15410 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15411echo "${ECHO_T}$PKG_CONFIG" >&6; }
15412else
15413 { echo "$as_me:$LINENO: result: no" >&5
15414echo "${ECHO_T}no" >&6; }
15415fi
15416
15417
15418fi
15419if test -z "$ac_cv_path_PKG_CONFIG"; then
15420 ac_pt_PKG_CONFIG=$PKG_CONFIG
15421 # Extract the first word of "pkg-config", so it can be a program name with args.
15422set dummy pkg-config; ac_word=$2
15423{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15424echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15425if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15426 echo $ECHO_N "(cached) $ECHO_C" >&6
15427else
15428 case $ac_pt_PKG_CONFIG in
15429 [\\/]* | ?:[\\/]*)
15430 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15431 ;;
15432 *)
15433 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15434for as_dir in $PATH
15435do
15436 IFS=$as_save_IFS
15437 test -z "$as_dir" && as_dir=.
15438 for ac_exec_ext in '' $ac_executable_extensions; do
15439 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15440 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15441 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15442 break 2
15443 fi
15444done
15445done
15446IFS=$as_save_IFS
15447
15448 ;;
15449esac
15450fi
15451ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15452if test -n "$ac_pt_PKG_CONFIG"; then
15453 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15454echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15455else
15456 { echo "$as_me:$LINENO: result: no" >&5
15457echo "${ECHO_T}no" >&6; }
15458fi
15459
15460 if test "x$ac_pt_PKG_CONFIG" = x; then
15461 PKG_CONFIG=""
15462 else
15463 case $cross_compiling:$ac_tool_warned in
15464yes:)
15465{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15466whose name does not start with the host triplet. If you think this
15467configuration is useful to you, please write to autoconf@gnu.org." >&5
15468echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15469whose name does not start with the host triplet. If you think this
15470configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15471ac_tool_warned=yes ;;
15472esac
15473 PKG_CONFIG=$ac_pt_PKG_CONFIG
15474 fi
15475else
15476 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15477fi
15478
15479 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15480else
15481 LIBFFI_INCLUDEDIR=""
15482fi
15483
15484
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015485{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15486echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015487
Matthias Klose55708cc2009-04-30 08:06:49 +000015488# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015489{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15490echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015491
15492# Check whether --with-dbmliborder was given.
15493if test "${with_dbmliborder+set}" = set; then
15494 withval=$with_dbmliborder;
15495if test x$with_dbmliborder = xyes
15496then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015497{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15498echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015499 { (exit 1); exit 1; }; }
15500else
15501 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15502 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15503 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015504 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15505echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015506 { (exit 1); exit 1; }; }
15507 fi
15508 done
15509fi
15510fi
15511
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015512{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15513echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015514
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015515# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015516
15517
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015518{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15519echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015520
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015521# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015522if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015523 withval=$with_signal_module;
15524fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015525
15526
15527if test -z "$with_signal_module"
15528then with_signal_module="yes"
15529fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015530{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15531echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015532
15533if test "${with_signal_module}" = "yes"; then
15534 USE_SIGNAL_MODULE=""
15535 SIGNAL_OBJS=""
15536else
15537 USE_SIGNAL_MODULE="#"
15538 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15539fi
15540
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015541# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015542
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015543USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015544
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015545{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15546echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015547
Guido van Rossumec2f0731997-01-22 20:54:01 +000015548
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015549# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015550if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015551 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015552{ echo "$as_me:$LINENO: result: $withval" >&5
15553echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015554LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015555if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015556 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015557fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015558else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015559 { echo "$as_me:$LINENO: result: no" >&5
15560echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015561fi
15562
Martin v. Löwis11437992002-04-12 09:54:03 +000015563
15564# Templates for things AC_DEFINEd more than once.
15565# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015566
15567
Martin v. Löwis11437992002-04-12 09:54:03 +000015568
15569
15570
15571
15572
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015573{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15574echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015575
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015576# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015577if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015578 withval=$with_threads;
15579fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015580
15581
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015582# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015584# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015585if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015586 withval=$with_thread; with_threads=$with_thread
15587fi
15588
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015589
15590if test -z "$with_threads"
15591then with_threads="yes"
15592fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015593{ echo "$as_me:$LINENO: result: $with_threads" >&5
15594echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015595
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015596
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015597if test "$with_threads" = "no"
15598then
15599 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015600elif test "$ac_cv_pthread_is_default" = yes
15601then
Martin v. Löwis11437992002-04-12 09:54:03 +000015602 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015603#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015604_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015605
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015606 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015607 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015608#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015609_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015610
15611 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015612 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015613elif test "$ac_cv_kpthread" = "yes"
15614then
15615 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015616 if test "$ac_cv_cxx_thread" = "yes"; then
15617 CXX="$CXX -Kpthread"
15618 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015619 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015620#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015621_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015622
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015623 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015624 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015625elif test "$ac_cv_kthread" = "yes"
15626then
15627 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015628 if test "$ac_cv_cxx_thread" = "yes"; then
15629 CXX="$CXX -Kthread"
15630 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015631 cat >>confdefs.h <<\_ACEOF
15632#define WITH_THREAD 1
15633_ACEOF
15634
15635 posix_threads=yes
15636 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015637elif test "$ac_cv_pthread" = "yes"
15638then
15639 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015640 if test "$ac_cv_cxx_thread" = "yes"; then
15641 CXX="$CXX -pthread"
15642 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015643 cat >>confdefs.h <<\_ACEOF
15644#define WITH_THREAD 1
15645_ACEOF
15646
15647 posix_threads=yes
15648 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015649else
15650 if test ! -z "$with_threads" -a -d "$with_threads"
15651 then LDFLAGS="$LDFLAGS -L$with_threads"
15652 fi
15653 if test ! -z "$withval" -a -d "$withval"
15654 then LDFLAGS="$LDFLAGS -L$withval"
15655 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015656
15657 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015658 # define _POSIX_THREADS in unistd.h. Some apparently don't
15659 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015660 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15661echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015662 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015663/* confdefs.h. */
15664_ACEOF
15665cat confdefs.h >>conftest.$ac_ext
15666cat >>conftest.$ac_ext <<_ACEOF
15667/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015668
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015669#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015670#ifdef _POSIX_THREADS
15671yes
15672#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015673
15674_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015675if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015676 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015677 unistd_defines_pthreads=yes
15678else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015679 unistd_defines_pthreads=no
15680fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000015681rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015682
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015683 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15684echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015685
Martin v. Löwis11437992002-04-12 09:54:03 +000015686 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015687#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015688_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015689
Martin v. Löwis11437992002-04-12 09:54:03 +000015690 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015691 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15692echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015693if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015694 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015695fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015696{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15697echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015698else
Martin v. Löwis11437992002-04-12 09:54:03 +000015699 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015700{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15701echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015702cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015703/* confdefs.h. */
15704_ACEOF
15705cat confdefs.h >>conftest.$ac_ext
15706cat >>conftest.$ac_ext <<_ACEOF
15707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015708$ac_includes_default
15709#include <cthreads.h>
15710_ACEOF
15711rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015712if { (ac_try="$ac_compile"
15713case "(($ac_try" in
15714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15715 *) ac_try_echo=$ac_try;;
15716esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015718 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015720 grep -v '^ *+' conftest.er1 >conftest.err
15721 rm -f conftest.er1
15722 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015724 (exit $ac_status); } && {
15725 test -z "$ac_c_werror_flag" ||
15726 test ! -s conftest.err
15727 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015728 ac_header_compiler=yes
15729else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015731sed 's/^/| /' conftest.$ac_ext >&5
15732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015733 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015735
15736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015737{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15738echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015739
15740# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015741{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15742echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015743cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015744/* confdefs.h. */
15745_ACEOF
15746cat confdefs.h >>conftest.$ac_ext
15747cat >>conftest.$ac_ext <<_ACEOF
15748/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015749#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015750_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015751if { (ac_try="$ac_cpp conftest.$ac_ext"
15752case "(($ac_try" in
15753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15754 *) ac_try_echo=$ac_try;;
15755esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015757 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015758 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015759 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015760 rm -f conftest.er1
15761 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015763 (exit $ac_status); } >/dev/null && {
15764 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15765 test ! -s conftest.err
15766 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015767 ac_header_preproc=yes
15768else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015769 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015770sed 's/^/| /' conftest.$ac_ext >&5
15771
Martin v. Löwis11437992002-04-12 09:54:03 +000015772 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015774
Martin v. Löwis11437992002-04-12 09:54:03 +000015775rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015776{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15777echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015778
15779# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015780case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15781 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015782 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15783echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15784 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15785echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015786 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015787 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015788 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015789 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15790echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15791 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15792echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15793 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15794echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15795 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15796echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15797 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15798echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15799 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15800echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015801 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015802## -------------------------------------- ##
15803## Report this to http://bugs.python.org/ ##
15804## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015805_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015806 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015807 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015808esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015809{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15810echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015811if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015812 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015813else
15814 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015815fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015816{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15817echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015818
15819fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015820if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015821 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015822#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015823_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015824
Martin v. Löwis11437992002-04-12 09:54:03 +000015825 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015826#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015827_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015828
Martin v. Löwis11437992002-04-12 09:54:03 +000015829
15830cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015831#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015832_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015833
15834 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015835 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015836else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015837
Martin v. Löwis11437992002-04-12 09:54:03 +000015838 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015839 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15840echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015841if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015842 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015843fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015844{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15845echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015846else
Martin v. Löwis11437992002-04-12 09:54:03 +000015847 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015848{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15849echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015850cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015851/* confdefs.h. */
15852_ACEOF
15853cat confdefs.h >>conftest.$ac_ext
15854cat >>conftest.$ac_ext <<_ACEOF
15855/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015856$ac_includes_default
15857#include <mach/cthreads.h>
15858_ACEOF
15859rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015860if { (ac_try="$ac_compile"
15861case "(($ac_try" in
15862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15863 *) ac_try_echo=$ac_try;;
15864esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015866 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015867 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015868 grep -v '^ *+' conftest.er1 >conftest.err
15869 rm -f conftest.er1
15870 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015872 (exit $ac_status); } && {
15873 test -z "$ac_c_werror_flag" ||
15874 test ! -s conftest.err
15875 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015876 ac_header_compiler=yes
15877else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015879sed 's/^/| /' conftest.$ac_ext >&5
15880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015881 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015883
15884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015885{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15886echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015887
15888# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015889{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15890echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015891cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015892/* confdefs.h. */
15893_ACEOF
15894cat confdefs.h >>conftest.$ac_ext
15895cat >>conftest.$ac_ext <<_ACEOF
15896/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015897#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015898_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015899if { (ac_try="$ac_cpp conftest.$ac_ext"
15900case "(($ac_try" in
15901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15902 *) ac_try_echo=$ac_try;;
15903esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015905 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015906 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015907 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015908 rm -f conftest.er1
15909 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015911 (exit $ac_status); } >/dev/null && {
15912 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15913 test ! -s conftest.err
15914 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015915 ac_header_preproc=yes
15916else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015918sed 's/^/| /' conftest.$ac_ext >&5
15919
Martin v. Löwis11437992002-04-12 09:54:03 +000015920 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015922
Martin v. Löwis11437992002-04-12 09:54:03 +000015923rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015924{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15925echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015926
15927# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015928case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15929 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015930 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15931echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15932 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15933echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015934 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015935 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015936 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015937 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15938echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15939 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15940echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15941 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15942echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15943 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15944echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15945 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15946echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15947 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15948echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015949 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015950## -------------------------------------- ##
15951## Report this to http://bugs.python.org/ ##
15952## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015953_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015954 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015955 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015956esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015957{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15958echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015959if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015960 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015961else
15962 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015963fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015964{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15965echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015966
15967fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015968if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015969 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015970#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015971_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015972
Martin v. Löwis11437992002-04-12 09:54:03 +000015973 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015974#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015975_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015976
Martin v. Löwis11437992002-04-12 09:54:03 +000015977
15978cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015979#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015980_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015981
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015982 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015983else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015984
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015985 # Just looking for pthread_create in libpthread is not enough:
15986 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15987 # So we really have to include pthread.h, and then link.
15988 _libs=$LIBS
15989 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015990 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15991echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015993/* confdefs.h. */
15994_ACEOF
15995cat confdefs.h >>conftest.$ac_ext
15996cat >>conftest.$ac_ext <<_ACEOF
15997/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015998#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015999
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016000void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016001int
16002main ()
16003{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016004
16005pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016006 ;
16007 return 0;
16008}
16009_ACEOF
16010rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016011if { (ac_try="$ac_link"
16012case "(($ac_try" in
16013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16014 *) ac_try_echo=$ac_try;;
16015esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016017 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016019 grep -v '^ *+' conftest.er1 >conftest.err
16020 rm -f conftest.er1
16021 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016023 (exit $ac_status); } && {
16024 test -z "$ac_c_werror_flag" ||
16025 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016026 } && test -s conftest$ac_exeext &&
16027 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016028
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016029 { echo "$as_me:$LINENO: result: yes" >&5
16030echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016031 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016032#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016033_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016034
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016035 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016036 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016037else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016039sed 's/^/| /' conftest.$ac_ext >&5
16040
Martin v. Löwis11437992002-04-12 09:54:03 +000016041
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016042 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016043 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16044echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016045if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016046 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016047else
Martin v. Löwis11437992002-04-12 09:54:03 +000016048 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016049/* confdefs.h. */
16050_ACEOF
16051cat confdefs.h >>conftest.$ac_ext
16052cat >>conftest.$ac_ext <<_ACEOF
16053/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016054/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16055 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16056#define pthread_detach innocuous_pthread_detach
16057
Guido van Rossumad678af1998-10-02 14:42:15 +000016058/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016059 which can conflict with char pthread_detach (); below.
16060 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016061 <limits.h> exists even on freestanding compilers. */
16062
16063#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016064# include <limits.h>
16065#else
16066# include <assert.h>
16067#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016068
16069#undef pthread_detach
16070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016071/* Override any GCC internal prototype to avoid an error.
16072 Use char because int might match the return type of a GCC
16073 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016074#ifdef __cplusplus
16075extern "C"
16076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016077char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016078/* The GNU C library defines this for functions which it implements
16079 to always fail with ENOSYS. Some functions are actually named
16080 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016081#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016082choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016083#endif
16084
Skip Montanaro6dead952003-09-25 14:50:04 +000016085int
16086main ()
16087{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016088return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016089 ;
16090 return 0;
16091}
16092_ACEOF
16093rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016094if { (ac_try="$ac_link"
16095case "(($ac_try" in
16096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16097 *) ac_try_echo=$ac_try;;
16098esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016100 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016101 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016102 grep -v '^ *+' conftest.er1 >conftest.err
16103 rm -f conftest.er1
16104 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016106 (exit $ac_status); } && {
16107 test -z "$ac_c_werror_flag" ||
16108 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016109 } && test -s conftest$ac_exeext &&
16110 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016111 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016112else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016114sed 's/^/| /' conftest.$ac_ext >&5
16115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016116 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016118
16119rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016120 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016121fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016122{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16123echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16124if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016125 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016126#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016127_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016128
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016129 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016130 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016131else
Guido van Rossumad678af1998-10-02 14:42:15 +000016132
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016133 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16134echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016135if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016136 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016137else
Martin v. Löwis11437992002-04-12 09:54:03 +000016138 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016139LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016140cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016141/* confdefs.h. */
16142_ACEOF
16143cat confdefs.h >>conftest.$ac_ext
16144cat >>conftest.$ac_ext <<_ACEOF
16145/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016146
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016147/* Override any GCC internal prototype to avoid an error.
16148 Use char because int might match the return type of a GCC
16149 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016150#ifdef __cplusplus
16151extern "C"
16152#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016153char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016154int
16155main ()
16156{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016157return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016158 ;
16159 return 0;
16160}
16161_ACEOF
16162rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016163if { (ac_try="$ac_link"
16164case "(($ac_try" in
16165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16166 *) ac_try_echo=$ac_try;;
16167esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016169 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016171 grep -v '^ *+' conftest.er1 >conftest.err
16172 rm -f conftest.er1
16173 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016175 (exit $ac_status); } && {
16176 test -z "$ac_c_werror_flag" ||
16177 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016178 } && test -s conftest$ac_exeext &&
16179 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016180 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016181else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016183sed 's/^/| /' conftest.$ac_ext >&5
16184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016185 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016187
16188rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016189 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016190LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016191fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016192{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16193echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16194if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016195 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016196#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016197_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016198
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016199 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016200 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016201 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016202else
Greg Steinadf63d62000-07-05 10:38:09 +000016203
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016204 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16205echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016206if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016207 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016208else
Martin v. Löwis11437992002-04-12 09:54:03 +000016209 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016210LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016211cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016212/* confdefs.h. */
16213_ACEOF
16214cat confdefs.h >>conftest.$ac_ext
16215cat >>conftest.$ac_ext <<_ACEOF
16216/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016218/* Override any GCC internal prototype to avoid an error.
16219 Use char because int might match the return type of a GCC
16220 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016221#ifdef __cplusplus
16222extern "C"
16223#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016224char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016225int
16226main ()
16227{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016228return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016229 ;
16230 return 0;
16231}
16232_ACEOF
16233rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016234if { (ac_try="$ac_link"
16235case "(($ac_try" in
16236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16237 *) ac_try_echo=$ac_try;;
16238esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016240 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016241 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016242 grep -v '^ *+' conftest.er1 >conftest.err
16243 rm -f conftest.er1
16244 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016246 (exit $ac_status); } && {
16247 test -z "$ac_c_werror_flag" ||
16248 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016249 } && test -s conftest$ac_exeext &&
16250 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016251 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016252else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016254sed 's/^/| /' conftest.$ac_ext >&5
16255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016256 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016258
16259rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016260 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016261LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016262fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016263{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16264echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16265if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016266 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016267#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016268_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016269
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016270 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016271 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016272 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016273else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016274
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016275 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16276echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016277if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016278 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016279else
Martin v. Löwis11437992002-04-12 09:54:03 +000016280 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016281LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016282cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016283/* confdefs.h. */
16284_ACEOF
16285cat confdefs.h >>conftest.$ac_ext
16286cat >>conftest.$ac_ext <<_ACEOF
16287/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016289/* Override any GCC internal prototype to avoid an error.
16290 Use char because int might match the return type of a GCC
16291 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016292#ifdef __cplusplus
16293extern "C"
16294#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016295char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016296int
16297main ()
16298{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016299return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016300 ;
16301 return 0;
16302}
16303_ACEOF
16304rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016305if { (ac_try="$ac_link"
16306case "(($ac_try" in
16307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16308 *) ac_try_echo=$ac_try;;
16309esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016311 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016312 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016313 grep -v '^ *+' conftest.er1 >conftest.err
16314 rm -f conftest.er1
16315 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016317 (exit $ac_status); } && {
16318 test -z "$ac_c_werror_flag" ||
16319 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016320 } && test -s conftest$ac_exeext &&
16321 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016322 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016323else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016325sed 's/^/| /' conftest.$ac_ext >&5
16326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016327 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016329
16330rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016331 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016332LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016333fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016334{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16335echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16336if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016337 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016338#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016339_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016340
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016341 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016342 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016343 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016344else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016345
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016346 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16347echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016348if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016349 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016350else
Martin v. Löwis11437992002-04-12 09:54:03 +000016351 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016352LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016353cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016354/* confdefs.h. */
16355_ACEOF
16356cat confdefs.h >>conftest.$ac_ext
16357cat >>conftest.$ac_ext <<_ACEOF
16358/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016360/* Override any GCC internal prototype to avoid an error.
16361 Use char because int might match the return type of a GCC
16362 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016363#ifdef __cplusplus
16364extern "C"
16365#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016366char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016367int
16368main ()
16369{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016370return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016371 ;
16372 return 0;
16373}
16374_ACEOF
16375rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016376if { (ac_try="$ac_link"
16377case "(($ac_try" in
16378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16379 *) ac_try_echo=$ac_try;;
16380esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016382 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016384 grep -v '^ *+' conftest.er1 >conftest.err
16385 rm -f conftest.er1
16386 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016388 (exit $ac_status); } && {
16389 test -z "$ac_c_werror_flag" ||
16390 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016391 } && test -s conftest$ac_exeext &&
16392 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016393 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016394else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016395 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016396sed 's/^/| /' conftest.$ac_ext >&5
16397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016398 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016400
16401rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016402 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016403LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016404fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016405{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16406echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16407if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016408 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016409#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016410_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016411
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016412 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016413 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016414 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016415else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016416
Martin v. Löwis130fb172001-07-19 11:00:41 +000016417 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016418fi
16419
Guido van Rossum627b2d71993-12-24 10:39:16 +000016420
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016421fi
16422
Guido van Rossum0be3e491997-05-22 20:33:33 +000016423fi
16424
Guido van Rossum49545951997-12-02 19:28:29 +000016425fi
16426
Guido van Rossumb93a8621998-05-07 13:27:32 +000016427fi
16428
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016430
16431rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016432 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016433fi
16434
Martin v. Löwis11437992002-04-12 09:54:03 +000016435
16436fi
16437
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016438
Michael W. Hudson54241132001-12-07 15:38:26 +000016439
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016440 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16441echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016442if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016443 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016444else
Martin v. Löwis11437992002-04-12 09:54:03 +000016445 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016446LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016447cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016448/* confdefs.h. */
16449_ACEOF
16450cat confdefs.h >>conftest.$ac_ext
16451cat >>conftest.$ac_ext <<_ACEOF
16452/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016454/* Override any GCC internal prototype to avoid an error.
16455 Use char because int might match the return type of a GCC
16456 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016457#ifdef __cplusplus
16458extern "C"
16459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016460char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016461int
16462main ()
16463{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016464return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016465 ;
16466 return 0;
16467}
16468_ACEOF
16469rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016470if { (ac_try="$ac_link"
16471case "(($ac_try" in
16472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16473 *) ac_try_echo=$ac_try;;
16474esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016476 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016477 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016478 grep -v '^ *+' conftest.er1 >conftest.err
16479 rm -f conftest.er1
16480 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016482 (exit $ac_status); } && {
16483 test -z "$ac_c_werror_flag" ||
16484 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016485 } && test -s conftest$ac_exeext &&
16486 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016487 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016488else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016490sed 's/^/| /' conftest.$ac_ext >&5
16491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016492 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016494
16495rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016496 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016497LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016498fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016499{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16500echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16501if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016502 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016503#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016504_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016505
Martin v. Löwis130fb172001-07-19 11:00:41 +000016506 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016507 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016508 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016509fi
16510
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016511
Neal Norwitza978ab02002-11-02 16:58:05 +000016512 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016513 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16514echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016515if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016516 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016517else
Martin v. Löwis11437992002-04-12 09:54:03 +000016518 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016519LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016520cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016521/* confdefs.h. */
16522_ACEOF
16523cat confdefs.h >>conftest.$ac_ext
16524cat >>conftest.$ac_ext <<_ACEOF
16525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016527/* Override any GCC internal prototype to avoid an error.
16528 Use char because int might match the return type of a GCC
16529 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016530#ifdef __cplusplus
16531extern "C"
16532#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016533char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016534int
16535main ()
16536{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016537return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016538 ;
16539 return 0;
16540}
16541_ACEOF
16542rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016543if { (ac_try="$ac_link"
16544case "(($ac_try" in
16545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16546 *) ac_try_echo=$ac_try;;
16547esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016549 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016550 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016551 grep -v '^ *+' conftest.er1 >conftest.err
16552 rm -f conftest.er1
16553 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016555 (exit $ac_status); } && {
16556 test -z "$ac_c_werror_flag" ||
16557 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016558 } && test -s conftest$ac_exeext &&
16559 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016560 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016561else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016563sed 's/^/| /' conftest.$ac_ext >&5
16564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016565 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016567
16568rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016569 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016570LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016571fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016572{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16573echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16574if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016575 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016576#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016577_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016578
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016579 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016580 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016581 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016582fi
16583
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016584 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016585
Martin v. Löwis130fb172001-07-19 11:00:41 +000016586 if test "$USE_THREAD_MODULE" != "#"
16587 then
16588 # If the above checks didn't disable threads, (at least) OSF1
16589 # needs this '-threads' argument during linking.
16590 case $ac_sys_system in
16591 OSF1) LDLAST=-threads;;
16592 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016593 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016594fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016595
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016596if test "$posix_threads" = "yes"; then
16597 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016598
16599cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016600#define _POSIX_THREADS 1
16601_ACEOF
16602
16603 fi
16604
16605 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16606 case $ac_sys_system/$ac_sys_release in
16607 SunOS/5.6)
16608cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016609#define HAVE_PTHREAD_DESTRUCTOR 1
16610_ACEOF
16611
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016612 ;;
16613 SunOS/5.8)
16614cat >>confdefs.h <<\_ACEOF
16615#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16616_ACEOF
16617
16618 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016619 AIX/5)
16620cat >>confdefs.h <<\_ACEOF
16621#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16622_ACEOF
16623
16624 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016625 esac
16626
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016627 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16628echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016629 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016630 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016631else
16632 if test "$cross_compiling" = yes; then
16633 ac_cv_pthread_system_supported=no
16634else
16635 cat >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öwis4ee6eef2003-05-26 05:37:51 +000016641#include <pthread.h>
16642 void *foo(void *parm) {
16643 return NULL;
16644 }
16645 main() {
16646 pthread_attr_t attr;
16647 pthread_t id;
16648 if (pthread_attr_init(&attr)) exit(-1);
16649 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16650 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16651 exit(0);
16652 }
16653_ACEOF
16654rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016655if { (ac_try="$ac_link"
16656case "(($ac_try" in
16657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16658 *) ac_try_echo=$ac_try;;
16659esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016661 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016662 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016664 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016665 { (case "(($ac_try" in
16666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16667 *) ac_try_echo=$ac_try;;
16668esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016670 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016671 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016673 (exit $ac_status); }; }; then
16674 ac_cv_pthread_system_supported=yes
16675else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016676 echo "$as_me: program exited with status $ac_status" >&5
16677echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016678sed 's/^/| /' conftest.$ac_ext >&5
16679
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016680( exit $ac_status )
16681ac_cv_pthread_system_supported=no
16682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016683rm -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 +000016684fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016686
16687
Guido van Rossum627b2d71993-12-24 10:39:16 +000016688fi
16689
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016690 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16691echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016692 if test "$ac_cv_pthread_system_supported" = "yes"; then
16693
16694cat >>confdefs.h <<\_ACEOF
16695#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16696_ACEOF
16697
16698 fi
16699
16700for ac_func in pthread_sigmask
16701do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016702as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16703{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16704echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016705if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016706 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016707else
16708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016709/* confdefs.h. */
16710_ACEOF
16711cat confdefs.h >>conftest.$ac_ext
16712cat >>conftest.$ac_ext <<_ACEOF
16713/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016714/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16715 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16716#define $ac_func innocuous_$ac_func
16717
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016718/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016719 which can conflict with char $ac_func (); below.
16720 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016721 <limits.h> exists even on freestanding compilers. */
16722
16723#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016724# include <limits.h>
16725#else
16726# include <assert.h>
16727#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016728
16729#undef $ac_func
16730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016731/* Override any GCC internal prototype to avoid an error.
16732 Use char because int might match the return type of a GCC
16733 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016734#ifdef __cplusplus
16735extern "C"
16736#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016737char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016738/* The GNU C library defines this for functions which it implements
16739 to always fail with ENOSYS. Some functions are actually named
16740 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016741#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016742choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016743#endif
16744
Skip Montanaro6dead952003-09-25 14:50:04 +000016745int
16746main ()
16747{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016748return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016749 ;
16750 return 0;
16751}
16752_ACEOF
16753rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016754if { (ac_try="$ac_link"
16755case "(($ac_try" in
16756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16757 *) ac_try_echo=$ac_try;;
16758esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016760 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016762 grep -v '^ *+' conftest.er1 >conftest.err
16763 rm -f conftest.er1
16764 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016766 (exit $ac_status); } && {
16767 test -z "$ac_c_werror_flag" ||
16768 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016769 } && test -s conftest$ac_exeext &&
16770 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016771 eval "$as_ac_var=yes"
16772else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016774sed 's/^/| /' conftest.$ac_ext >&5
16775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016776 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016778
16779rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016780 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016781fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016782ac_res=`eval echo '${'$as_ac_var'}'`
16783 { echo "$as_me:$LINENO: result: $ac_res" >&5
16784echo "${ECHO_T}$ac_res" >&6; }
16785if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016786 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016787#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016788_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016789 case $ac_sys_system in
16790 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016791
Jason Tishlerfac083d2003-07-22 15:20:49 +000016792cat >>confdefs.h <<\_ACEOF
16793#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16794_ACEOF
16795
16796 ;;
16797 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016798fi
16799done
16800
16801fi
16802
16803
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016804# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016805
16806
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016807{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16808echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016809# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016810if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016811 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016812 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016813 { echo "$as_me:$LINENO: result: no" >&5
16814echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016815 ipv6=no
16816 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016817 *) { echo "$as_me:$LINENO: result: yes" >&5
16818echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016819 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016820#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016821_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016822
16823 ipv6=yes
16824 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016825 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016826else
Martin v. Löwis11437992002-04-12 09:54:03 +000016827
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016828 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016829 { echo "$as_me:$LINENO: result: no" >&5
16830echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016831 ipv6=no
16832
16833else
Martin v. Löwis11437992002-04-12 09:54:03 +000016834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016835/* confdefs.h. */
16836_ACEOF
16837cat confdefs.h >>conftest.$ac_ext
16838cat >>conftest.$ac_ext <<_ACEOF
16839/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016840 /* AF_INET6 available check */
16841#include <sys/types.h>
16842#include <sys/socket.h>
16843main()
16844{
16845 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16846 exit(1);
16847 else
16848 exit(0);
16849}
16850
Martin v. Löwis11437992002-04-12 09:54:03 +000016851_ACEOF
16852rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016853if { (ac_try="$ac_link"
16854case "(($ac_try" in
16855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16856 *) ac_try_echo=$ac_try;;
16857esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016859 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016860 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016862 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016863 { (case "(($ac_try" in
16864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16865 *) ac_try_echo=$ac_try;;
16866esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016868 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016869 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016871 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016872 { echo "$as_me:$LINENO: result: yes" >&5
16873echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016874 ipv6=yes
16875else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016876 echo "$as_me: program exited with status $ac_status" >&5
16877echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016878sed 's/^/| /' conftest.$ac_ext >&5
16879
Martin v. Löwis11437992002-04-12 09:54:03 +000016880( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016881{ echo "$as_me:$LINENO: result: no" >&5
16882echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016883 ipv6=no
16884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016885rm -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 +000016886fi
16887
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016888
16889
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016890if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016891 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16892echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016893 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016894/* confdefs.h. */
16895_ACEOF
16896cat confdefs.h >>conftest.$ac_ext
16897cat >>conftest.$ac_ext <<_ACEOF
16898/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016899#include <sys/types.h>
16900#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016901int
16902main ()
16903{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016904struct sockaddr_in6 x;
16905x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016906 ;
16907 return 0;
16908}
16909_ACEOF
16910rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016911if { (ac_try="$ac_compile"
16912case "(($ac_try" in
16913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16914 *) ac_try_echo=$ac_try;;
16915esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016917 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016919 grep -v '^ *+' conftest.er1 >conftest.err
16920 rm -f conftest.er1
16921 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016923 (exit $ac_status); } && {
16924 test -z "$ac_c_werror_flag" ||
16925 test ! -s conftest.err
16926 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016927 { echo "$as_me:$LINENO: result: yes" >&5
16928echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016929 ipv6=yes
16930else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016932sed 's/^/| /' conftest.$ac_ext >&5
16933
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016934 { echo "$as_me:$LINENO: result: no" >&5
16935echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016936 ipv6=no
16937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016938
16939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016940fi
16941
16942if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016943 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016944#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016945_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016946
16947fi
16948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016949fi
16950
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016951
16952ipv6type=unknown
16953ipv6lib=none
16954ipv6trylibc=no
16955
16956if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016957 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16958echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016959 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16960 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016961 case $i in
16962 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016963 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016964/* confdefs.h. */
16965_ACEOF
16966cat confdefs.h >>conftest.$ac_ext
16967cat >>conftest.$ac_ext <<_ACEOF
16968/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016969
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016970#include <netinet/in.h>
16971#ifdef IPV6_INRIA_VERSION
16972yes
16973#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016974_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016975if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016976 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016977 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016978fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000016979rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016980
16981 ;;
16982 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016984/* confdefs.h. */
16985_ACEOF
16986cat confdefs.h >>conftest.$ac_ext
16987cat >>conftest.$ac_ext <<_ACEOF
16988/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016989
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016990#include <netinet/in.h>
16991#ifdef __KAME__
16992yes
16993#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016994_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016996 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016997 ipv6type=$i;
16998 ipv6lib=inet6
16999 ipv6libdir=/usr/local/v6/lib
17000 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017001fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000017002rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017003
17004 ;;
17005 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017006 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017007/* confdefs.h. */
17008_ACEOF
17009cat confdefs.h >>conftest.$ac_ext
17010cat >>conftest.$ac_ext <<_ACEOF
17011/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017012
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017013#include <features.h>
17014#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17015yes
17016#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017017_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017019 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017020 ipv6type=$i;
17021 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017022fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000017023rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017024
17025 ;;
17026 linux-inet6)
17027 if test -d /usr/inet6; then
17028 ipv6type=$i
17029 ipv6lib=inet6
17030 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017031 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017032 fi
17033 ;;
17034 solaris)
17035 if test -f /etc/netconfig; then
17036 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17037 ipv6type=$i
17038 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017039 fi
17040 fi
17041 ;;
17042 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017044/* confdefs.h. */
17045_ACEOF
17046cat confdefs.h >>conftest.$ac_ext
17047cat >>conftest.$ac_ext <<_ACEOF
17048/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017049
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017050#include <sys/param.h>
17051#ifdef _TOSHIBA_INET6
17052yes
17053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017054_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017056 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017057 ipv6type=$i;
17058 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017059 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017060fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000017061rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017062
17063 ;;
17064 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017065 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017066/* confdefs.h. */
17067_ACEOF
17068cat confdefs.h >>conftest.$ac_ext
17069cat >>conftest.$ac_ext <<_ACEOF
17070/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017071
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017072#include </usr/local/v6/include/sys/v6config.h>
17073#ifdef __V6D__
17074yes
17075#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017076_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017077if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017078 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017079 ipv6type=$i;
17080 ipv6lib=v6;
17081 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017082 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017083fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000017084rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017085
17086 ;;
17087 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017089/* confdefs.h. */
17090_ACEOF
17091cat confdefs.h >>conftest.$ac_ext
17092cat >>conftest.$ac_ext <<_ACEOF
17093/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017094
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017095#include <sys/param.h>
17096#ifdef _ZETA_MINAMI_INET6
17097yes
17098#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017099_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017100if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017101 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017102 ipv6type=$i;
17103 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017104 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017105fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000017106rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017107
17108 ;;
17109 esac
17110 if test "$ipv6type" != "unknown"; then
17111 break
17112 fi
17113 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017114 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17115echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017116fi
17117
17118if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17119 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17120 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17121 echo "using lib$ipv6lib"
17122 else
17123 if test $ipv6trylibc = "yes"; then
17124 echo "using libc"
17125 else
17126 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17127 echo "You need to fetch lib$ipv6lib.a from appropriate"
17128 echo 'ipv6 kit and compile beforehand.'
17129 exit 1
17130 fi
17131 fi
17132fi
17133
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017134{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17135echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017136cat >conftest.$ac_ext <<_ACEOF
17137/* confdefs.h. */
17138_ACEOF
17139cat confdefs.h >>conftest.$ac_ext
17140cat >>conftest.$ac_ext <<_ACEOF
17141/* end confdefs.h. */
17142#include <Carbon/Carbon.h>
17143int
17144main ()
17145{
17146FSIORefNum fRef = 0
17147 ;
17148 return 0;
17149}
17150_ACEOF
17151rm -f conftest.$ac_objext
17152if { (ac_try="$ac_compile"
17153case "(($ac_try" in
17154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17155 *) ac_try_echo=$ac_try;;
17156esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017158 (eval "$ac_compile") 2>conftest.er1
17159 ac_status=$?
17160 grep -v '^ *+' conftest.er1 >conftest.err
17161 rm -f conftest.er1
17162 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017164 (exit $ac_status); } && {
17165 test -z "$ac_c_werror_flag" ||
17166 test ! -s conftest.err
17167 } && test -s conftest.$ac_objext; then
17168
17169cat >>confdefs.h <<\_ACEOF
17170#define HAVE_OSX105_SDK 1
17171_ACEOF
17172
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017173 { echo "$as_me:$LINENO: result: yes" >&5
17174echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017175else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017176 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017177sed 's/^/| /' conftest.$ac_ext >&5
17178
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017179 { echo "$as_me:$LINENO: result: no" >&5
17180echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017181
17182fi
17183
17184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17185
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017186# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017187{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17188echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017190# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017191if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017192 withval=$with_doc_strings;
17193fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017194
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017195
17196if test -z "$with_doc_strings"
17197then with_doc_strings="yes"
17198fi
17199if test "$with_doc_strings" != "no"
17200then
17201
17202cat >>confdefs.h <<\_ACEOF
17203#define WITH_DOC_STRINGS 1
17204_ACEOF
17205
17206fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017207{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17208echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017209
Neil Schemenauera35c6882001-02-27 04:45:05 +000017210# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017211{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17212echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017214# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017215if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017216 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017217if test "$withval" != no
17218then
17219
17220cat >>confdefs.h <<\_ACEOF
17221#define WITH_TSC 1
17222_ACEOF
17223
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017224 { echo "$as_me:$LINENO: result: yes" >&5
17225echo "${ECHO_T}yes" >&6; }
17226else { echo "$as_me:$LINENO: result: no" >&5
17227echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017228fi
17229else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017230 { echo "$as_me:$LINENO: result: no" >&5
17231echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017232fi
17233
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017234
17235# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017236{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17237echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017239# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017240if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017241 withval=$with_pymalloc;
17242fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017243
Neil Schemenauera35c6882001-02-27 04:45:05 +000017244
Neil Schemenauer16c22972002-03-22 15:34:49 +000017245if test -z "$with_pymalloc"
17246then with_pymalloc="yes"
17247fi
17248if test "$with_pymalloc" != "no"
17249then
Martin v. Löwis11437992002-04-12 09:54:03 +000017250
17251cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017252#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017253_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017254
17255fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017256{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17257echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017258
Benjamin Peterson05159c42009-12-03 03:01:27 +000017259# Check for Valgrind support
17260{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17261echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17262
17263# Check whether --with-valgrind was given.
17264if test "${with_valgrind+set}" = set; then
17265 withval=$with_valgrind;
17266else
17267 with_valgrind=no
17268fi
17269
17270{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17271echo "${ECHO_T}$with_valgrind" >&6; }
17272if test "$with_valgrind" != no; then
17273 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17274 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17275echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17276if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17277 echo $ECHO_N "(cached) $ECHO_C" >&6
17278fi
17279{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17280echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17281else
17282 # Is the header compilable?
17283{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17284echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17285cat >conftest.$ac_ext <<_ACEOF
17286/* confdefs.h. */
17287_ACEOF
17288cat confdefs.h >>conftest.$ac_ext
17289cat >>conftest.$ac_ext <<_ACEOF
17290/* end confdefs.h. */
17291$ac_includes_default
17292#include <valgrind/valgrind.h>
17293_ACEOF
17294rm -f conftest.$ac_objext
17295if { (ac_try="$ac_compile"
17296case "(($ac_try" in
17297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17298 *) ac_try_echo=$ac_try;;
17299esac
17300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17301 (eval "$ac_compile") 2>conftest.er1
17302 ac_status=$?
17303 grep -v '^ *+' conftest.er1 >conftest.err
17304 rm -f conftest.er1
17305 cat conftest.err >&5
17306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17307 (exit $ac_status); } && {
17308 test -z "$ac_c_werror_flag" ||
17309 test ! -s conftest.err
17310 } && test -s conftest.$ac_objext; then
17311 ac_header_compiler=yes
17312else
17313 echo "$as_me: failed program was:" >&5
17314sed 's/^/| /' conftest.$ac_ext >&5
17315
17316 ac_header_compiler=no
17317fi
17318
17319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17320{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17321echo "${ECHO_T}$ac_header_compiler" >&6; }
17322
17323# Is the header present?
17324{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17325echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17326cat >conftest.$ac_ext <<_ACEOF
17327/* confdefs.h. */
17328_ACEOF
17329cat confdefs.h >>conftest.$ac_ext
17330cat >>conftest.$ac_ext <<_ACEOF
17331/* end confdefs.h. */
17332#include <valgrind/valgrind.h>
17333_ACEOF
17334if { (ac_try="$ac_cpp conftest.$ac_ext"
17335case "(($ac_try" in
17336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17337 *) ac_try_echo=$ac_try;;
17338esac
17339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17340 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17341 ac_status=$?
17342 grep -v '^ *+' conftest.er1 >conftest.err
17343 rm -f conftest.er1
17344 cat conftest.err >&5
17345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17346 (exit $ac_status); } >/dev/null && {
17347 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17348 test ! -s conftest.err
17349 }; then
17350 ac_header_preproc=yes
17351else
17352 echo "$as_me: failed program was:" >&5
17353sed 's/^/| /' conftest.$ac_ext >&5
17354
17355 ac_header_preproc=no
17356fi
17357
17358rm -f conftest.err conftest.$ac_ext
17359{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17360echo "${ECHO_T}$ac_header_preproc" >&6; }
17361
17362# So? What about this header?
17363case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17364 yes:no: )
17365 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17366echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17367 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17368echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17369 ac_header_preproc=yes
17370 ;;
17371 no:yes:* )
17372 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17373echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17374 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17375echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17376 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17377echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17378 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17379echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17380 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17381echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17382 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17383echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17384 ( cat <<\_ASBOX
17385## -------------------------------------- ##
17386## Report this to http://bugs.python.org/ ##
17387## -------------------------------------- ##
17388_ASBOX
17389 ) | sed "s/^/$as_me: WARNING: /" >&2
17390 ;;
17391esac
17392{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17393echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17394if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17395 echo $ECHO_N "(cached) $ECHO_C" >&6
17396else
17397 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17398fi
17399{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17400echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17401
17402fi
17403if test $ac_cv_header_valgrind_valgrind_h = yes; then
17404
17405cat >>confdefs.h <<\_ACEOF
17406#define WITH_VALGRIND 1
17407_ACEOF
17408
17409else
17410 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17411echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17412 { (exit 1); exit 1; }; }
17413
17414fi
17415
17416
17417fi
17418
Barry Warsawef82cd72000-06-30 16:21:01 +000017419# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017420{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17421echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017422
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017423# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017424if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017425 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017426if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017427then
17428
17429cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017430#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017431_ACEOF
17432
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017433 { echo "$as_me:$LINENO: result: yes" >&5
17434echo "${ECHO_T}yes" >&6; }
17435else { echo "$as_me:$LINENO: result: no" >&5
17436echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017437fi
17438else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017439 { echo "$as_me:$LINENO: result: no" >&5
17440echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017441fi
17442
Barry Warsawef82cd72000-06-30 16:21:01 +000017443
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017444# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017445
Guido van Rossum98935bf2001-09-05 19:13:16 +000017446DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017447
Guido van Rossume97ee181999-12-20 21:27:22 +000017448# the dlopen() function means we might want to use dynload_shlib.o. some
17449# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017450
Thomas Wouters3a584202000-08-05 23:28:51 +000017451for ac_func in dlopen
17452do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017453as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17454{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17455echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017456if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017457 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017458else
Martin v. Löwis11437992002-04-12 09:54:03 +000017459 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017460/* confdefs.h. */
17461_ACEOF
17462cat confdefs.h >>conftest.$ac_ext
17463cat >>conftest.$ac_ext <<_ACEOF
17464/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017465/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17466 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17467#define $ac_func innocuous_$ac_func
17468
Guido van Rossume97ee181999-12-20 21:27:22 +000017469/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017470 which can conflict with char $ac_func (); below.
17471 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017472 <limits.h> exists even on freestanding compilers. */
17473
17474#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017475# include <limits.h>
17476#else
17477# include <assert.h>
17478#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017479
17480#undef $ac_func
17481
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017482/* Override any GCC internal prototype to avoid an error.
17483 Use char because int might match the return type of a GCC
17484 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017485#ifdef __cplusplus
17486extern "C"
17487#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017488char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017489/* The GNU C library defines this for functions which it implements
17490 to always fail with ENOSYS. Some functions are actually named
17491 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017492#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017493choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017494#endif
17495
Skip Montanaro6dead952003-09-25 14:50:04 +000017496int
17497main ()
17498{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017499return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017500 ;
17501 return 0;
17502}
17503_ACEOF
17504rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017505if { (ac_try="$ac_link"
17506case "(($ac_try" in
17507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17508 *) ac_try_echo=$ac_try;;
17509esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017511 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017512 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017513 grep -v '^ *+' conftest.er1 >conftest.err
17514 rm -f conftest.er1
17515 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017517 (exit $ac_status); } && {
17518 test -z "$ac_c_werror_flag" ||
17519 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017520 } && test -s conftest$ac_exeext &&
17521 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017522 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017523else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017525sed 's/^/| /' conftest.$ac_ext >&5
17526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017527 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017529
17530rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017531 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017532fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017533ac_res=`eval echo '${'$as_ac_var'}'`
17534 { echo "$as_me:$LINENO: result: $ac_res" >&5
17535echo "${ECHO_T}$ac_res" >&6; }
17536if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017537 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017538#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017539_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017540
Guido van Rossume97ee181999-12-20 21:27:22 +000017541fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017542done
Guido van Rossume97ee181999-12-20 21:27:22 +000017543
Michael W. Hudson54241132001-12-07 15:38:26 +000017544
Guido van Rossume97ee181999-12-20 21:27:22 +000017545# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17546# loading of modules.
17547
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017548{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17549echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017550if test -z "$DYNLOADFILE"
17551then
17552 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017553 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17554 if test "$ac_cv_func_dlopen" = yes
17555 then DYNLOADFILE="dynload_shlib.o"
17556 else DYNLOADFILE="dynload_aix.o"
17557 fi
17558 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017559 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017560 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17561 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017562 *)
17563 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17564 # out any dynamic loading
17565 if test "$ac_cv_func_dlopen" = yes
17566 then DYNLOADFILE="dynload_shlib.o"
17567 else DYNLOADFILE="dynload_stub.o"
17568 fi
17569 ;;
17570 esac
17571fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017572{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17573echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017574if test "$DYNLOADFILE" != "dynload_stub.o"
17575then
Martin v. Löwis11437992002-04-12 09:54:03 +000017576
17577cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017578#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017579_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017580
17581fi
17582
Neil Schemenauer4e425612001-06-19 15:44:15 +000017583# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17584
Michael W. Hudson54241132001-12-07 15:38:26 +000017585
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017586{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17587echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017588if test -z "$MACHDEP_OBJS"
17589then
Jack Jansene578a632001-08-15 01:27:14 +000017590 MACHDEP_OBJS=$extra_machdep_objs
17591else
17592 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017593fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017594{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17595echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017596
Guido van Rossum627b2d71993-12-24 10:39:16 +000017597# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
Martin v. Löwisd6320502004-08-12 13:45:08 +000017669
Martin v. Löwisc3001752005-01-23 09:27:24 +000017670
17671
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017672
17673
Thomas Wouterscf297e42007-02-23 15:07:44 +000017674
17675
Gregory P. Smith25523d22007-09-03 16:44:55 +000017676
Christian Heimes4e30a842007-11-30 22:12:06 +000017677
Martin v. Löwis92fab752008-03-08 10:40:41 +000017678
Martin v. Löwis823725e2008-03-24 13:39:54 +000017679
17680
Benjamin Peterson965ce872009-04-05 21:24:58 +000017681
17682
17683
17684
Martin v. Löwis011e8422009-05-05 04:43:17 +000017685
Martin v. Löwis113a0852009-05-29 17:25:39 +000017686
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017687
17688
17689
17690
Antoine Pitroub7572f02009-12-02 20:46:48 +000017691
Martin v. Löwis823725e2008-03-24 13:39:54 +000017692for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17693 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017694 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017695 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +000017696 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017697 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017698 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017699 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17700 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017701 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
17702 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017703 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017704 truncate uname unsetenv utimes waitpid wait3 wait4 \
17705 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017706do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017707as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17708{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17709echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017710if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017711 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017712else
Martin v. Löwis11437992002-04-12 09:54:03 +000017713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017714/* confdefs.h. */
17715_ACEOF
17716cat confdefs.h >>conftest.$ac_ext
17717cat >>conftest.$ac_ext <<_ACEOF
17718/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017719/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17720 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17721#define $ac_func innocuous_$ac_func
17722
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017723/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017724 which can conflict with char $ac_func (); below.
17725 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017726 <limits.h> exists even on freestanding compilers. */
17727
17728#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017729# include <limits.h>
17730#else
17731# include <assert.h>
17732#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017733
17734#undef $ac_func
17735
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017736/* Override any GCC internal prototype to avoid an error.
17737 Use char because int might match the return type of a GCC
17738 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017739#ifdef __cplusplus
17740extern "C"
17741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017742char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017743/* The GNU C library defines this for functions which it implements
17744 to always fail with ENOSYS. Some functions are actually named
17745 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017746#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017747choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017748#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017749
Skip Montanaro6dead952003-09-25 14:50:04 +000017750int
17751main ()
17752{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017753return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017754 ;
17755 return 0;
17756}
17757_ACEOF
17758rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017759if { (ac_try="$ac_link"
17760case "(($ac_try" in
17761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17762 *) ac_try_echo=$ac_try;;
17763esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017765 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017767 grep -v '^ *+' conftest.er1 >conftest.err
17768 rm -f conftest.er1
17769 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017771 (exit $ac_status); } && {
17772 test -z "$ac_c_werror_flag" ||
17773 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017774 } && test -s conftest$ac_exeext &&
17775 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017776 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017777else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017779sed 's/^/| /' conftest.$ac_ext >&5
17780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017781 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017783
17784rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017785 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017786fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017787ac_res=`eval echo '${'$as_ac_var'}'`
17788 { echo "$as_me:$LINENO: result: $ac_res" >&5
17789echo "${ECHO_T}$ac_res" >&6; }
17790if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017791 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017792#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017793_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017794
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017795fi
17796done
17797
Michael W. Hudson54241132001-12-07 15:38:26 +000017798
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017799# For some functions, having a definition is not sufficient, since
17800# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017801{ echo "$as_me:$LINENO: checking for chroot" >&5
17802echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017803cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017804/* confdefs.h. */
17805_ACEOF
17806cat confdefs.h >>conftest.$ac_ext
17807cat >>conftest.$ac_ext <<_ACEOF
17808/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017809#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017810int
17811main ()
17812{
17813void *x=chroot
17814 ;
17815 return 0;
17816}
17817_ACEOF
17818rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017819if { (ac_try="$ac_compile"
17820case "(($ac_try" in
17821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17822 *) ac_try_echo=$ac_try;;
17823esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017825 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017826 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017827 grep -v '^ *+' conftest.er1 >conftest.err
17828 rm -f conftest.er1
17829 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017831 (exit $ac_status); } && {
17832 test -z "$ac_c_werror_flag" ||
17833 test ! -s conftest.err
17834 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017835
17836cat >>confdefs.h <<\_ACEOF
17837#define HAVE_CHROOT 1
17838_ACEOF
17839
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017840 { echo "$as_me:$LINENO: result: yes" >&5
17841echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017842else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017844sed 's/^/| /' conftest.$ac_ext >&5
17845
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017846 { echo "$as_me:$LINENO: result: no" >&5
17847echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017848
17849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017850
17851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017852{ echo "$as_me:$LINENO: checking for link" >&5
17853echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017854cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017855/* confdefs.h. */
17856_ACEOF
17857cat confdefs.h >>conftest.$ac_ext
17858cat >>conftest.$ac_ext <<_ACEOF
17859/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017860#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017861int
17862main ()
17863{
17864void *x=link
17865 ;
17866 return 0;
17867}
17868_ACEOF
17869rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017870if { (ac_try="$ac_compile"
17871case "(($ac_try" in
17872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17873 *) ac_try_echo=$ac_try;;
17874esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017876 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017878 grep -v '^ *+' conftest.er1 >conftest.err
17879 rm -f conftest.er1
17880 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017882 (exit $ac_status); } && {
17883 test -z "$ac_c_werror_flag" ||
17884 test ! -s conftest.err
17885 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017886
17887cat >>confdefs.h <<\_ACEOF
17888#define HAVE_LINK 1
17889_ACEOF
17890
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017891 { echo "$as_me:$LINENO: result: yes" >&5
17892echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017893else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017895sed 's/^/| /' conftest.$ac_ext >&5
17896
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017897 { echo "$as_me:$LINENO: result: no" >&5
17898echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017899
17900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017901
17902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017903{ echo "$as_me:$LINENO: checking for symlink" >&5
17904echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017905cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017906/* confdefs.h. */
17907_ACEOF
17908cat confdefs.h >>conftest.$ac_ext
17909cat >>conftest.$ac_ext <<_ACEOF
17910/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017911#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017912int
17913main ()
17914{
17915void *x=symlink
17916 ;
17917 return 0;
17918}
17919_ACEOF
17920rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017921if { (ac_try="$ac_compile"
17922case "(($ac_try" in
17923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17924 *) ac_try_echo=$ac_try;;
17925esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017927 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017929 grep -v '^ *+' conftest.er1 >conftest.err
17930 rm -f conftest.er1
17931 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017933 (exit $ac_status); } && {
17934 test -z "$ac_c_werror_flag" ||
17935 test ! -s conftest.err
17936 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017937
17938cat >>confdefs.h <<\_ACEOF
17939#define HAVE_SYMLINK 1
17940_ACEOF
17941
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017942 { echo "$as_me:$LINENO: result: yes" >&5
17943echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017944else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017946sed 's/^/| /' conftest.$ac_ext >&5
17947
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017948 { echo "$as_me:$LINENO: result: no" >&5
17949echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017950
17951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017952
17953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017954{ echo "$as_me:$LINENO: checking for fchdir" >&5
17955echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017956cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017957/* confdefs.h. */
17958_ACEOF
17959cat confdefs.h >>conftest.$ac_ext
17960cat >>conftest.$ac_ext <<_ACEOF
17961/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017962#include <unistd.h>
17963int
17964main ()
17965{
17966void *x=fchdir
17967 ;
17968 return 0;
17969}
17970_ACEOF
17971rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017972if { (ac_try="$ac_compile"
17973case "(($ac_try" in
17974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17975 *) ac_try_echo=$ac_try;;
17976esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017978 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017980 grep -v '^ *+' conftest.er1 >conftest.err
17981 rm -f conftest.er1
17982 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017984 (exit $ac_status); } && {
17985 test -z "$ac_c_werror_flag" ||
17986 test ! -s conftest.err
17987 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017988
17989cat >>confdefs.h <<\_ACEOF
17990#define HAVE_FCHDIR 1
17991_ACEOF
17992
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017993 { echo "$as_me:$LINENO: result: yes" >&5
17994echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017995else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017997sed 's/^/| /' conftest.$ac_ext >&5
17998
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017999 { echo "$as_me:$LINENO: result: no" >&5
18000echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018001
18002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018003
18004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018005{ echo "$as_me:$LINENO: checking for fsync" >&5
18006echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018007cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018008/* confdefs.h. */
18009_ACEOF
18010cat confdefs.h >>conftest.$ac_ext
18011cat >>conftest.$ac_ext <<_ACEOF
18012/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018013#include <unistd.h>
18014int
18015main ()
18016{
18017void *x=fsync
18018 ;
18019 return 0;
18020}
18021_ACEOF
18022rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018023if { (ac_try="$ac_compile"
18024case "(($ac_try" in
18025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18026 *) ac_try_echo=$ac_try;;
18027esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018029 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018030 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018031 grep -v '^ *+' conftest.er1 >conftest.err
18032 rm -f conftest.er1
18033 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018035 (exit $ac_status); } && {
18036 test -z "$ac_c_werror_flag" ||
18037 test ! -s conftest.err
18038 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018039
18040cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018041#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018042_ACEOF
18043
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018044 { echo "$as_me:$LINENO: result: yes" >&5
18045echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018046else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018048sed 's/^/| /' conftest.$ac_ext >&5
18049
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018050 { echo "$as_me:$LINENO: result: no" >&5
18051echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018052
18053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018054
18055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018056{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18057echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018058cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018059/* confdefs.h. */
18060_ACEOF
18061cat confdefs.h >>conftest.$ac_ext
18062cat >>conftest.$ac_ext <<_ACEOF
18063/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018064#include <unistd.h>
18065int
18066main ()
18067{
18068void *x=fdatasync
18069 ;
18070 return 0;
18071}
18072_ACEOF
18073rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018074if { (ac_try="$ac_compile"
18075case "(($ac_try" in
18076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18077 *) ac_try_echo=$ac_try;;
18078esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018080 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018082 grep -v '^ *+' conftest.er1 >conftest.err
18083 rm -f conftest.er1
18084 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018086 (exit $ac_status); } && {
18087 test -z "$ac_c_werror_flag" ||
18088 test ! -s conftest.err
18089 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018090
18091cat >>confdefs.h <<\_ACEOF
18092#define HAVE_FDATASYNC 1
18093_ACEOF
18094
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018095 { echo "$as_me:$LINENO: result: yes" >&5
18096echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018097else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018099sed 's/^/| /' conftest.$ac_ext >&5
18100
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018101 { echo "$as_me:$LINENO: result: no" >&5
18102echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018103
18104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018105
18106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018107{ echo "$as_me:$LINENO: checking for epoll" >&5
18108echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018109cat >conftest.$ac_ext <<_ACEOF
18110/* confdefs.h. */
18111_ACEOF
18112cat confdefs.h >>conftest.$ac_ext
18113cat >>conftest.$ac_ext <<_ACEOF
18114/* end confdefs.h. */
18115#include <sys/epoll.h>
18116int
18117main ()
18118{
18119void *x=epoll_create
18120 ;
18121 return 0;
18122}
18123_ACEOF
18124rm -f conftest.$ac_objext
18125if { (ac_try="$ac_compile"
18126case "(($ac_try" in
18127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18128 *) ac_try_echo=$ac_try;;
18129esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018131 (eval "$ac_compile") 2>conftest.er1
18132 ac_status=$?
18133 grep -v '^ *+' conftest.er1 >conftest.err
18134 rm -f conftest.er1
18135 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018137 (exit $ac_status); } && {
18138 test -z "$ac_c_werror_flag" ||
18139 test ! -s conftest.err
18140 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018141
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018142cat >>confdefs.h <<\_ACEOF
18143#define HAVE_EPOLL 1
18144_ACEOF
18145
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018146 { echo "$as_me:$LINENO: result: yes" >&5
18147echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018148else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018149 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018150sed 's/^/| /' conftest.$ac_ext >&5
18151
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018152 { echo "$as_me:$LINENO: result: no" >&5
18153echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018154
18155fi
18156
18157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018158{ echo "$as_me:$LINENO: checking for kqueue" >&5
18159echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018160cat >conftest.$ac_ext <<_ACEOF
18161/* confdefs.h. */
18162_ACEOF
18163cat confdefs.h >>conftest.$ac_ext
18164cat >>conftest.$ac_ext <<_ACEOF
18165/* end confdefs.h. */
18166
18167#include <sys/types.h>
18168#include <sys/event.h>
18169
18170int
18171main ()
18172{
18173int x=kqueue()
18174 ;
18175 return 0;
18176}
18177_ACEOF
18178rm -f conftest.$ac_objext
18179if { (ac_try="$ac_compile"
18180case "(($ac_try" in
18181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18182 *) ac_try_echo=$ac_try;;
18183esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018185 (eval "$ac_compile") 2>conftest.er1
18186 ac_status=$?
18187 grep -v '^ *+' conftest.er1 >conftest.err
18188 rm -f conftest.er1
18189 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018191 (exit $ac_status); } && {
18192 test -z "$ac_c_werror_flag" ||
18193 test ! -s conftest.err
18194 } && test -s conftest.$ac_objext; then
18195
18196cat >>confdefs.h <<\_ACEOF
18197#define HAVE_KQUEUE 1
18198_ACEOF
18199
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018200 { echo "$as_me:$LINENO: result: yes" >&5
18201echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018202else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018203 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018204sed 's/^/| /' conftest.$ac_ext >&5
18205
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018206 { echo "$as_me:$LINENO: result: no" >&5
18207echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018208
18209fi
18210
18211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018212# On some systems (eg. FreeBSD 5), we would find a definition of the
18213# functions ctermid_r, setgroups in the library, but no prototype
18214# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18215# address to avoid compiler warnings and potential miscompilations
18216# because of the missing prototypes.
18217
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018218{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18219echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018220cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018221/* confdefs.h. */
18222_ACEOF
18223cat confdefs.h >>conftest.$ac_ext
18224cat >>conftest.$ac_ext <<_ACEOF
18225/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018226
18227#include "confdefs.h"
18228#include <stdio.h>
18229
Martin v. Löwisd5843682002-11-21 20:41:28 +000018230int
18231main ()
18232{
18233void* p = ctermid_r
18234 ;
18235 return 0;
18236}
18237_ACEOF
18238rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018239if { (ac_try="$ac_compile"
18240case "(($ac_try" in
18241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18242 *) ac_try_echo=$ac_try;;
18243esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018245 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018246 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018247 grep -v '^ *+' conftest.er1 >conftest.err
18248 rm -f conftest.er1
18249 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018251 (exit $ac_status); } && {
18252 test -z "$ac_c_werror_flag" ||
18253 test ! -s conftest.err
18254 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018255
18256cat >>confdefs.h <<\_ACEOF
18257#define HAVE_CTERMID_R 1
18258_ACEOF
18259
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018260 { echo "$as_me:$LINENO: result: yes" >&5
18261echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018262else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018263 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018264sed 's/^/| /' conftest.$ac_ext >&5
18265
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018266 { echo "$as_me:$LINENO: result: no" >&5
18267echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018268
18269fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018270
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18272
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018273{ echo "$as_me:$LINENO: checking for flock" >&5
18274echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018275cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018276/* confdefs.h. */
18277_ACEOF
18278cat confdefs.h >>conftest.$ac_ext
18279cat >>conftest.$ac_ext <<_ACEOF
18280/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018281
18282#include "confdefs.h"
18283#include <sys/file.h>
18284
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018285int
18286main ()
18287{
18288void* p = flock
18289 ;
18290 return 0;
18291}
18292_ACEOF
18293rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018294if { (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
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018300 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018301 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018302 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
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018306 (exit $ac_status); } && {
18307 test -z "$ac_c_werror_flag" ||
18308 test ! -s conftest.err
18309 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018310
18311cat >>confdefs.h <<\_ACEOF
18312#define HAVE_FLOCK 1
18313_ACEOF
18314
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018315 { echo "$as_me:$LINENO: result: yes" >&5
18316echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018317else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +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; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018323
18324fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018325
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18327
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018328{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18329echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018330cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018331/* confdefs.h. */
18332_ACEOF
18333cat confdefs.h >>conftest.$ac_ext
18334cat >>conftest.$ac_ext <<_ACEOF
18335/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018336
18337#include "confdefs.h"
18338#include <unistd.h>
18339
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018340int
18341main ()
18342{
18343void* p = getpagesize
18344 ;
18345 return 0;
18346}
18347_ACEOF
18348rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018349if { (ac_try="$ac_compile"
18350case "(($ac_try" in
18351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18352 *) ac_try_echo=$ac_try;;
18353esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018355 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018357 grep -v '^ *+' conftest.er1 >conftest.err
18358 rm -f conftest.er1
18359 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018361 (exit $ac_status); } && {
18362 test -z "$ac_c_werror_flag" ||
18363 test ! -s conftest.err
18364 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018365
18366cat >>confdefs.h <<\_ACEOF
18367#define HAVE_GETPAGESIZE 1
18368_ACEOF
18369
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018370 { echo "$as_me:$LINENO: result: yes" >&5
18371echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018372else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018374sed 's/^/| /' conftest.$ac_ext >&5
18375
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018376 { echo "$as_me:$LINENO: result: no" >&5
18377echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018378
18379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018380
18381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018382
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018383for ac_prog in true
18384do
18385 # Extract the first word of "$ac_prog", so it can be a program name with args.
18386set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018387{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18388echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018389if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018390 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018391else
18392 if test -n "$TRUE"; then
18393 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18394else
18395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18396for as_dir in $PATH
18397do
18398 IFS=$as_save_IFS
18399 test -z "$as_dir" && as_dir=.
18400 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018401 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 +000018402 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018403 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018404 break 2
18405 fi
18406done
18407done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018408IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018409
18410fi
18411fi
18412TRUE=$ac_cv_prog_TRUE
18413if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018414 { echo "$as_me:$LINENO: result: $TRUE" >&5
18415echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018416else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018417 { echo "$as_me:$LINENO: result: no" >&5
18418echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018419fi
18420
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018421
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018422 test -n "$TRUE" && break
18423done
18424test -n "$TRUE" || TRUE="/bin/true"
18425
18426
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018427{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18428echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018429if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018430 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018431else
18432 ac_check_lib_save_LIBS=$LIBS
18433LIBS="-lc $LIBS"
18434cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018435/* confdefs.h. */
18436_ACEOF
18437cat confdefs.h >>conftest.$ac_ext
18438cat >>conftest.$ac_ext <<_ACEOF
18439/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018441/* Override any GCC internal prototype to avoid an error.
18442 Use char because int might match the return type of a GCC
18443 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018444#ifdef __cplusplus
18445extern "C"
18446#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018447char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018448int
18449main ()
18450{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018451return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018452 ;
18453 return 0;
18454}
18455_ACEOF
18456rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018457if { (ac_try="$ac_link"
18458case "(($ac_try" in
18459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18460 *) ac_try_echo=$ac_try;;
18461esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018463 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018464 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018465 grep -v '^ *+' conftest.er1 >conftest.err
18466 rm -f conftest.er1
18467 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018469 (exit $ac_status); } && {
18470 test -z "$ac_c_werror_flag" ||
18471 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018472 } && test -s conftest$ac_exeext &&
18473 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018474 ac_cv_lib_c_inet_aton=yes
18475else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018477sed 's/^/| /' conftest.$ac_ext >&5
18478
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018479 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018481
18482rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018483 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018484LIBS=$ac_check_lib_save_LIBS
18485fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018486{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18487echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18488if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018489 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018490else
18491
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018492{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18493echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018494if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018495 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018496else
18497 ac_check_lib_save_LIBS=$LIBS
18498LIBS="-lresolv $LIBS"
18499cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018500/* confdefs.h. */
18501_ACEOF
18502cat confdefs.h >>conftest.$ac_ext
18503cat >>conftest.$ac_ext <<_ACEOF
18504/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018506/* Override any GCC internal prototype to avoid an error.
18507 Use char because int might match the return type of a GCC
18508 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018509#ifdef __cplusplus
18510extern "C"
18511#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018512char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018513int
18514main ()
18515{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018516return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018517 ;
18518 return 0;
18519}
18520_ACEOF
18521rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018522if { (ac_try="$ac_link"
18523case "(($ac_try" in
18524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18525 *) ac_try_echo=$ac_try;;
18526esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018528 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018530 grep -v '^ *+' conftest.er1 >conftest.err
18531 rm -f conftest.er1
18532 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018534 (exit $ac_status); } && {
18535 test -z "$ac_c_werror_flag" ||
18536 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018537 } && test -s conftest$ac_exeext &&
18538 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018539 ac_cv_lib_resolv_inet_aton=yes
18540else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018542sed 's/^/| /' conftest.$ac_ext >&5
18543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018544 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018546
18547rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018548 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018549LIBS=$ac_check_lib_save_LIBS
18550fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018551{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18552echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18553if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018554 cat >>confdefs.h <<_ACEOF
18555#define HAVE_LIBRESOLV 1
18556_ACEOF
18557
18558 LIBS="-lresolv $LIBS"
18559
18560fi
18561
18562
18563fi
18564
18565
Christian Heimesd0764e22007-12-04 15:00:33 +000018566# On Tru64, chflags seems to be present, but calling it will
18567# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018568{ echo "$as_me:$LINENO: checking for chflags" >&5
18569echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018570if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018571 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018572else
18573 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018574 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018575else
18576 cat >conftest.$ac_ext <<_ACEOF
18577/* confdefs.h. */
18578_ACEOF
18579cat confdefs.h >>conftest.$ac_ext
18580cat >>conftest.$ac_ext <<_ACEOF
18581/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018582[
Christian Heimesd0764e22007-12-04 15:00:33 +000018583#include <sys/stat.h>
18584#include <unistd.h>
18585int main(int argc, char*argv[])
18586{
18587 if(chflags(argv[0], 0) != 0)
18588 return 1;
18589 return 0;
18590}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018591]
Christian Heimesd0764e22007-12-04 15:00:33 +000018592_ACEOF
18593rm -f conftest$ac_exeext
18594if { (ac_try="$ac_link"
18595case "(($ac_try" in
18596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18597 *) ac_try_echo=$ac_try;;
18598esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018600 (eval "$ac_link") 2>&5
18601 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018603 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18604 { (case "(($ac_try" in
18605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18606 *) ac_try_echo=$ac_try;;
18607esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018609 (eval "$ac_try") 2>&5
18610 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018612 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018613 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018614else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018615 echo "$as_me: program exited with status $ac_status" >&5
18616echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018617sed 's/^/| /' conftest.$ac_ext >&5
18618
18619( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018620ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018621fi
18622rm -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 +000018623fi
18624
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018625
18626
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018627fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018628{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18629echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018630if test "$ac_cv_have_chflags" = cross ; then
18631 { echo "$as_me:$LINENO: checking for chflags" >&5
18632echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
18633if test "${ac_cv_func_chflags+set}" = set; then
18634 echo $ECHO_N "(cached) $ECHO_C" >&6
18635else
18636 cat >conftest.$ac_ext <<_ACEOF
18637/* confdefs.h. */
18638_ACEOF
18639cat confdefs.h >>conftest.$ac_ext
18640cat >>conftest.$ac_ext <<_ACEOF
18641/* end confdefs.h. */
18642/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
18643 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18644#define chflags innocuous_chflags
18645
18646/* System header to define __stub macros and hopefully few prototypes,
18647 which can conflict with char chflags (); below.
18648 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18649 <limits.h> exists even on freestanding compilers. */
18650
18651#ifdef __STDC__
18652# include <limits.h>
18653#else
18654# include <assert.h>
18655#endif
18656
18657#undef chflags
18658
18659/* Override any GCC internal prototype to avoid an error.
18660 Use char because int might match the return type of a GCC
18661 builtin and then its argument prototype would still apply. */
18662#ifdef __cplusplus
18663extern "C"
18664#endif
18665char chflags ();
18666/* The GNU C library defines this for functions which it implements
18667 to always fail with ENOSYS. Some functions are actually named
18668 something starting with __ and the normal name is an alias. */
18669#if defined __stub_chflags || defined __stub___chflags
18670choke me
18671#endif
18672
18673int
18674main ()
18675{
18676return chflags ();
18677 ;
18678 return 0;
18679}
18680_ACEOF
18681rm -f conftest.$ac_objext conftest$ac_exeext
18682if { (ac_try="$ac_link"
18683case "(($ac_try" in
18684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18685 *) ac_try_echo=$ac_try;;
18686esac
18687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18688 (eval "$ac_link") 2>conftest.er1
18689 ac_status=$?
18690 grep -v '^ *+' conftest.er1 >conftest.err
18691 rm -f conftest.er1
18692 cat conftest.err >&5
18693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18694 (exit $ac_status); } && {
18695 test -z "$ac_c_werror_flag" ||
18696 test ! -s conftest.err
18697 } && test -s conftest$ac_exeext &&
18698 $as_test_x conftest$ac_exeext; then
18699 ac_cv_func_chflags=yes
18700else
18701 echo "$as_me: failed program was:" >&5
18702sed 's/^/| /' conftest.$ac_ext >&5
18703
18704 ac_cv_func_chflags=no
18705fi
18706
18707rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18708 conftest$ac_exeext conftest.$ac_ext
18709fi
18710{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
18711echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
18712if test $ac_cv_func_chflags = yes; then
18713 ac_cv_have_chflags="yes"
18714else
18715 ac_cv_have_chflags="no"
18716fi
18717
18718fi
18719if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018720
18721cat >>confdefs.h <<\_ACEOF
18722#define HAVE_CHFLAGS 1
18723_ACEOF
18724
18725fi
18726
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018727{ echo "$as_me:$LINENO: checking for lchflags" >&5
18728echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018729if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018730 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018731else
18732 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018733 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018734else
18735 cat >conftest.$ac_ext <<_ACEOF
18736/* confdefs.h. */
18737_ACEOF
18738cat confdefs.h >>conftest.$ac_ext
18739cat >>conftest.$ac_ext <<_ACEOF
18740/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018741[
Christian Heimesd0764e22007-12-04 15:00:33 +000018742#include <sys/stat.h>
18743#include <unistd.h>
18744int main(int argc, char*argv[])
18745{
18746 if(lchflags(argv[0], 0) != 0)
18747 return 1;
18748 return 0;
18749}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018750]
Christian Heimesd0764e22007-12-04 15:00:33 +000018751_ACEOF
18752rm -f conftest$ac_exeext
18753if { (ac_try="$ac_link"
18754case "(($ac_try" in
18755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18756 *) ac_try_echo=$ac_try;;
18757esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018759 (eval "$ac_link") 2>&5
18760 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018762 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18763 { (case "(($ac_try" in
18764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18765 *) ac_try_echo=$ac_try;;
18766esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018768 (eval "$ac_try") 2>&5
18769 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018771 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018772 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018773else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018774 echo "$as_me: program exited with status $ac_status" >&5
18775echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018776sed 's/^/| /' conftest.$ac_ext >&5
18777
18778( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018779ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018780fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18782fi
18783
18784
Christian Heimesd0764e22007-12-04 15:00:33 +000018785
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018786fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018787{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18788echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018789if test "$ac_cv_have_lchflags" = cross ; then
18790 { echo "$as_me:$LINENO: checking for lchflags" >&5
18791echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
18792if test "${ac_cv_func_lchflags+set}" = set; then
18793 echo $ECHO_N "(cached) $ECHO_C" >&6
18794else
18795 cat >conftest.$ac_ext <<_ACEOF
18796/* confdefs.h. */
18797_ACEOF
18798cat confdefs.h >>conftest.$ac_ext
18799cat >>conftest.$ac_ext <<_ACEOF
18800/* end confdefs.h. */
18801/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
18802 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18803#define lchflags innocuous_lchflags
18804
18805/* System header to define __stub macros and hopefully few prototypes,
18806 which can conflict with char lchflags (); below.
18807 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18808 <limits.h> exists even on freestanding compilers. */
18809
18810#ifdef __STDC__
18811# include <limits.h>
18812#else
18813# include <assert.h>
18814#endif
18815
18816#undef lchflags
18817
18818/* Override any GCC internal prototype to avoid an error.
18819 Use char because int might match the return type of a GCC
18820 builtin and then its argument prototype would still apply. */
18821#ifdef __cplusplus
18822extern "C"
18823#endif
18824char lchflags ();
18825/* The GNU C library defines this for functions which it implements
18826 to always fail with ENOSYS. Some functions are actually named
18827 something starting with __ and the normal name is an alias. */
18828#if defined __stub_lchflags || defined __stub___lchflags
18829choke me
18830#endif
18831
18832int
18833main ()
18834{
18835return lchflags ();
18836 ;
18837 return 0;
18838}
18839_ACEOF
18840rm -f conftest.$ac_objext conftest$ac_exeext
18841if { (ac_try="$ac_link"
18842case "(($ac_try" in
18843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18844 *) ac_try_echo=$ac_try;;
18845esac
18846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18847 (eval "$ac_link") 2>conftest.er1
18848 ac_status=$?
18849 grep -v '^ *+' conftest.er1 >conftest.err
18850 rm -f conftest.er1
18851 cat conftest.err >&5
18852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18853 (exit $ac_status); } && {
18854 test -z "$ac_c_werror_flag" ||
18855 test ! -s conftest.err
18856 } && test -s conftest$ac_exeext &&
18857 $as_test_x conftest$ac_exeext; then
18858 ac_cv_func_lchflags=yes
18859else
18860 echo "$as_me: failed program was:" >&5
18861sed 's/^/| /' conftest.$ac_ext >&5
18862
18863 ac_cv_func_lchflags=no
18864fi
18865
18866rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18867 conftest$ac_exeext conftest.$ac_ext
18868fi
18869{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
18870echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
18871if test $ac_cv_func_lchflags = yes; then
18872 ac_cv_have_lchflags="yes"
18873else
18874 ac_cv_have_lchflags="no"
18875fi
18876
18877fi
18878if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018879
18880cat >>confdefs.h <<\_ACEOF
18881#define HAVE_LCHFLAGS 1
18882_ACEOF
18883
18884fi
18885
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018886case $ac_sys_system/$ac_sys_release in
18887Darwin/*)
18888 _CUR_CFLAGS="${CFLAGS}"
18889 _CUR_LDFLAGS="${LDFLAGS}"
18890 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18891 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18892 ;;
18893esac
18894
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018895{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18896echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018897if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018898 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018899else
18900 ac_check_lib_save_LIBS=$LIBS
18901LIBS="-lz $LIBS"
18902cat >conftest.$ac_ext <<_ACEOF
18903/* confdefs.h. */
18904_ACEOF
18905cat confdefs.h >>conftest.$ac_ext
18906cat >>conftest.$ac_ext <<_ACEOF
18907/* end confdefs.h. */
18908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018909/* Override any GCC internal prototype to avoid an error.
18910 Use char because int might match the return type of a GCC
18911 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018912#ifdef __cplusplus
18913extern "C"
18914#endif
18915char inflateCopy ();
18916int
18917main ()
18918{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018919return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018920 ;
18921 return 0;
18922}
18923_ACEOF
18924rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018925if { (ac_try="$ac_link"
18926case "(($ac_try" in
18927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18928 *) ac_try_echo=$ac_try;;
18929esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018931 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018932 ac_status=$?
18933 grep -v '^ *+' conftest.er1 >conftest.err
18934 rm -f conftest.er1
18935 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018937 (exit $ac_status); } && {
18938 test -z "$ac_c_werror_flag" ||
18939 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018940 } && test -s conftest$ac_exeext &&
18941 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018942 ac_cv_lib_z_inflateCopy=yes
18943else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018944 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018945sed 's/^/| /' conftest.$ac_ext >&5
18946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018947 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018949
18950rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018951 conftest$ac_exeext conftest.$ac_ext
18952LIBS=$ac_check_lib_save_LIBS
18953fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018954{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18955echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18956if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018957
18958cat >>confdefs.h <<\_ACEOF
18959#define HAVE_ZLIB_COPY 1
18960_ACEOF
18961
18962fi
18963
18964
18965case $ac_sys_system/$ac_sys_release in
18966Darwin/*)
18967 CFLAGS="${_CUR_CFLAGS}"
18968 LDFLAGS="${_CUR_LDFLAGS}"
18969 ;;
18970esac
18971
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018972{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18973echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018974cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018975/* confdefs.h. */
18976_ACEOF
18977cat confdefs.h >>conftest.$ac_ext
18978cat >>conftest.$ac_ext <<_ACEOF
18979/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018980
18981#include "confdefs.h"
18982#include <netdb.h>
18983
Martin v. Löwise9416172003-05-03 10:12:45 +000018984int
18985main ()
18986{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018987void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018988 ;
18989 return 0;
18990}
18991_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018992rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018993if { (ac_try="$ac_link"
18994case "(($ac_try" in
18995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18996 *) ac_try_echo=$ac_try;;
18997esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018999 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019000 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019001 grep -v '^ *+' conftest.er1 >conftest.err
19002 rm -f conftest.er1
19003 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019005 (exit $ac_status); } && {
19006 test -z "$ac_c_werror_flag" ||
19007 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019008 } && test -s conftest$ac_exeext &&
19009 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019010
19011cat >>confdefs.h <<\_ACEOF
19012#define HAVE_HSTRERROR 1
19013_ACEOF
19014
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019015 { echo "$as_me:$LINENO: result: yes" >&5
19016echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019017else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019019sed 's/^/| /' conftest.$ac_ext >&5
19020
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019021 { echo "$as_me:$LINENO: result: no" >&5
19022echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019023
19024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019025
19026rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019027 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019028
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019029{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19030echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019031cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019032/* confdefs.h. */
19033_ACEOF
19034cat confdefs.h >>conftest.$ac_ext
19035cat >>conftest.$ac_ext <<_ACEOF
19036/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019037
19038#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019039#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019040#include <sys/socket.h>
19041#include <netinet/in.h>
19042#include <arpa/inet.h>
19043
Martin v. Löwise9416172003-05-03 10:12:45 +000019044int
19045main ()
19046{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019047void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019048 ;
19049 return 0;
19050}
19051_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019052rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019053if { (ac_try="$ac_link"
19054case "(($ac_try" in
19055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19056 *) ac_try_echo=$ac_try;;
19057esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019059 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019061 grep -v '^ *+' conftest.er1 >conftest.err
19062 rm -f conftest.er1
19063 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019065 (exit $ac_status); } && {
19066 test -z "$ac_c_werror_flag" ||
19067 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019068 } && test -s conftest$ac_exeext &&
19069 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019070
19071cat >>confdefs.h <<\_ACEOF
19072#define HAVE_INET_ATON 1
19073_ACEOF
19074
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019075 { echo "$as_me:$LINENO: result: yes" >&5
19076echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019077else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019079sed 's/^/| /' conftest.$ac_ext >&5
19080
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019081 { echo "$as_me:$LINENO: result: no" >&5
19082echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019083
19084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019085
19086rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019087 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019088
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019089{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19090echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019091cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019092/* confdefs.h. */
19093_ACEOF
19094cat confdefs.h >>conftest.$ac_ext
19095cat >>conftest.$ac_ext <<_ACEOF
19096/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019097
19098#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019099#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019100#include <sys/socket.h>
19101#include <netinet/in.h>
19102#include <arpa/inet.h>
19103
Martin v. Löwise9416172003-05-03 10:12:45 +000019104int
19105main ()
19106{
19107void* p = inet_pton
19108 ;
19109 return 0;
19110}
19111_ACEOF
19112rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019113if { (ac_try="$ac_compile"
19114case "(($ac_try" in
19115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19116 *) ac_try_echo=$ac_try;;
19117esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019119 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019121 grep -v '^ *+' conftest.er1 >conftest.err
19122 rm -f conftest.er1
19123 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019125 (exit $ac_status); } && {
19126 test -z "$ac_c_werror_flag" ||
19127 test ! -s conftest.err
19128 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019129
19130cat >>confdefs.h <<\_ACEOF
19131#define HAVE_INET_PTON 1
19132_ACEOF
19133
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019134 { echo "$as_me:$LINENO: result: yes" >&5
19135echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019136else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019138sed 's/^/| /' conftest.$ac_ext >&5
19139
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019140 { echo "$as_me:$LINENO: result: no" >&5
19141echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019142
19143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019144
19145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019146
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019147# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019148{ echo "$as_me:$LINENO: checking for setgroups" >&5
19149echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019150cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019151/* confdefs.h. */
19152_ACEOF
19153cat confdefs.h >>conftest.$ac_ext
19154cat >>conftest.$ac_ext <<_ACEOF
19155/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019156
19157#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019158#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019159#ifdef HAVE_GRP_H
19160#include <grp.h>
19161#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019162
Martin v. Löwisd5843682002-11-21 20:41:28 +000019163int
19164main ()
19165{
19166void* p = setgroups
19167 ;
19168 return 0;
19169}
19170_ACEOF
19171rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019172if { (ac_try="$ac_compile"
19173case "(($ac_try" in
19174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19175 *) ac_try_echo=$ac_try;;
19176esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019178 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019179 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019180 grep -v '^ *+' conftest.er1 >conftest.err
19181 rm -f conftest.er1
19182 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019184 (exit $ac_status); } && {
19185 test -z "$ac_c_werror_flag" ||
19186 test ! -s conftest.err
19187 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019188
19189cat >>confdefs.h <<\_ACEOF
19190#define HAVE_SETGROUPS 1
19191_ACEOF
19192
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019193 { echo "$as_me:$LINENO: result: yes" >&5
19194echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019195else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019197sed 's/^/| /' conftest.$ac_ext >&5
19198
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019199 { echo "$as_me:$LINENO: result: no" >&5
19200echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019201
19202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019203
19204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019205
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019206# check for openpty and forkpty
19207
Martin v. Löwis11437992002-04-12 09:54:03 +000019208
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019209for ac_func in openpty
19210do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019211as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19212{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19213echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019214if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019215 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019216else
Martin v. Löwis11437992002-04-12 09:54:03 +000019217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019218/* confdefs.h. */
19219_ACEOF
19220cat confdefs.h >>conftest.$ac_ext
19221cat >>conftest.$ac_ext <<_ACEOF
19222/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019223/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19224 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19225#define $ac_func innocuous_$ac_func
19226
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019227/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019228 which can conflict with char $ac_func (); below.
19229 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019230 <limits.h> exists even on freestanding compilers. */
19231
19232#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019233# include <limits.h>
19234#else
19235# include <assert.h>
19236#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019237
19238#undef $ac_func
19239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019240/* Override any GCC internal prototype to avoid an error.
19241 Use char because int might match the return type of a GCC
19242 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019243#ifdef __cplusplus
19244extern "C"
19245#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019246char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019247/* The GNU C library defines this for functions which it implements
19248 to always fail with ENOSYS. Some functions are actually named
19249 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019250#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019251choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019252#endif
19253
Skip Montanaro6dead952003-09-25 14:50:04 +000019254int
19255main ()
19256{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019257return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019258 ;
19259 return 0;
19260}
19261_ACEOF
19262rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019263if { (ac_try="$ac_link"
19264case "(($ac_try" in
19265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19266 *) ac_try_echo=$ac_try;;
19267esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019269 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019270 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019271 grep -v '^ *+' conftest.er1 >conftest.err
19272 rm -f conftest.er1
19273 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019275 (exit $ac_status); } && {
19276 test -z "$ac_c_werror_flag" ||
19277 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019278 } && test -s conftest$ac_exeext &&
19279 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019280 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019281else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019282 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019283sed 's/^/| /' conftest.$ac_ext >&5
19284
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019285 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019287
19288rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019289 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019290fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019291ac_res=`eval echo '${'$as_ac_var'}'`
19292 { echo "$as_me:$LINENO: result: $ac_res" >&5
19293echo "${ECHO_T}$ac_res" >&6; }
19294if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019295 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019296#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019297_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019298
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019299else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019300 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19301echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019302if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019303 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019304else
Martin v. Löwis11437992002-04-12 09:54:03 +000019305 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019306LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019307cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019308/* confdefs.h. */
19309_ACEOF
19310cat confdefs.h >>conftest.$ac_ext
19311cat >>conftest.$ac_ext <<_ACEOF
19312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019314/* Override any GCC internal prototype to avoid an error.
19315 Use char because int might match the return type of a GCC
19316 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019317#ifdef __cplusplus
19318extern "C"
19319#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019320char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019321int
19322main ()
19323{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019324return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019325 ;
19326 return 0;
19327}
19328_ACEOF
19329rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019330if { (ac_try="$ac_link"
19331case "(($ac_try" in
19332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19333 *) ac_try_echo=$ac_try;;
19334esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019336 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019337 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019338 grep -v '^ *+' conftest.er1 >conftest.err
19339 rm -f conftest.er1
19340 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019342 (exit $ac_status); } && {
19343 test -z "$ac_c_werror_flag" ||
19344 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019345 } && test -s conftest$ac_exeext &&
19346 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019347 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019348else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019350sed 's/^/| /' conftest.$ac_ext >&5
19351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019352 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019354
19355rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019356 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019357LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019358fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019359{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19360echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19361if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019362 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019363#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019364_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019365 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019366else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019367 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19368echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019369if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019370 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019371else
19372 ac_check_lib_save_LIBS=$LIBS
19373LIBS="-lbsd $LIBS"
19374cat >conftest.$ac_ext <<_ACEOF
19375/* confdefs.h. */
19376_ACEOF
19377cat confdefs.h >>conftest.$ac_ext
19378cat >>conftest.$ac_ext <<_ACEOF
19379/* end confdefs.h. */
19380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019381/* Override any GCC internal prototype to avoid an error.
19382 Use char because int might match the return type of a GCC
19383 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019384#ifdef __cplusplus
19385extern "C"
19386#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019387char openpty ();
19388int
19389main ()
19390{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019391return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019392 ;
19393 return 0;
19394}
19395_ACEOF
19396rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019397if { (ac_try="$ac_link"
19398case "(($ac_try" in
19399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19400 *) ac_try_echo=$ac_try;;
19401esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019403 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019404 ac_status=$?
19405 grep -v '^ *+' conftest.er1 >conftest.err
19406 rm -f conftest.er1
19407 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019409 (exit $ac_status); } && {
19410 test -z "$ac_c_werror_flag" ||
19411 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019412 } && test -s conftest$ac_exeext &&
19413 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019414 ac_cv_lib_bsd_openpty=yes
19415else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019416 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019417sed 's/^/| /' conftest.$ac_ext >&5
19418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019419 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019421
19422rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019423 conftest$ac_exeext conftest.$ac_ext
19424LIBS=$ac_check_lib_save_LIBS
19425fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019426{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19427echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19428if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019429 cat >>confdefs.h <<\_ACEOF
19430#define HAVE_OPENPTY 1
19431_ACEOF
19432 LIBS="$LIBS -lbsd"
19433fi
19434
19435
19436fi
19437
Fred Drake8cef4cf2000-06-28 16:40:38 +000019438
19439fi
19440done
19441
Martin v. Löwis11437992002-04-12 09:54:03 +000019442
Fred Drake8cef4cf2000-06-28 16:40:38 +000019443for ac_func in forkpty
19444do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019445as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19446{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19447echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019448if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019449 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019450else
Martin v. Löwis11437992002-04-12 09:54:03 +000019451 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019452/* confdefs.h. */
19453_ACEOF
19454cat confdefs.h >>conftest.$ac_ext
19455cat >>conftest.$ac_ext <<_ACEOF
19456/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019457/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19458 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19459#define $ac_func innocuous_$ac_func
19460
Fred Drake8cef4cf2000-06-28 16:40:38 +000019461/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019462 which can conflict with char $ac_func (); below.
19463 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019464 <limits.h> exists even on freestanding compilers. */
19465
19466#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019467# include <limits.h>
19468#else
19469# include <assert.h>
19470#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019471
19472#undef $ac_func
19473
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019474/* Override any GCC internal prototype to avoid an error.
19475 Use char because int might match the return type of a GCC
19476 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019477#ifdef __cplusplus
19478extern "C"
19479#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019480char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019481/* The GNU C library defines this for functions which it implements
19482 to always fail with ENOSYS. Some functions are actually named
19483 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019484#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019485choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019486#endif
19487
Skip Montanaro6dead952003-09-25 14:50:04 +000019488int
19489main ()
19490{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019491return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019492 ;
19493 return 0;
19494}
19495_ACEOF
19496rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019497if { (ac_try="$ac_link"
19498case "(($ac_try" in
19499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19500 *) ac_try_echo=$ac_try;;
19501esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019503 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019504 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019505 grep -v '^ *+' conftest.er1 >conftest.err
19506 rm -f conftest.er1
19507 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019509 (exit $ac_status); } && {
19510 test -z "$ac_c_werror_flag" ||
19511 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019512 } && test -s conftest$ac_exeext &&
19513 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019514 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019515else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019517sed 's/^/| /' conftest.$ac_ext >&5
19518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019519 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019521
19522rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019523 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019524fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019525ac_res=`eval echo '${'$as_ac_var'}'`
19526 { echo "$as_me:$LINENO: result: $ac_res" >&5
19527echo "${ECHO_T}$ac_res" >&6; }
19528if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019529 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019530#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019531_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019532
Fred Drake8cef4cf2000-06-28 16:40:38 +000019533else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019534 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19535echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019536if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019537 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019538else
Martin v. Löwis11437992002-04-12 09:54:03 +000019539 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019540LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019541cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019542/* confdefs.h. */
19543_ACEOF
19544cat confdefs.h >>conftest.$ac_ext
19545cat >>conftest.$ac_ext <<_ACEOF
19546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019547
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019548/* Override any GCC internal prototype to avoid an error.
19549 Use char because int might match the return type of a GCC
19550 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019551#ifdef __cplusplus
19552extern "C"
19553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019554char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019555int
19556main ()
19557{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019558return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019559 ;
19560 return 0;
19561}
19562_ACEOF
19563rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019564if { (ac_try="$ac_link"
19565case "(($ac_try" in
19566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19567 *) ac_try_echo=$ac_try;;
19568esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019570 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019571 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019572 grep -v '^ *+' conftest.er1 >conftest.err
19573 rm -f conftest.er1
19574 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019576 (exit $ac_status); } && {
19577 test -z "$ac_c_werror_flag" ||
19578 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019579 } && test -s conftest$ac_exeext &&
19580 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019581 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019582else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019584sed 's/^/| /' conftest.$ac_ext >&5
19585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019586 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019588
19589rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019590 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019591LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019592fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019593{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19594echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19595if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019596 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019597#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019598_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019599 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019600else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019601 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19602echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019603if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019604 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019605else
19606 ac_check_lib_save_LIBS=$LIBS
19607LIBS="-lbsd $LIBS"
19608cat >conftest.$ac_ext <<_ACEOF
19609/* confdefs.h. */
19610_ACEOF
19611cat confdefs.h >>conftest.$ac_ext
19612cat >>conftest.$ac_ext <<_ACEOF
19613/* end confdefs.h. */
19614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019615/* Override any GCC internal prototype to avoid an error.
19616 Use char because int might match the return type of a GCC
19617 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019618#ifdef __cplusplus
19619extern "C"
19620#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019621char forkpty ();
19622int
19623main ()
19624{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019625return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019626 ;
19627 return 0;
19628}
19629_ACEOF
19630rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019631if { (ac_try="$ac_link"
19632case "(($ac_try" in
19633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19634 *) ac_try_echo=$ac_try;;
19635esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019637 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019638 ac_status=$?
19639 grep -v '^ *+' conftest.er1 >conftest.err
19640 rm -f conftest.er1
19641 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019643 (exit $ac_status); } && {
19644 test -z "$ac_c_werror_flag" ||
19645 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019646 } && test -s conftest$ac_exeext &&
19647 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019648 ac_cv_lib_bsd_forkpty=yes
19649else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019650 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019651sed 's/^/| /' conftest.$ac_ext >&5
19652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019653 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019655
19656rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019657 conftest$ac_exeext conftest.$ac_ext
19658LIBS=$ac_check_lib_save_LIBS
19659fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019660{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19661echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19662if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019663 cat >>confdefs.h <<\_ACEOF
19664#define HAVE_FORKPTY 1
19665_ACEOF
19666 LIBS="$LIBS -lbsd"
19667fi
19668
19669
19670fi
19671
Fred Drake8cef4cf2000-06-28 16:40:38 +000019672
19673fi
19674done
19675
Jack Jansendd19cf82001-12-06 22:36:17 +000019676
Christian Heimesb186d002008-03-18 15:15:01 +000019677# Stuff for expat.
19678
19679for ac_func in memmove
19680do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019681as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19682{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19683echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019684if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019685 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019686else
19687 cat >conftest.$ac_ext <<_ACEOF
19688/* confdefs.h. */
19689_ACEOF
19690cat confdefs.h >>conftest.$ac_ext
19691cat >>conftest.$ac_ext <<_ACEOF
19692/* end confdefs.h. */
19693/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19694 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19695#define $ac_func innocuous_$ac_func
19696
19697/* System header to define __stub macros and hopefully few prototypes,
19698 which can conflict with char $ac_func (); below.
19699 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19700 <limits.h> exists even on freestanding compilers. */
19701
19702#ifdef __STDC__
19703# include <limits.h>
19704#else
19705# include <assert.h>
19706#endif
19707
19708#undef $ac_func
19709
19710/* Override any GCC internal prototype to avoid an error.
19711 Use char because int might match the return type of a GCC
19712 builtin and then its argument prototype would still apply. */
19713#ifdef __cplusplus
19714extern "C"
19715#endif
19716char $ac_func ();
19717/* The GNU C library defines this for functions which it implements
19718 to always fail with ENOSYS. Some functions are actually named
19719 something starting with __ and the normal name is an alias. */
19720#if defined __stub_$ac_func || defined __stub___$ac_func
19721choke me
19722#endif
19723
19724int
19725main ()
19726{
19727return $ac_func ();
19728 ;
19729 return 0;
19730}
19731_ACEOF
19732rm -f conftest.$ac_objext conftest$ac_exeext
19733if { (ac_try="$ac_link"
19734case "(($ac_try" in
19735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19736 *) ac_try_echo=$ac_try;;
19737esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019739 (eval "$ac_link") 2>conftest.er1
19740 ac_status=$?
19741 grep -v '^ *+' conftest.er1 >conftest.err
19742 rm -f conftest.er1
19743 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019745 (exit $ac_status); } && {
19746 test -z "$ac_c_werror_flag" ||
19747 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019748 } && test -s conftest$ac_exeext &&
19749 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019750 eval "$as_ac_var=yes"
19751else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019752 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019753sed 's/^/| /' conftest.$ac_ext >&5
19754
19755 eval "$as_ac_var=no"
19756fi
19757
19758rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19759 conftest$ac_exeext conftest.$ac_ext
19760fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019761ac_res=`eval echo '${'$as_ac_var'}'`
19762 { echo "$as_me:$LINENO: result: $ac_res" >&5
19763echo "${ECHO_T}$ac_res" >&6; }
19764if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019765 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019766#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019767_ACEOF
19768
19769fi
19770done
19771
19772
Michael W. Hudson54241132001-12-07 15:38:26 +000019773# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019774
19775
19776
19777
19778
19779
Fred Drake8cef4cf2000-06-28 16:40:38 +000019780for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19781do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019782as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19783{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19784echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019785if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019786 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019787else
Martin v. Löwis11437992002-04-12 09:54:03 +000019788 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019789/* confdefs.h. */
19790_ACEOF
19791cat confdefs.h >>conftest.$ac_ext
19792cat >>conftest.$ac_ext <<_ACEOF
19793/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019794/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19795 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19796#define $ac_func innocuous_$ac_func
19797
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019798/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019799 which can conflict with char $ac_func (); below.
19800 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019801 <limits.h> exists even on freestanding compilers. */
19802
19803#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019804# include <limits.h>
19805#else
19806# include <assert.h>
19807#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019808
19809#undef $ac_func
19810
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019811/* Override any GCC internal prototype to avoid an error.
19812 Use char because int might match the return type of a GCC
19813 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019814#ifdef __cplusplus
19815extern "C"
19816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019817char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019818/* The GNU C library defines this for functions which it implements
19819 to always fail with ENOSYS. Some functions are actually named
19820 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019821#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019822choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019823#endif
19824
Skip Montanaro6dead952003-09-25 14:50:04 +000019825int
19826main ()
19827{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019828return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019829 ;
19830 return 0;
19831}
19832_ACEOF
19833rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019834if { (ac_try="$ac_link"
19835case "(($ac_try" in
19836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19837 *) ac_try_echo=$ac_try;;
19838esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019840 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019841 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019842 grep -v '^ *+' conftest.er1 >conftest.err
19843 rm -f conftest.er1
19844 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019846 (exit $ac_status); } && {
19847 test -z "$ac_c_werror_flag" ||
19848 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019849 } && test -s conftest$ac_exeext &&
19850 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019851 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019852else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019854sed 's/^/| /' conftest.$ac_ext >&5
19855
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019856 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019858
19859rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019860 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019861fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019862ac_res=`eval echo '${'$as_ac_var'}'`
19863 { echo "$as_me:$LINENO: result: $ac_res" >&5
19864echo "${ECHO_T}$ac_res" >&6; }
19865if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019866 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019867#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019868_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019869
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019870fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019871done
19872
Michael W. Hudson54241132001-12-07 15:38:26 +000019873
Martin v. Löwis11437992002-04-12 09:54:03 +000019874
19875
19876
Christian Heimesb186d002008-03-18 15:15:01 +000019877for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019878do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019879as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19880{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19881echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019882if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019883 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019884else
Martin v. Löwis11437992002-04-12 09:54:03 +000019885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019886/* confdefs.h. */
19887_ACEOF
19888cat confdefs.h >>conftest.$ac_ext
19889cat >>conftest.$ac_ext <<_ACEOF
19890/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019891/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19892 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19893#define $ac_func innocuous_$ac_func
19894
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019895/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019896 which can conflict with char $ac_func (); below.
19897 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019898 <limits.h> exists even on freestanding compilers. */
19899
19900#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019901# include <limits.h>
19902#else
19903# include <assert.h>
19904#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019905
19906#undef $ac_func
19907
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019908/* Override any GCC internal prototype to avoid an error.
19909 Use char because int might match the return type of a GCC
19910 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019911#ifdef __cplusplus
19912extern "C"
19913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019914char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019915/* The GNU C library defines this for functions which it implements
19916 to always fail with ENOSYS. Some functions are actually named
19917 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019918#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019919choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019920#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019921
Skip Montanaro6dead952003-09-25 14:50:04 +000019922int
19923main ()
19924{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019925return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019926 ;
19927 return 0;
19928}
19929_ACEOF
19930rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019931if { (ac_try="$ac_link"
19932case "(($ac_try" in
19933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19934 *) ac_try_echo=$ac_try;;
19935esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019937 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019938 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019939 grep -v '^ *+' conftest.er1 >conftest.err
19940 rm -f conftest.er1
19941 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019943 (exit $ac_status); } && {
19944 test -z "$ac_c_werror_flag" ||
19945 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019946 } && test -s conftest$ac_exeext &&
19947 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019948 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019949else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019951sed 's/^/| /' conftest.$ac_ext >&5
19952
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019953 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019955
19956rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019957 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019958fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019959ac_res=`eval echo '${'$as_ac_var'}'`
19960 { echo "$as_me:$LINENO: result: $ac_res" >&5
19961echo "${ECHO_T}$ac_res" >&6; }
19962if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019963 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019964#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019965_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019966
Martin v. Löwis1142de32002-03-29 16:28:31 +000019967else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019968 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019969 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019970 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19971 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019972esac
19973
Martin v. Löwis1142de32002-03-29 16:28:31 +000019974fi
19975done
19976
19977
Martin v. Löwis11437992002-04-12 09:54:03 +000019978
Martin v. Löwis1142de32002-03-29 16:28:31 +000019979for ac_func in getpgrp
19980do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019981as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19982{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19983echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019984if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019985 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019986else
Martin v. Löwis11437992002-04-12 09:54:03 +000019987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019988/* confdefs.h. */
19989_ACEOF
19990cat confdefs.h >>conftest.$ac_ext
19991cat >>conftest.$ac_ext <<_ACEOF
19992/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019993/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19994 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19995#define $ac_func innocuous_$ac_func
19996
Martin v. Löwis1142de32002-03-29 16:28:31 +000019997/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019998 which can conflict with char $ac_func (); below.
19999 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020000 <limits.h> exists even on freestanding compilers. */
20001
20002#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020003# include <limits.h>
20004#else
20005# include <assert.h>
20006#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020007
20008#undef $ac_func
20009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020010/* Override any GCC internal prototype to avoid an error.
20011 Use char because int might match the return type of a GCC
20012 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020013#ifdef __cplusplus
20014extern "C"
20015#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020016char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020017/* The GNU C library defines this for functions which it implements
20018 to always fail with ENOSYS. Some functions are actually named
20019 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020020#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020021choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020022#endif
20023
Skip Montanaro6dead952003-09-25 14:50:04 +000020024int
20025main ()
20026{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020027return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020028 ;
20029 return 0;
20030}
20031_ACEOF
20032rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020033if { (ac_try="$ac_link"
20034case "(($ac_try" in
20035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20036 *) ac_try_echo=$ac_try;;
20037esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020039 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020040 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020041 grep -v '^ *+' conftest.er1 >conftest.err
20042 rm -f conftest.er1
20043 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020045 (exit $ac_status); } && {
20046 test -z "$ac_c_werror_flag" ||
20047 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020048 } && test -s conftest$ac_exeext &&
20049 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020050 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020051else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020052 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020053sed 's/^/| /' conftest.$ac_ext >&5
20054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020055 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020057
20058rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020059 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020060fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020061ac_res=`eval echo '${'$as_ac_var'}'`
20062 { echo "$as_me:$LINENO: result: $ac_res" >&5
20063echo "${ECHO_T}$ac_res" >&6; }
20064if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020065 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020066#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020067_ACEOF
20068 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020069/* confdefs.h. */
20070_ACEOF
20071cat confdefs.h >>conftest.$ac_ext
20072cat >>conftest.$ac_ext <<_ACEOF
20073/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020074#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020075int
20076main ()
20077{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020078getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020079 ;
20080 return 0;
20081}
20082_ACEOF
20083rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020084if { (ac_try="$ac_compile"
20085case "(($ac_try" in
20086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20087 *) ac_try_echo=$ac_try;;
20088esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020090 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020091 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020092 grep -v '^ *+' conftest.er1 >conftest.err
20093 rm -f conftest.er1
20094 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020096 (exit $ac_status); } && {
20097 test -z "$ac_c_werror_flag" ||
20098 test ! -s conftest.err
20099 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020100
20101cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020102#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020103_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020104
Martin v. Löwis11437992002-04-12 09:54:03 +000020105
Guido van Rossumf78abae1997-01-21 22:02:36 +000020106else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020108sed 's/^/| /' conftest.$ac_ext >&5
20109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020110
Guido van Rossum627b2d71993-12-24 10:39:16 +000020111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020112
20113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020114
Guido van Rossum627b2d71993-12-24 10:39:16 +000020115fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020116done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020117
Jack Jansen150753c2003-03-29 22:07:47 +000020118
20119for ac_func in setpgrp
20120do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020121as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20122{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20123echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020124if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020125 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020126else
Martin v. Löwis11437992002-04-12 09:54:03 +000020127 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020128/* confdefs.h. */
20129_ACEOF
20130cat confdefs.h >>conftest.$ac_ext
20131cat >>conftest.$ac_ext <<_ACEOF
20132/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020133/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20134 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20135#define $ac_func innocuous_$ac_func
20136
Jack Jansen150753c2003-03-29 22:07:47 +000020137/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020138 which can conflict with char $ac_func (); below.
20139 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020140 <limits.h> exists even on freestanding compilers. */
20141
20142#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020143# include <limits.h>
20144#else
20145# include <assert.h>
20146#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020147
20148#undef $ac_func
20149
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020150/* Override any GCC internal prototype to avoid an error.
20151 Use char because int might match the return type of a GCC
20152 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020153#ifdef __cplusplus
20154extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020155#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020156char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020157/* The GNU C library defines this for functions which it implements
20158 to always fail with ENOSYS. Some functions are actually named
20159 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020160#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020161choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020162#endif
20163
Skip Montanaro6dead952003-09-25 14:50:04 +000020164int
20165main ()
20166{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020167return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020168 ;
20169 return 0;
20170}
20171_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020172rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020173if { (ac_try="$ac_link"
20174case "(($ac_try" in
20175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20176 *) ac_try_echo=$ac_try;;
20177esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020179 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020181 grep -v '^ *+' conftest.er1 >conftest.err
20182 rm -f conftest.er1
20183 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020185 (exit $ac_status); } && {
20186 test -z "$ac_c_werror_flag" ||
20187 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020188 } && test -s conftest$ac_exeext &&
20189 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020190 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020191else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020192 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020193sed 's/^/| /' conftest.$ac_ext >&5
20194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020195 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020197
20198rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020199 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020200fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020201ac_res=`eval echo '${'$as_ac_var'}'`
20202 { echo "$as_me:$LINENO: result: $ac_res" >&5
20203echo "${ECHO_T}$ac_res" >&6; }
20204if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020205 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020206#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020207_ACEOF
20208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020209/* confdefs.h. */
20210_ACEOF
20211cat confdefs.h >>conftest.$ac_ext
20212cat >>conftest.$ac_ext <<_ACEOF
20213/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020214#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020215int
20216main ()
20217{
20218setpgrp(0,0);
20219 ;
20220 return 0;
20221}
20222_ACEOF
20223rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020224if { (ac_try="$ac_compile"
20225case "(($ac_try" in
20226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20227 *) ac_try_echo=$ac_try;;
20228esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020230 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020231 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020232 grep -v '^ *+' conftest.er1 >conftest.err
20233 rm -f conftest.er1
20234 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020236 (exit $ac_status); } && {
20237 test -z "$ac_c_werror_flag" ||
20238 test ! -s conftest.err
20239 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020240
20241cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020242#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020243_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020244
Jack Jansen150753c2003-03-29 22:07:47 +000020245
20246else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020248sed 's/^/| /' conftest.$ac_ext >&5
20249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020250
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020252
20253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020254
20255fi
20256done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020257
Martin v. Löwis11437992002-04-12 09:54:03 +000020258
Thomas Wouters3a584202000-08-05 23:28:51 +000020259for ac_func in gettimeofday
20260do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020261as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20262{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20263echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020264if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020265 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020266else
Martin v. Löwis11437992002-04-12 09:54:03 +000020267 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020268/* confdefs.h. */
20269_ACEOF
20270cat confdefs.h >>conftest.$ac_ext
20271cat >>conftest.$ac_ext <<_ACEOF
20272/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020273/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20274 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20275#define $ac_func innocuous_$ac_func
20276
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020277/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020278 which can conflict with char $ac_func (); below.
20279 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020280 <limits.h> exists even on freestanding compilers. */
20281
20282#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020283# include <limits.h>
20284#else
20285# include <assert.h>
20286#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020287
20288#undef $ac_func
20289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020290/* Override any GCC internal prototype to avoid an error.
20291 Use char because int might match the return type of a GCC
20292 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020293#ifdef __cplusplus
20294extern "C"
20295#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020296char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020297/* The GNU C library defines this for functions which it implements
20298 to always fail with ENOSYS. Some functions are actually named
20299 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020300#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020301choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020302#endif
20303
Skip Montanaro6dead952003-09-25 14:50:04 +000020304int
20305main ()
20306{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020307return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020308 ;
20309 return 0;
20310}
20311_ACEOF
20312rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020313if { (ac_try="$ac_link"
20314case "(($ac_try" in
20315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20316 *) ac_try_echo=$ac_try;;
20317esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020319 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020321 grep -v '^ *+' conftest.er1 >conftest.err
20322 rm -f conftest.er1
20323 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020325 (exit $ac_status); } && {
20326 test -z "$ac_c_werror_flag" ||
20327 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020328 } && test -s conftest$ac_exeext &&
20329 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020330 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020331else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020332 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020333sed 's/^/| /' conftest.$ac_ext >&5
20334
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020335 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020337
20338rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020339 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020340fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020341ac_res=`eval echo '${'$as_ac_var'}'`
20342 { echo "$as_me:$LINENO: result: $ac_res" >&5
20343echo "${ECHO_T}$ac_res" >&6; }
20344if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020345 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020346#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020347_ACEOF
20348 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020349/* confdefs.h. */
20350_ACEOF
20351cat confdefs.h >>conftest.$ac_ext
20352cat >>conftest.$ac_ext <<_ACEOF
20353/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020354#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020355int
20356main ()
20357{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020358gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020359 ;
20360 return 0;
20361}
20362_ACEOF
20363rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020364if { (ac_try="$ac_compile"
20365case "(($ac_try" in
20366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20367 *) ac_try_echo=$ac_try;;
20368esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020370 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020372 grep -v '^ *+' conftest.er1 >conftest.err
20373 rm -f conftest.er1
20374 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020376 (exit $ac_status); } && {
20377 test -z "$ac_c_werror_flag" ||
20378 test ! -s conftest.err
20379 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020380 :
20381else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020383sed 's/^/| /' conftest.$ac_ext >&5
20384
Martin v. Löwis11437992002-04-12 09:54:03 +000020385
20386cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020387#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020388_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020389
Martin v. Löwis11437992002-04-12 09:54:03 +000020390
Guido van Rossum627b2d71993-12-24 10:39:16 +000020391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020392
20393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020394
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020395fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020396done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020397
Michael W. Hudson54241132001-12-07 15:38:26 +000020398
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020399{ echo "$as_me:$LINENO: checking for major" >&5
20400echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020401cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020402/* confdefs.h. */
20403_ACEOF
20404cat confdefs.h >>conftest.$ac_ext
20405cat >>conftest.$ac_ext <<_ACEOF
20406/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020407
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020408#if defined(MAJOR_IN_MKDEV)
20409#include <sys/mkdev.h>
20410#elif defined(MAJOR_IN_SYSMACROS)
20411#include <sys/sysmacros.h>
20412#else
20413#include <sys/types.h>
20414#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020415
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020416int
20417main ()
20418{
20419
20420 makedev(major(0),minor(0));
20421
20422 ;
20423 return 0;
20424}
20425_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020426rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020427if { (ac_try="$ac_link"
20428case "(($ac_try" in
20429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20430 *) ac_try_echo=$ac_try;;
20431esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020433 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020434 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020435 grep -v '^ *+' conftest.er1 >conftest.err
20436 rm -f conftest.er1
20437 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020439 (exit $ac_status); } && {
20440 test -z "$ac_c_werror_flag" ||
20441 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020442 } && test -s conftest$ac_exeext &&
20443 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020444
20445
20446cat >>confdefs.h <<\_ACEOF
20447#define HAVE_DEVICE_MACROS 1
20448_ACEOF
20449
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020450 { echo "$as_me:$LINENO: result: yes" >&5
20451echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020452
20453else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020455sed 's/^/| /' conftest.$ac_ext >&5
20456
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020457
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020458 { echo "$as_me:$LINENO: result: no" >&5
20459echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020460
20461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020462
20463rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020464 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020465
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020466# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020467# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020468{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20469echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020470cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020471/* confdefs.h. */
20472_ACEOF
20473cat confdefs.h >>conftest.$ac_ext
20474cat >>conftest.$ac_ext <<_ACEOF
20475/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020476
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020477#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020478#include <sys/socket.h>
20479#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020480#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020481
Martin v. Löwis11437992002-04-12 09:54:03 +000020482int
20483main ()
20484{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020485getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020486 ;
20487 return 0;
20488}
20489_ACEOF
20490rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020491if { (ac_try="$ac_link"
20492case "(($ac_try" in
20493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20494 *) ac_try_echo=$ac_try;;
20495esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020497 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020499 grep -v '^ *+' conftest.er1 >conftest.err
20500 rm -f conftest.er1
20501 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020503 (exit $ac_status); } && {
20504 test -z "$ac_c_werror_flag" ||
20505 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020506 } && test -s conftest$ac_exeext &&
20507 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020508 have_getaddrinfo=yes
20509else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020510 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020511sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020512
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020513 have_getaddrinfo=no
20514fi
20515
20516rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20517 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020518{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20519echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020520if test $have_getaddrinfo = yes
20521then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020522 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20523echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020524 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020525 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020526else
20527 if test "$cross_compiling" = yes; then
20528 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020529else
Martin v. Löwis11437992002-04-12 09:54:03 +000020530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020531/* confdefs.h. */
20532_ACEOF
20533cat confdefs.h >>conftest.$ac_ext
20534cat >>conftest.$ac_ext <<_ACEOF
20535/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020536
20537#include <sys/types.h>
20538#include <netdb.h>
20539#include <string.h>
20540#include <sys/socket.h>
20541#include <netinet/in.h>
20542
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020543int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020544{
20545 int passive, gaierr, inet4 = 0, inet6 = 0;
20546 struct addrinfo hints, *ai, *aitop;
20547 char straddr[INET6_ADDRSTRLEN], strport[16];
20548
20549 for (passive = 0; passive <= 1; passive++) {
20550 memset(&hints, 0, sizeof(hints));
20551 hints.ai_family = AF_UNSPEC;
20552 hints.ai_flags = passive ? AI_PASSIVE : 0;
20553 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020554 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020555 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20556 (void)gai_strerror(gaierr);
20557 goto bad;
20558 }
20559 for (ai = aitop; ai; ai = ai->ai_next) {
20560 if (ai->ai_addr == NULL ||
20561 ai->ai_addrlen == 0 ||
20562 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20563 straddr, sizeof(straddr), strport, sizeof(strport),
20564 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20565 goto bad;
20566 }
20567 switch (ai->ai_family) {
20568 case AF_INET:
20569 if (strcmp(strport, "54321") != 0) {
20570 goto bad;
20571 }
20572 if (passive) {
20573 if (strcmp(straddr, "0.0.0.0") != 0) {
20574 goto bad;
20575 }
20576 } else {
20577 if (strcmp(straddr, "127.0.0.1") != 0) {
20578 goto bad;
20579 }
20580 }
20581 inet4++;
20582 break;
20583 case AF_INET6:
20584 if (strcmp(strport, "54321") != 0) {
20585 goto bad;
20586 }
20587 if (passive) {
20588 if (strcmp(straddr, "::") != 0) {
20589 goto bad;
20590 }
20591 } else {
20592 if (strcmp(straddr, "::1") != 0) {
20593 goto bad;
20594 }
20595 }
20596 inet6++;
20597 break;
20598 case AF_UNSPEC:
20599 goto bad;
20600 break;
20601 default:
20602 /* another family support? */
20603 break;
20604 }
20605 }
20606 }
20607
20608 if (!(inet4 == 0 || inet4 == 2))
20609 goto bad;
20610 if (!(inet6 == 0 || inet6 == 2))
20611 goto bad;
20612
20613 if (aitop)
20614 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020615 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020616
20617 bad:
20618 if (aitop)
20619 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020620 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020621}
20622
Martin v. Löwis11437992002-04-12 09:54:03 +000020623_ACEOF
20624rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020625if { (ac_try="$ac_link"
20626case "(($ac_try" in
20627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20628 *) ac_try_echo=$ac_try;;
20629esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020631 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020632 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020634 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020635 { (case "(($ac_try" in
20636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20637 *) ac_try_echo=$ac_try;;
20638esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020640 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020641 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020643 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020644 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020645else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020646 echo "$as_me: program exited with status $ac_status" >&5
20647echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020648sed 's/^/| /' conftest.$ac_ext >&5
20649
Martin v. Löwis11437992002-04-12 09:54:03 +000020650( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020651ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020653rm -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 +000020654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020655
20656
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020657fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020658
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020660
Mark Dickinson2df5d282009-12-31 21:22:50 +000020661if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020662then
20663 if test $ipv6 = yes
20664 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020665 echo 'Fatal: You must get working getaddrinfo() function.'
20666 echo ' or you can specify "--disable-ipv6"'.
20667 exit 1
20668 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020669else
Martin v. Löwis11437992002-04-12 09:54:03 +000020670
20671cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020672#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020673_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020674
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020676
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020677for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020678do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020679as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20680{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20681echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020682if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020683 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020684else
Martin v. Löwis11437992002-04-12 09:54:03 +000020685 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020686/* confdefs.h. */
20687_ACEOF
20688cat confdefs.h >>conftest.$ac_ext
20689cat >>conftest.$ac_ext <<_ACEOF
20690/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020691/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20692 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20693#define $ac_func innocuous_$ac_func
20694
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020695/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020696 which can conflict with char $ac_func (); below.
20697 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020698 <limits.h> exists even on freestanding compilers. */
20699
20700#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020701# include <limits.h>
20702#else
20703# include <assert.h>
20704#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020705
20706#undef $ac_func
20707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020708/* Override any GCC internal prototype to avoid an error.
20709 Use char because int might match the return type of a GCC
20710 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020711#ifdef __cplusplus
20712extern "C"
20713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020714char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020715/* The GNU C library defines this for functions which it implements
20716 to always fail with ENOSYS. Some functions are actually named
20717 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020718#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020719choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020720#endif
20721
Skip Montanaro6dead952003-09-25 14:50:04 +000020722int
20723main ()
20724{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020725return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020726 ;
20727 return 0;
20728}
20729_ACEOF
20730rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020731if { (ac_try="$ac_link"
20732case "(($ac_try" in
20733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20734 *) ac_try_echo=$ac_try;;
20735esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020737 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020739 grep -v '^ *+' conftest.er1 >conftest.err
20740 rm -f conftest.er1
20741 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020743 (exit $ac_status); } && {
20744 test -z "$ac_c_werror_flag" ||
20745 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020746 } && test -s conftest$ac_exeext &&
20747 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020748 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020749else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020751sed 's/^/| /' conftest.$ac_ext >&5
20752
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020753 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020754fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020755
20756rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020757 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020758fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020759ac_res=`eval echo '${'$as_ac_var'}'`
20760 { echo "$as_me:$LINENO: result: $ac_res" >&5
20761echo "${ECHO_T}$ac_res" >&6; }
20762if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020763 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020764#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020765_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020766
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020767fi
20768done
20769
Michael W. Hudson54241132001-12-07 15:38:26 +000020770
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020771# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020772{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20773echo $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 +000020774if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020775 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020776else
Martin v. Löwis11437992002-04-12 09:54:03 +000020777 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020778/* confdefs.h. */
20779_ACEOF
20780cat confdefs.h >>conftest.$ac_ext
20781cat >>conftest.$ac_ext <<_ACEOF
20782/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020783#include <sys/types.h>
20784#include <sys/time.h>
20785#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020786
Martin v. Löwis11437992002-04-12 09:54:03 +000020787int
20788main ()
20789{
20790if ((struct tm *) 0)
20791return 0;
20792 ;
20793 return 0;
20794}
20795_ACEOF
20796rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020797if { (ac_try="$ac_compile"
20798case "(($ac_try" in
20799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20800 *) ac_try_echo=$ac_try;;
20801esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020803 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020805 grep -v '^ *+' conftest.er1 >conftest.err
20806 rm -f conftest.er1
20807 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020809 (exit $ac_status); } && {
20810 test -z "$ac_c_werror_flag" ||
20811 test ! -s conftest.err
20812 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020813 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020814else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020816sed 's/^/| /' conftest.$ac_ext >&5
20817
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020818 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020820
20821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020822fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020823{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20824echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020825if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020826
20827cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020828#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020829_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020830
20831fi
20832
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020833{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20834echo $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 +000020835if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020836 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020837else
Martin v. Löwis11437992002-04-12 09:54:03 +000020838 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020839/* confdefs.h. */
20840_ACEOF
20841cat confdefs.h >>conftest.$ac_ext
20842cat >>conftest.$ac_ext <<_ACEOF
20843/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020844#include <sys/types.h>
20845#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020846
Martin v. Löwis11437992002-04-12 09:54:03 +000020847int
20848main ()
20849{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020850struct tm tm;
20851 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020852 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020853 ;
20854 return 0;
20855}
20856_ACEOF
20857rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020858if { (ac_try="$ac_compile"
20859case "(($ac_try" in
20860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20861 *) ac_try_echo=$ac_try;;
20862esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020864 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020865 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020866 grep -v '^ *+' conftest.er1 >conftest.err
20867 rm -f conftest.er1
20868 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020870 (exit $ac_status); } && {
20871 test -z "$ac_c_werror_flag" ||
20872 test ! -s conftest.err
20873 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020874 ac_cv_struct_tm=time.h
20875else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020877sed 's/^/| /' conftest.$ac_ext >&5
20878
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020879 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020881
20882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020883fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020884{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20885echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020886if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020887
20888cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020889#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020890_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020891
20892fi
20893
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020894{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20895echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020896if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020897 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020898else
Martin v. Löwis11437992002-04-12 09:54:03 +000020899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020900/* confdefs.h. */
20901_ACEOF
20902cat confdefs.h >>conftest.$ac_ext
20903cat >>conftest.$ac_ext <<_ACEOF
20904/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020905#include <sys/types.h>
20906#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020907
20908
Martin v. Löwis11437992002-04-12 09:54:03 +000020909int
20910main ()
20911{
20912static struct tm ac_aggr;
20913if (ac_aggr.tm_zone)
20914return 0;
20915 ;
20916 return 0;
20917}
20918_ACEOF
20919rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020920if { (ac_try="$ac_compile"
20921case "(($ac_try" in
20922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20923 *) ac_try_echo=$ac_try;;
20924esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020926 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020927 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020928 grep -v '^ *+' conftest.er1 >conftest.err
20929 rm -f conftest.er1
20930 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020932 (exit $ac_status); } && {
20933 test -z "$ac_c_werror_flag" ||
20934 test ! -s conftest.err
20935 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020936 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020937else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020939sed 's/^/| /' conftest.$ac_ext >&5
20940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020941 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020942/* confdefs.h. */
20943_ACEOF
20944cat confdefs.h >>conftest.$ac_ext
20945cat >>conftest.$ac_ext <<_ACEOF
20946/* end confdefs.h. */
20947#include <sys/types.h>
20948#include <$ac_cv_struct_tm>
20949
20950
20951int
20952main ()
20953{
20954static struct tm ac_aggr;
20955if (sizeof ac_aggr.tm_zone)
20956return 0;
20957 ;
20958 return 0;
20959}
20960_ACEOF
20961rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020962if { (ac_try="$ac_compile"
20963case "(($ac_try" in
20964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20965 *) ac_try_echo=$ac_try;;
20966esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020968 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020970 grep -v '^ *+' conftest.er1 >conftest.err
20971 rm -f conftest.er1
20972 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020974 (exit $ac_status); } && {
20975 test -z "$ac_c_werror_flag" ||
20976 test ! -s conftest.err
20977 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020978 ac_cv_member_struct_tm_tm_zone=yes
20979else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020981sed 's/^/| /' conftest.$ac_ext >&5
20982
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020983 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020984fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020985
20986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020988
20989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020990fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020991{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20992echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
20993if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020994
20995cat >>confdefs.h <<_ACEOF
20996#define HAVE_STRUCT_TM_TM_ZONE 1
20997_ACEOF
20998
20999
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021000fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021001
Martin v. Löwis11437992002-04-12 09:54:03 +000021002if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21003
21004cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021005#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021006_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021007
21008else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021009 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21010echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021011if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021012 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021013else
21014 cat >conftest.$ac_ext <<_ACEOF
21015/* confdefs.h. */
21016_ACEOF
21017cat confdefs.h >>conftest.$ac_ext
21018cat >>conftest.$ac_ext <<_ACEOF
21019/* end confdefs.h. */
21020#include <time.h>
21021
21022int
21023main ()
21024{
21025#ifndef tzname
21026 (void) tzname;
21027#endif
21028
21029 ;
21030 return 0;
21031}
21032_ACEOF
21033rm -f conftest.$ac_objext
21034if { (ac_try="$ac_compile"
21035case "(($ac_try" in
21036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21037 *) ac_try_echo=$ac_try;;
21038esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021040 (eval "$ac_compile") 2>conftest.er1
21041 ac_status=$?
21042 grep -v '^ *+' conftest.er1 >conftest.err
21043 rm -f conftest.er1
21044 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021046 (exit $ac_status); } && {
21047 test -z "$ac_c_werror_flag" ||
21048 test ! -s conftest.err
21049 } && test -s conftest.$ac_objext; then
21050 ac_cv_have_decl_tzname=yes
21051else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021052 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021053sed 's/^/| /' conftest.$ac_ext >&5
21054
21055 ac_cv_have_decl_tzname=no
21056fi
21057
21058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21059fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021060{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21061echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21062if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021063
21064cat >>confdefs.h <<_ACEOF
21065#define HAVE_DECL_TZNAME 1
21066_ACEOF
21067
21068
21069else
21070 cat >>confdefs.h <<_ACEOF
21071#define HAVE_DECL_TZNAME 0
21072_ACEOF
21073
21074
21075fi
21076
21077
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021078 { echo "$as_me:$LINENO: checking for tzname" >&5
21079echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021080if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021081 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021082else
Martin v. Löwis11437992002-04-12 09:54:03 +000021083 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021084/* confdefs.h. */
21085_ACEOF
21086cat confdefs.h >>conftest.$ac_ext
21087cat >>conftest.$ac_ext <<_ACEOF
21088/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021089#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021090#if !HAVE_DECL_TZNAME
21091extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021093
Martin v. Löwis11437992002-04-12 09:54:03 +000021094int
21095main ()
21096{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021097return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021098 ;
21099 return 0;
21100}
21101_ACEOF
21102rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021103if { (ac_try="$ac_link"
21104case "(($ac_try" in
21105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21106 *) ac_try_echo=$ac_try;;
21107esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021109 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021111 grep -v '^ *+' conftest.er1 >conftest.err
21112 rm -f conftest.er1
21113 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021115 (exit $ac_status); } && {
21116 test -z "$ac_c_werror_flag" ||
21117 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021118 } && test -s conftest$ac_exeext &&
21119 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021120 ac_cv_var_tzname=yes
21121else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021122 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021123sed 's/^/| /' conftest.$ac_ext >&5
21124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021125 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021126fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021127
21128rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021129 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021130fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021131{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21132echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021133 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021134
21135cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021136#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021137_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021138
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021139 fi
21140fi
21141
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021142{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21143echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021144if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021145 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021146else
21147 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021148/* confdefs.h. */
21149_ACEOF
21150cat confdefs.h >>conftest.$ac_ext
21151cat >>conftest.$ac_ext <<_ACEOF
21152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021153$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021154int
21155main ()
21156{
21157static struct stat ac_aggr;
21158if (ac_aggr.st_rdev)
21159return 0;
21160 ;
21161 return 0;
21162}
21163_ACEOF
21164rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021165if { (ac_try="$ac_compile"
21166case "(($ac_try" in
21167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21168 *) ac_try_echo=$ac_try;;
21169esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021171 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021172 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021173 grep -v '^ *+' conftest.er1 >conftest.err
21174 rm -f conftest.er1
21175 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021177 (exit $ac_status); } && {
21178 test -z "$ac_c_werror_flag" ||
21179 test ! -s conftest.err
21180 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021181 ac_cv_member_struct_stat_st_rdev=yes
21182else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021183 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021184sed 's/^/| /' conftest.$ac_ext >&5
21185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021187/* confdefs.h. */
21188_ACEOF
21189cat confdefs.h >>conftest.$ac_ext
21190cat >>conftest.$ac_ext <<_ACEOF
21191/* end confdefs.h. */
21192$ac_includes_default
21193int
21194main ()
21195{
21196static struct stat ac_aggr;
21197if (sizeof ac_aggr.st_rdev)
21198return 0;
21199 ;
21200 return 0;
21201}
21202_ACEOF
21203rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021204if { (ac_try="$ac_compile"
21205case "(($ac_try" in
21206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21207 *) ac_try_echo=$ac_try;;
21208esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021210 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021212 grep -v '^ *+' conftest.er1 >conftest.err
21213 rm -f conftest.er1
21214 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021216 (exit $ac_status); } && {
21217 test -z "$ac_c_werror_flag" ||
21218 test ! -s conftest.err
21219 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021220 ac_cv_member_struct_stat_st_rdev=yes
21221else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021223sed 's/^/| /' conftest.$ac_ext >&5
21224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021225 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021227
21228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021230
21231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021232fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021233{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21234echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21235if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021236
21237cat >>confdefs.h <<_ACEOF
21238#define HAVE_STRUCT_STAT_ST_RDEV 1
21239_ACEOF
21240
21241
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021242fi
21243
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021244{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21245echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021246if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021247 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021248else
Martin v. Löwis11437992002-04-12 09:54:03 +000021249 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021250/* confdefs.h. */
21251_ACEOF
21252cat confdefs.h >>conftest.$ac_ext
21253cat >>conftest.$ac_ext <<_ACEOF
21254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021255$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021256int
21257main ()
21258{
21259static struct stat ac_aggr;
21260if (ac_aggr.st_blksize)
21261return 0;
21262 ;
21263 return 0;
21264}
21265_ACEOF
21266rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021267if { (ac_try="$ac_compile"
21268case "(($ac_try" in
21269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21270 *) ac_try_echo=$ac_try;;
21271esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021273 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021275 grep -v '^ *+' conftest.er1 >conftest.err
21276 rm -f conftest.er1
21277 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021279 (exit $ac_status); } && {
21280 test -z "$ac_c_werror_flag" ||
21281 test ! -s conftest.err
21282 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021283 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021284else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021286sed 's/^/| /' conftest.$ac_ext >&5
21287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021288 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021289/* confdefs.h. */
21290_ACEOF
21291cat confdefs.h >>conftest.$ac_ext
21292cat >>conftest.$ac_ext <<_ACEOF
21293/* end confdefs.h. */
21294$ac_includes_default
21295int
21296main ()
21297{
21298static struct stat ac_aggr;
21299if (sizeof ac_aggr.st_blksize)
21300return 0;
21301 ;
21302 return 0;
21303}
21304_ACEOF
21305rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021306if { (ac_try="$ac_compile"
21307case "(($ac_try" in
21308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21309 *) ac_try_echo=$ac_try;;
21310esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021312 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021314 grep -v '^ *+' conftest.er1 >conftest.err
21315 rm -f conftest.er1
21316 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021318 (exit $ac_status); } && {
21319 test -z "$ac_c_werror_flag" ||
21320 test ! -s conftest.err
21321 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021322 ac_cv_member_struct_stat_st_blksize=yes
21323else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021325sed 's/^/| /' conftest.$ac_ext >&5
21326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021327 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021329
21330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021332
21333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021334fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021335{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21336echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21337if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021338
Martin v. Löwis11437992002-04-12 09:54:03 +000021339cat >>confdefs.h <<_ACEOF
21340#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21341_ACEOF
21342
21343
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021344fi
21345
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021346{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21347echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021348if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021349 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021350else
21351 cat >conftest.$ac_ext <<_ACEOF
21352/* confdefs.h. */
21353_ACEOF
21354cat confdefs.h >>conftest.$ac_ext
21355cat >>conftest.$ac_ext <<_ACEOF
21356/* end confdefs.h. */
21357$ac_includes_default
21358int
21359main ()
21360{
21361static struct stat ac_aggr;
21362if (ac_aggr.st_flags)
21363return 0;
21364 ;
21365 return 0;
21366}
21367_ACEOF
21368rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021369if { (ac_try="$ac_compile"
21370case "(($ac_try" in
21371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21372 *) ac_try_echo=$ac_try;;
21373esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021375 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021376 ac_status=$?
21377 grep -v '^ *+' conftest.er1 >conftest.err
21378 rm -f conftest.er1
21379 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021381 (exit $ac_status); } && {
21382 test -z "$ac_c_werror_flag" ||
21383 test ! -s conftest.err
21384 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021385 ac_cv_member_struct_stat_st_flags=yes
21386else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021387 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021388sed 's/^/| /' conftest.$ac_ext >&5
21389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021390 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021391/* confdefs.h. */
21392_ACEOF
21393cat confdefs.h >>conftest.$ac_ext
21394cat >>conftest.$ac_ext <<_ACEOF
21395/* end confdefs.h. */
21396$ac_includes_default
21397int
21398main ()
21399{
21400static struct stat ac_aggr;
21401if (sizeof ac_aggr.st_flags)
21402return 0;
21403 ;
21404 return 0;
21405}
21406_ACEOF
21407rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021408if { (ac_try="$ac_compile"
21409case "(($ac_try" in
21410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21411 *) ac_try_echo=$ac_try;;
21412esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021414 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021415 ac_status=$?
21416 grep -v '^ *+' conftest.er1 >conftest.err
21417 rm -f conftest.er1
21418 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021420 (exit $ac_status); } && {
21421 test -z "$ac_c_werror_flag" ||
21422 test ! -s conftest.err
21423 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021424 ac_cv_member_struct_stat_st_flags=yes
21425else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021426 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021427sed 's/^/| /' conftest.$ac_ext >&5
21428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021429 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021431
21432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021434
21435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021436fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021437{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21438echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21439if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021440
21441cat >>confdefs.h <<_ACEOF
21442#define HAVE_STRUCT_STAT_ST_FLAGS 1
21443_ACEOF
21444
21445
21446fi
21447
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021448{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21449echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021450if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021451 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021452else
21453 cat >conftest.$ac_ext <<_ACEOF
21454/* confdefs.h. */
21455_ACEOF
21456cat confdefs.h >>conftest.$ac_ext
21457cat >>conftest.$ac_ext <<_ACEOF
21458/* end confdefs.h. */
21459$ac_includes_default
21460int
21461main ()
21462{
21463static struct stat ac_aggr;
21464if (ac_aggr.st_gen)
21465return 0;
21466 ;
21467 return 0;
21468}
21469_ACEOF
21470rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021471if { (ac_try="$ac_compile"
21472case "(($ac_try" in
21473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21474 *) ac_try_echo=$ac_try;;
21475esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021477 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021478 ac_status=$?
21479 grep -v '^ *+' conftest.er1 >conftest.err
21480 rm -f conftest.er1
21481 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021483 (exit $ac_status); } && {
21484 test -z "$ac_c_werror_flag" ||
21485 test ! -s conftest.err
21486 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021487 ac_cv_member_struct_stat_st_gen=yes
21488else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021489 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021490sed 's/^/| /' conftest.$ac_ext >&5
21491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021492 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021493/* confdefs.h. */
21494_ACEOF
21495cat confdefs.h >>conftest.$ac_ext
21496cat >>conftest.$ac_ext <<_ACEOF
21497/* end confdefs.h. */
21498$ac_includes_default
21499int
21500main ()
21501{
21502static struct stat ac_aggr;
21503if (sizeof ac_aggr.st_gen)
21504return 0;
21505 ;
21506 return 0;
21507}
21508_ACEOF
21509rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021510if { (ac_try="$ac_compile"
21511case "(($ac_try" in
21512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21513 *) ac_try_echo=$ac_try;;
21514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021516 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021517 ac_status=$?
21518 grep -v '^ *+' conftest.er1 >conftest.err
21519 rm -f conftest.er1
21520 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021522 (exit $ac_status); } && {
21523 test -z "$ac_c_werror_flag" ||
21524 test ! -s conftest.err
21525 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021526 ac_cv_member_struct_stat_st_gen=yes
21527else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021528 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021529sed 's/^/| /' conftest.$ac_ext >&5
21530
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021531 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021533
21534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021536
21537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021538fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021539{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21540echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21541if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021542
21543cat >>confdefs.h <<_ACEOF
21544#define HAVE_STRUCT_STAT_ST_GEN 1
21545_ACEOF
21546
21547
21548fi
21549
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021550{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21551echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021552if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021553 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021554else
21555 cat >conftest.$ac_ext <<_ACEOF
21556/* confdefs.h. */
21557_ACEOF
21558cat confdefs.h >>conftest.$ac_ext
21559cat >>conftest.$ac_ext <<_ACEOF
21560/* end confdefs.h. */
21561$ac_includes_default
21562int
21563main ()
21564{
21565static struct stat ac_aggr;
21566if (ac_aggr.st_birthtime)
21567return 0;
21568 ;
21569 return 0;
21570}
21571_ACEOF
21572rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021573if { (ac_try="$ac_compile"
21574case "(($ac_try" in
21575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21576 *) ac_try_echo=$ac_try;;
21577esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021579 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021580 ac_status=$?
21581 grep -v '^ *+' conftest.er1 >conftest.err
21582 rm -f conftest.er1
21583 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021585 (exit $ac_status); } && {
21586 test -z "$ac_c_werror_flag" ||
21587 test ! -s conftest.err
21588 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021589 ac_cv_member_struct_stat_st_birthtime=yes
21590else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021591 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021592sed 's/^/| /' conftest.$ac_ext >&5
21593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021594 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021595/* confdefs.h. */
21596_ACEOF
21597cat confdefs.h >>conftest.$ac_ext
21598cat >>conftest.$ac_ext <<_ACEOF
21599/* end confdefs.h. */
21600$ac_includes_default
21601int
21602main ()
21603{
21604static struct stat ac_aggr;
21605if (sizeof ac_aggr.st_birthtime)
21606return 0;
21607 ;
21608 return 0;
21609}
21610_ACEOF
21611rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021612if { (ac_try="$ac_compile"
21613case "(($ac_try" in
21614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21615 *) ac_try_echo=$ac_try;;
21616esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021618 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021619 ac_status=$?
21620 grep -v '^ *+' conftest.er1 >conftest.err
21621 rm -f conftest.er1
21622 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021624 (exit $ac_status); } && {
21625 test -z "$ac_c_werror_flag" ||
21626 test ! -s conftest.err
21627 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021628 ac_cv_member_struct_stat_st_birthtime=yes
21629else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021630 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021631sed 's/^/| /' conftest.$ac_ext >&5
21632
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021633 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021635
21636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021638
21639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021640fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021641{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21642echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21643if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021644
21645cat >>confdefs.h <<_ACEOF
21646#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21647_ACEOF
21648
21649
21650fi
21651
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021652{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21653echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021654if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021655 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021656else
Martin v. Löwis11437992002-04-12 09:54:03 +000021657 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021658/* confdefs.h. */
21659_ACEOF
21660cat confdefs.h >>conftest.$ac_ext
21661cat >>conftest.$ac_ext <<_ACEOF
21662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021663$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021664int
21665main ()
21666{
21667static struct stat ac_aggr;
21668if (ac_aggr.st_blocks)
21669return 0;
21670 ;
21671 return 0;
21672}
21673_ACEOF
21674rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021675if { (ac_try="$ac_compile"
21676case "(($ac_try" in
21677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21678 *) ac_try_echo=$ac_try;;
21679esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021681 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021683 grep -v '^ *+' conftest.er1 >conftest.err
21684 rm -f conftest.er1
21685 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021687 (exit $ac_status); } && {
21688 test -z "$ac_c_werror_flag" ||
21689 test ! -s conftest.err
21690 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021691 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021692else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021694sed 's/^/| /' conftest.$ac_ext >&5
21695
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021696 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021697/* confdefs.h. */
21698_ACEOF
21699cat confdefs.h >>conftest.$ac_ext
21700cat >>conftest.$ac_ext <<_ACEOF
21701/* end confdefs.h. */
21702$ac_includes_default
21703int
21704main ()
21705{
21706static struct stat ac_aggr;
21707if (sizeof ac_aggr.st_blocks)
21708return 0;
21709 ;
21710 return 0;
21711}
21712_ACEOF
21713rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021714if { (ac_try="$ac_compile"
21715case "(($ac_try" in
21716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21717 *) ac_try_echo=$ac_try;;
21718esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021720 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021722 grep -v '^ *+' conftest.er1 >conftest.err
21723 rm -f conftest.er1
21724 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021726 (exit $ac_status); } && {
21727 test -z "$ac_c_werror_flag" ||
21728 test ! -s conftest.err
21729 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021730 ac_cv_member_struct_stat_st_blocks=yes
21731else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021733sed 's/^/| /' conftest.$ac_ext >&5
21734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021735 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021737
21738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021739fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021740
21741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021742fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021743{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21744echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21745if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021746
Martin v. Löwis11437992002-04-12 09:54:03 +000021747cat >>confdefs.h <<_ACEOF
21748#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21749_ACEOF
21750
21751
21752cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021753#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021754_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021755
21756else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021757 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021758 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021759 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21760 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021761esac
21762
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021763fi
21764
Michael W. Hudson54241132001-12-07 15:38:26 +000021765
Martin v. Löwis11437992002-04-12 09:54:03 +000021766
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021767{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21768echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021769if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021770 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +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. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021778#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021779int
21780main ()
21781{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021782return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021783 ;
21784 return 0;
21785}
21786_ACEOF
21787rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021788if { (ac_try="$ac_compile"
21789case "(($ac_try" in
21790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21791 *) ac_try_echo=$ac_try;;
21792esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021794 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021796 grep -v '^ *+' conftest.er1 >conftest.err
21797 rm -f conftest.er1
21798 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021800 (exit $ac_status); } && {
21801 test -z "$ac_c_werror_flag" ||
21802 test ! -s conftest.err
21803 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021804 ac_cv_header_time_altzone=yes
21805else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021807sed 's/^/| /' conftest.$ac_ext >&5
21808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021809 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021810fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021811
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21813fi
21814
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021815{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21816echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021817if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021818
21819cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021820#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021821_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021822
21823fi
21824
Guido van Rossumda88dad1995-01-26 00:46:29 +000021825was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021826{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21827echo $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 +000021828cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021829/* confdefs.h. */
21830_ACEOF
21831cat confdefs.h >>conftest.$ac_ext
21832cat >>conftest.$ac_ext <<_ACEOF
21833/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021834
21835#include <sys/types.h>
21836#include <sys/select.h>
21837#include <sys/time.h>
21838
Martin v. Löwis11437992002-04-12 09:54:03 +000021839int
21840main ()
21841{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021842;
Martin v. Löwis11437992002-04-12 09:54:03 +000021843 ;
21844 return 0;
21845}
21846_ACEOF
21847rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021848if { (ac_try="$ac_compile"
21849case "(($ac_try" in
21850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21851 *) ac_try_echo=$ac_try;;
21852esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021854 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021856 grep -v '^ *+' conftest.er1 >conftest.err
21857 rm -f conftest.er1
21858 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021860 (exit $ac_status); } && {
21861 test -z "$ac_c_werror_flag" ||
21862 test ! -s conftest.err
21863 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021864
21865
21866cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021867#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021868_ACEOF
21869
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021870 was_it_defined=yes
21871
Guido van Rossumf78abae1997-01-21 22:02:36 +000021872else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021874sed 's/^/| /' conftest.$ac_ext >&5
21875
Thomas Wouters477c8d52006-05-27 19:21:47 +000021876
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021877fi
21878
21879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021880{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21881echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021882
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021883{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21884echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021885if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021886 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021887else
Martin v. Löwis11437992002-04-12 09:54:03 +000021888 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021889/* confdefs.h. */
21890_ACEOF
21891cat confdefs.h >>conftest.$ac_ext
21892cat >>conftest.$ac_ext <<_ACEOF
21893/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021894
21895# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021896int
21897main ()
21898{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021899struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021900 ;
21901 return 0;
21902}
21903_ACEOF
21904rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021905if { (ac_try="$ac_compile"
21906case "(($ac_try" in
21907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21908 *) ac_try_echo=$ac_try;;
21909esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021911 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021912 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021913 grep -v '^ *+' conftest.er1 >conftest.err
21914 rm -f conftest.er1
21915 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021917 (exit $ac_status); } && {
21918 test -z "$ac_c_werror_flag" ||
21919 test ! -s conftest.err
21920 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021921 ac_cv_struct_addrinfo=yes
21922else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021924sed 's/^/| /' conftest.$ac_ext >&5
21925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021926 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021927fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21930fi
21931
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021932{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21933echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021934if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021935
21936cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021937#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021938_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021939
21940fi
21941
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021942{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21943echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021944if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021945 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021946else
Martin v. Löwis11437992002-04-12 09:54:03 +000021947 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021948/* confdefs.h. */
21949_ACEOF
21950cat confdefs.h >>conftest.$ac_ext
21951cat >>conftest.$ac_ext <<_ACEOF
21952/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021953
21954# include <sys/types.h>
21955# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021956int
21957main ()
21958{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021959struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021960 ;
21961 return 0;
21962}
21963_ACEOF
21964rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021965if { (ac_try="$ac_compile"
21966case "(($ac_try" in
21967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21968 *) ac_try_echo=$ac_try;;
21969esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021971 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021973 grep -v '^ *+' conftest.er1 >conftest.err
21974 rm -f conftest.er1
21975 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021977 (exit $ac_status); } && {
21978 test -z "$ac_c_werror_flag" ||
21979 test ! -s conftest.err
21980 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021981 ac_cv_struct_sockaddr_storage=yes
21982else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021984sed 's/^/| /' conftest.$ac_ext >&5
21985
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021986 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021987fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21990fi
21991
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021992{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21993echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021994if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021995
21996cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021997#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021998_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021999
22000fi
22001
Guido van Rossum627b2d71993-12-24 10:39:16 +000022002# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022003
Michael W. Hudson54241132001-12-07 15:38:26 +000022004
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022005{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22006echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022007if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022008 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022009else
Martin v. Löwis11437992002-04-12 09:54:03 +000022010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022011/* confdefs.h. */
22012_ACEOF
22013cat confdefs.h >>conftest.$ac_ext
22014cat >>conftest.$ac_ext <<_ACEOF
22015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022016$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022017int
22018main ()
22019{
22020static int test_array [1 - 2 * !(((char) -1) < 0)];
22021test_array [0] = 0
22022
22023 ;
22024 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022025}
Martin v. Löwis11437992002-04-12 09:54:03 +000022026_ACEOF
22027rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022028if { (ac_try="$ac_compile"
22029case "(($ac_try" in
22030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22031 *) ac_try_echo=$ac_try;;
22032esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022034 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022036 grep -v '^ *+' conftest.er1 >conftest.err
22037 rm -f conftest.er1
22038 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022040 (exit $ac_status); } && {
22041 test -z "$ac_c_werror_flag" ||
22042 test ! -s conftest.err
22043 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022044 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022045else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022047sed 's/^/| /' conftest.$ac_ext >&5
22048
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022049 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022051
22052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022053fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022054{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22055echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022056if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022057 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022058#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022059_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022060
22061fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022062
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022063{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22064echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022065if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022066 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022067else
22068 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022069/* confdefs.h. */
22070_ACEOF
22071cat confdefs.h >>conftest.$ac_ext
22072cat >>conftest.$ac_ext <<_ACEOF
22073/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022074
Martin v. Löwis11437992002-04-12 09:54:03 +000022075int
22076main ()
22077{
22078/* FIXME: Include the comments suggested by Paul. */
22079#ifndef __cplusplus
22080 /* Ultrix mips cc rejects this. */
22081 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022082 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022083 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022084 char const *const *pcpcc;
22085 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022086 /* NEC SVR4.0.2 mips cc rejects this. */
22087 struct point {int x, y;};
22088 static struct point const zero = {0,0};
22089 /* AIX XL C 1.02.0.0 rejects this.
22090 It does not let you subtract one const X* pointer from another in
22091 an arm of an if-expression whose if-part is not a constant
22092 expression */
22093 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022094 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022095 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022096 ++pcpcc;
22097 ppc = (char**) pcpcc;
22098 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022099 { /* SCO 3.2v4 cc rejects this. */
22100 char *t;
22101 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022102
Martin v. Löwis11437992002-04-12 09:54:03 +000022103 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022104 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022105 }
22106 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22107 int x[] = {25, 17};
22108 const int *foo = &x[0];
22109 ++foo;
22110 }
22111 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22112 typedef const int *iptr;
22113 iptr p = 0;
22114 ++p;
22115 }
22116 { /* AIX XL C 1.02.0.0 rejects this saying
22117 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22118 struct s { int j; const int *ap[3]; };
22119 struct s *b; b->j = 5;
22120 }
22121 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22122 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022123 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022124 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022125 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022126#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022127
Martin v. Löwis11437992002-04-12 09:54:03 +000022128 ;
22129 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022130}
Martin v. Löwis11437992002-04-12 09:54:03 +000022131_ACEOF
22132rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022133if { (ac_try="$ac_compile"
22134case "(($ac_try" in
22135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22136 *) ac_try_echo=$ac_try;;
22137esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022139 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022140 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022141 grep -v '^ *+' conftest.er1 >conftest.err
22142 rm -f conftest.er1
22143 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022145 (exit $ac_status); } && {
22146 test -z "$ac_c_werror_flag" ||
22147 test ! -s conftest.err
22148 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022149 ac_cv_c_const=yes
22150else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022152sed 's/^/| /' conftest.$ac_ext >&5
22153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022154 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022156
22157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022158fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022159{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22160echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022161if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022162
22163cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022164#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022165_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022166
22167fi
22168
Michael W. Hudson54241132001-12-07 15:38:26 +000022169
Guido van Rossumda88dad1995-01-26 00:46:29 +000022170works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022171{ echo "$as_me:$LINENO: checking for working volatile" >&5
22172echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022173cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022174/* confdefs.h. */
22175_ACEOF
22176cat confdefs.h >>conftest.$ac_ext
22177cat >>conftest.$ac_ext <<_ACEOF
22178/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022179
Martin v. Löwis11437992002-04-12 09:54:03 +000022180int
22181main ()
22182{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022183volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022184 ;
22185 return 0;
22186}
22187_ACEOF
22188rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022189if { (ac_try="$ac_compile"
22190case "(($ac_try" in
22191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22192 *) ac_try_echo=$ac_try;;
22193esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022195 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022197 grep -v '^ *+' conftest.er1 >conftest.err
22198 rm -f conftest.er1
22199 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022201 (exit $ac_status); } && {
22202 test -z "$ac_c_werror_flag" ||
22203 test ! -s conftest.err
22204 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022205 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022206else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022208sed 's/^/| /' conftest.$ac_ext >&5
22209
Martin v. Löwis11437992002-04-12 09:54:03 +000022210
22211cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022212#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022213_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022214
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022215
Guido van Rossum627b2d71993-12-24 10:39:16 +000022216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022217
22218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022219{ echo "$as_me:$LINENO: result: $works" >&5
22220echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022221
Guido van Rossumda88dad1995-01-26 00:46:29 +000022222works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022223{ echo "$as_me:$LINENO: checking for working signed char" >&5
22224echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022225cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022226/* confdefs.h. */
22227_ACEOF
22228cat confdefs.h >>conftest.$ac_ext
22229cat >>conftest.$ac_ext <<_ACEOF
22230/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022231
Martin v. Löwis11437992002-04-12 09:54:03 +000022232int
22233main ()
22234{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022235signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022236 ;
22237 return 0;
22238}
22239_ACEOF
22240rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022241if { (ac_try="$ac_compile"
22242case "(($ac_try" in
22243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22244 *) ac_try_echo=$ac_try;;
22245esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022247 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022248 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022249 grep -v '^ *+' conftest.er1 >conftest.err
22250 rm -f conftest.er1
22251 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022253 (exit $ac_status); } && {
22254 test -z "$ac_c_werror_flag" ||
22255 test ! -s conftest.err
22256 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022257 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022258else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022259 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022260sed 's/^/| /' conftest.$ac_ext >&5
22261
Martin v. Löwis11437992002-04-12 09:54:03 +000022262
22263cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022264#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022265_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022266
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022267
Guido van Rossum7f43da71994-08-01 12:15:30 +000022268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022269
22270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022271{ echo "$as_me:$LINENO: result: $works" >&5
22272echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022273
Guido van Rossumda88dad1995-01-26 00:46:29 +000022274have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022275{ echo "$as_me:$LINENO: checking for prototypes" >&5
22276echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022277cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022278/* confdefs.h. */
22279_ACEOF
22280cat confdefs.h >>conftest.$ac_ext
22281cat >>conftest.$ac_ext <<_ACEOF
22282/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022283int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022284int
22285main ()
22286{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022287return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022288 ;
22289 return 0;
22290}
22291_ACEOF
22292rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022293if { (ac_try="$ac_compile"
22294case "(($ac_try" in
22295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22296 *) ac_try_echo=$ac_try;;
22297esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022299 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022301 grep -v '^ *+' conftest.er1 >conftest.err
22302 rm -f conftest.er1
22303 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022305 (exit $ac_status); } && {
22306 test -z "$ac_c_werror_flag" ||
22307 test ! -s conftest.err
22308 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022309
22310
22311cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022312#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022313_ACEOF
22314
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022315 have_prototypes=yes
22316
Guido van Rossumf78abae1997-01-21 22:02:36 +000022317else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022319sed 's/^/| /' conftest.$ac_ext >&5
22320
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022321
Guido van Rossum7f43da71994-08-01 12:15:30 +000022322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022323
22324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022325{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22326echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022327
Guido van Rossumda88dad1995-01-26 00:46:29 +000022328works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022329{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22330echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022331cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022332/* confdefs.h. */
22333_ACEOF
22334cat confdefs.h >>conftest.$ac_ext
22335cat >>conftest.$ac_ext <<_ACEOF
22336/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022337
22338#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022339int foo(int x, ...) {
22340 va_list va;
22341 va_start(va, x);
22342 va_arg(va, int);
22343 va_arg(va, char *);
22344 va_arg(va, double);
22345 return 0;
22346}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022347
Martin v. Löwis11437992002-04-12 09:54:03 +000022348int
22349main ()
22350{
Guido van Rossum90eea071996-08-30 20:58:57 +000022351return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022352 ;
22353 return 0;
22354}
22355_ACEOF
22356rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022357if { (ac_try="$ac_compile"
22358case "(($ac_try" in
22359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22360 *) ac_try_echo=$ac_try;;
22361esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022363 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022365 grep -v '^ *+' conftest.er1 >conftest.err
22366 rm -f conftest.er1
22367 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022369 (exit $ac_status); } && {
22370 test -z "$ac_c_werror_flag" ||
22371 test ! -s conftest.err
22372 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022373
22374
22375cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022376#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022377_ACEOF
22378
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022379 works=yes
22380
Guido van Rossumf78abae1997-01-21 22:02:36 +000022381else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022383sed 's/^/| /' conftest.$ac_ext >&5
22384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022385
Guido van Rossum627b2d71993-12-24 10:39:16 +000022386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022387
22388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022389{ echo "$as_me:$LINENO: result: $works" >&5
22390echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022391
Martin v. Löwisd6320502004-08-12 13:45:08 +000022392# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022393{ echo "$as_me:$LINENO: checking for socketpair" >&5
22394echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022395cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022396/* confdefs.h. */
22397_ACEOF
22398cat confdefs.h >>conftest.$ac_ext
22399cat >>conftest.$ac_ext <<_ACEOF
22400/* end confdefs.h. */
22401
22402#include <sys/types.h>
22403#include <sys/socket.h>
22404
22405int
22406main ()
22407{
22408void *x=socketpair
22409 ;
22410 return 0;
22411}
22412_ACEOF
22413rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022414if { (ac_try="$ac_compile"
22415case "(($ac_try" in
22416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22417 *) ac_try_echo=$ac_try;;
22418esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022420 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022422 grep -v '^ *+' conftest.er1 >conftest.err
22423 rm -f conftest.er1
22424 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022426 (exit $ac_status); } && {
22427 test -z "$ac_c_werror_flag" ||
22428 test ! -s conftest.err
22429 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022430
22431cat >>confdefs.h <<\_ACEOF
22432#define HAVE_SOCKETPAIR 1
22433_ACEOF
22434
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022435 { echo "$as_me:$LINENO: result: yes" >&5
22436echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022437else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022438 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022439sed 's/^/| /' conftest.$ac_ext >&5
22440
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022441 { echo "$as_me:$LINENO: result: no" >&5
22442echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022443
22444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022445
22446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022447
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022448# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022449{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22450echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022451cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022452/* confdefs.h. */
22453_ACEOF
22454cat confdefs.h >>conftest.$ac_ext
22455cat >>conftest.$ac_ext <<_ACEOF
22456/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022457#include <sys/types.h>
22458#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022459int
22460main ()
22461{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022462struct sockaddr x;
22463x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022464 ;
22465 return 0;
22466}
22467_ACEOF
22468rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022469if { (ac_try="$ac_compile"
22470case "(($ac_try" in
22471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22472 *) ac_try_echo=$ac_try;;
22473esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022475 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022476 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022477 grep -v '^ *+' conftest.er1 >conftest.err
22478 rm -f conftest.er1
22479 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022481 (exit $ac_status); } && {
22482 test -z "$ac_c_werror_flag" ||
22483 test ! -s conftest.err
22484 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022485 { echo "$as_me:$LINENO: result: yes" >&5
22486echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022487
22488cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022489#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022490_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022491
22492else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022494sed 's/^/| /' conftest.$ac_ext >&5
22495
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022496 { echo "$as_me:$LINENO: result: no" >&5
22497echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022499
22500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022501
Guido van Rossumda88dad1995-01-26 00:46:29 +000022502va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022503{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22504echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022505cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022506/* confdefs.h. */
22507_ACEOF
22508cat confdefs.h >>conftest.$ac_ext
22509cat >>conftest.$ac_ext <<_ACEOF
22510/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022511
22512#ifdef HAVE_STDARG_PROTOTYPES
22513#include <stdarg.h>
22514#else
22515#include <varargs.h>
22516#endif
22517
Martin v. Löwis11437992002-04-12 09:54:03 +000022518int
22519main ()
22520{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022521va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022522 ;
22523 return 0;
22524}
22525_ACEOF
22526rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022527if { (ac_try="$ac_compile"
22528case "(($ac_try" in
22529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22530 *) ac_try_echo=$ac_try;;
22531esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022533 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022535 grep -v '^ *+' conftest.er1 >conftest.err
22536 rm -f conftest.er1
22537 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022539 (exit $ac_status); } && {
22540 test -z "$ac_c_werror_flag" ||
22541 test ! -s conftest.err
22542 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022543 :
22544else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022546sed 's/^/| /' conftest.$ac_ext >&5
22547
Martin v. Löwis11437992002-04-12 09:54:03 +000022548
22549
22550cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022551#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022552_ACEOF
22553
Guido van Rossumda88dad1995-01-26 00:46:29 +000022554 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022555
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022557
22558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022559{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22560echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022561
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022562# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022563
22564
22565
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022566{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22567echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022568if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022569 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022570else
Martin v. Löwis11437992002-04-12 09:54:03 +000022571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022572/* confdefs.h. */
22573_ACEOF
22574cat confdefs.h >>conftest.$ac_ext
22575cat >>conftest.$ac_ext <<_ACEOF
22576/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022577/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22578 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22579#define gethostbyname_r innocuous_gethostbyname_r
22580
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022581/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022582 which can conflict with char gethostbyname_r (); below.
22583 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022584 <limits.h> exists even on freestanding compilers. */
22585
22586#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022587# include <limits.h>
22588#else
22589# include <assert.h>
22590#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022591
22592#undef gethostbyname_r
22593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022594/* Override any GCC internal prototype to avoid an error.
22595 Use char because int might match the return type of a GCC
22596 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022597#ifdef __cplusplus
22598extern "C"
22599#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022600char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022601/* The GNU C library defines this for functions which it implements
22602 to always fail with ENOSYS. Some functions are actually named
22603 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022604#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022605choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022606#endif
22607
Skip Montanaro6dead952003-09-25 14:50:04 +000022608int
22609main ()
22610{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022611return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022612 ;
22613 return 0;
22614}
22615_ACEOF
22616rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022617if { (ac_try="$ac_link"
22618case "(($ac_try" in
22619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22620 *) ac_try_echo=$ac_try;;
22621esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022623 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022625 grep -v '^ *+' conftest.er1 >conftest.err
22626 rm -f conftest.er1
22627 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022629 (exit $ac_status); } && {
22630 test -z "$ac_c_werror_flag" ||
22631 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022632 } && test -s conftest$ac_exeext &&
22633 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022634 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022635else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022637sed 's/^/| /' conftest.$ac_ext >&5
22638
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022639 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022641
22642rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022643 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022644fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022645{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22646echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22647if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022648
Martin v. Löwis11437992002-04-12 09:54:03 +000022649 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022650#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022651_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022652
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022653 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22654echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022655 OLD_CFLAGS=$CFLAGS
22656 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022657 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022658/* confdefs.h. */
22659_ACEOF
22660cat confdefs.h >>conftest.$ac_ext
22661cat >>conftest.$ac_ext <<_ACEOF
22662/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022663
22664# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022665
Martin v. Löwis11437992002-04-12 09:54:03 +000022666int
22667main ()
22668{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022669
22670 char *name;
22671 struct hostent *he, *res;
22672 char buffer[2048];
22673 int buflen = 2048;
22674 int h_errnop;
22675
22676 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022677
22678 ;
22679 return 0;
22680}
22681_ACEOF
22682rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022683if { (ac_try="$ac_compile"
22684case "(($ac_try" in
22685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22686 *) ac_try_echo=$ac_try;;
22687esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022689 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022691 grep -v '^ *+' conftest.er1 >conftest.err
22692 rm -f conftest.er1
22693 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022695 (exit $ac_status); } && {
22696 test -z "$ac_c_werror_flag" ||
22697 test ! -s conftest.err
22698 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022699
22700 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022701#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022702_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022703
Martin v. Löwis11437992002-04-12 09:54:03 +000022704
22705cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022706#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022707_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022708
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022709 { echo "$as_me:$LINENO: result: yes" >&5
22710echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022711
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022712else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022714sed 's/^/| /' conftest.$ac_ext >&5
22715
Martin v. Löwis11437992002-04-12 09:54:03 +000022716
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022717 { echo "$as_me:$LINENO: result: no" >&5
22718echo "${ECHO_T}no" >&6; }
22719 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22720echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022722/* confdefs.h. */
22723_ACEOF
22724cat confdefs.h >>conftest.$ac_ext
22725cat >>conftest.$ac_ext <<_ACEOF
22726/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022727
22728# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022729
Martin v. Löwis11437992002-04-12 09:54:03 +000022730int
22731main ()
22732{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022733
22734 char *name;
22735 struct hostent *he;
22736 char buffer[2048];
22737 int buflen = 2048;
22738 int h_errnop;
22739
22740 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022741
22742 ;
22743 return 0;
22744}
22745_ACEOF
22746rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022747if { (ac_try="$ac_compile"
22748case "(($ac_try" in
22749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22750 *) ac_try_echo=$ac_try;;
22751esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022753 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022754 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022755 grep -v '^ *+' conftest.er1 >conftest.err
22756 rm -f conftest.er1
22757 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022759 (exit $ac_status); } && {
22760 test -z "$ac_c_werror_flag" ||
22761 test ! -s conftest.err
22762 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022763
22764 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022765#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022766_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022767
Martin v. Löwis11437992002-04-12 09:54:03 +000022768
22769cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022770#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022771_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022772
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022773 { echo "$as_me:$LINENO: result: yes" >&5
22774echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022775
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022776else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022778sed 's/^/| /' conftest.$ac_ext >&5
22779
Martin v. Löwis11437992002-04-12 09:54:03 +000022780
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022781 { echo "$as_me:$LINENO: result: no" >&5
22782echo "${ECHO_T}no" >&6; }
22783 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22784echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022785 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022786/* confdefs.h. */
22787_ACEOF
22788cat confdefs.h >>conftest.$ac_ext
22789cat >>conftest.$ac_ext <<_ACEOF
22790/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022791
22792# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022793
Martin v. Löwis11437992002-04-12 09:54:03 +000022794int
22795main ()
22796{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022797
22798 char *name;
22799 struct hostent *he;
22800 struct hostent_data data;
22801
22802 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022803
22804 ;
22805 return 0;
22806}
22807_ACEOF
22808rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022809if { (ac_try="$ac_compile"
22810case "(($ac_try" in
22811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22812 *) ac_try_echo=$ac_try;;
22813esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022815 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022817 grep -v '^ *+' conftest.er1 >conftest.err
22818 rm -f conftest.er1
22819 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022821 (exit $ac_status); } && {
22822 test -z "$ac_c_werror_flag" ||
22823 test ! -s conftest.err
22824 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022825
22826 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022827#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022828_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022829
Martin v. Löwis11437992002-04-12 09:54:03 +000022830
22831cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022832#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022833_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022834
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022835 { echo "$as_me:$LINENO: result: yes" >&5
22836echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022837
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022838else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022840sed 's/^/| /' conftest.$ac_ext >&5
22841
Martin v. Löwis11437992002-04-12 09:54:03 +000022842
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022843 { echo "$as_me:$LINENO: result: no" >&5
22844echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022845
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022847
22848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022849
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022851
22852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022853
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022855
22856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022857 CFLAGS=$OLD_CFLAGS
22858
22859else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022860
Martin v. Löwis11437992002-04-12 09:54:03 +000022861
22862for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022863do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022864as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22865{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22866echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022867if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022868 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022869else
Martin v. Löwis11437992002-04-12 09:54:03 +000022870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022871/* confdefs.h. */
22872_ACEOF
22873cat confdefs.h >>conftest.$ac_ext
22874cat >>conftest.$ac_ext <<_ACEOF
22875/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022876/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22877 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22878#define $ac_func innocuous_$ac_func
22879
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022880/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022881 which can conflict with char $ac_func (); below.
22882 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022883 <limits.h> exists even on freestanding compilers. */
22884
22885#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022886# include <limits.h>
22887#else
22888# include <assert.h>
22889#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022890
22891#undef $ac_func
22892
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022893/* Override any GCC internal prototype to avoid an error.
22894 Use char because int might match the return type of a GCC
22895 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022896#ifdef __cplusplus
22897extern "C"
22898#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022899char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022900/* The GNU C library defines this for functions which it implements
22901 to always fail with ENOSYS. Some functions are actually named
22902 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022903#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022904choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022905#endif
22906
Skip Montanaro6dead952003-09-25 14:50:04 +000022907int
22908main ()
22909{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022910return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022911 ;
22912 return 0;
22913}
22914_ACEOF
22915rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022916if { (ac_try="$ac_link"
22917case "(($ac_try" in
22918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22919 *) ac_try_echo=$ac_try;;
22920esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022922 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022923 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022924 grep -v '^ *+' conftest.er1 >conftest.err
22925 rm -f conftest.er1
22926 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022928 (exit $ac_status); } && {
22929 test -z "$ac_c_werror_flag" ||
22930 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022931 } && test -s conftest$ac_exeext &&
22932 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022933 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022934else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022936sed 's/^/| /' conftest.$ac_ext >&5
22937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022938 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022940
22941rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022942 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022943fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022944ac_res=`eval echo '${'$as_ac_var'}'`
22945 { echo "$as_me:$LINENO: result: $ac_res" >&5
22946echo "${ECHO_T}$ac_res" >&6; }
22947if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022948 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022949#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022950_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022951
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022952fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022953done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022954
Michael W. Hudson54241132001-12-07 15:38:26 +000022955
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022956fi
22957
Michael W. Hudson54241132001-12-07 15:38:26 +000022958
22959
22960
22961
22962
22963
Guido van Rossum627b2d71993-12-24 10:39:16 +000022964# checks for system services
22965# (none yet)
22966
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022967# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022968{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22969echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022970if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022971 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022972else
Martin v. Löwis11437992002-04-12 09:54:03 +000022973 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022974/* confdefs.h. */
22975_ACEOF
22976cat confdefs.h >>conftest.$ac_ext
22977cat >>conftest.$ac_ext <<_ACEOF
22978/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022979/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22980 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22981#define __fpu_control innocuous___fpu_control
22982
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022983/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022984 which can conflict with char __fpu_control (); below.
22985 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022986 <limits.h> exists even on freestanding compilers. */
22987
22988#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022989# include <limits.h>
22990#else
22991# include <assert.h>
22992#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022993
22994#undef __fpu_control
22995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022996/* Override any GCC internal prototype to avoid an error.
22997 Use char because int might match the return type of a GCC
22998 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022999#ifdef __cplusplus
23000extern "C"
23001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023002char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023003/* The GNU C library defines this for functions which it implements
23004 to always fail with ENOSYS. Some functions are actually named
23005 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023006#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023007choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023008#endif
23009
Skip Montanaro6dead952003-09-25 14:50:04 +000023010int
23011main ()
23012{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023013return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023014 ;
23015 return 0;
23016}
23017_ACEOF
23018rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023019if { (ac_try="$ac_link"
23020case "(($ac_try" in
23021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23022 *) ac_try_echo=$ac_try;;
23023esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023025 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023026 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023027 grep -v '^ *+' conftest.er1 >conftest.err
23028 rm -f conftest.er1
23029 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023031 (exit $ac_status); } && {
23032 test -z "$ac_c_werror_flag" ||
23033 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023034 } && test -s conftest$ac_exeext &&
23035 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023036 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023037else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023039sed 's/^/| /' conftest.$ac_ext >&5
23040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023041 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023043
23044rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023045 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023046fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023047{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23048echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23049if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023050 :
23051else
Martin v. Löwis11437992002-04-12 09:54:03 +000023052
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023053{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23054echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023055if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023056 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023057else
Martin v. Löwis11437992002-04-12 09:54:03 +000023058 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023059LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023060cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023061/* confdefs.h. */
23062_ACEOF
23063cat confdefs.h >>conftest.$ac_ext
23064cat >>conftest.$ac_ext <<_ACEOF
23065/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023066
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023067/* Override any GCC internal prototype to avoid an error.
23068 Use char because int might match the return type of a GCC
23069 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023070#ifdef __cplusplus
23071extern "C"
23072#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023073char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023074int
23075main ()
23076{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023077return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023078 ;
23079 return 0;
23080}
23081_ACEOF
23082rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023083if { (ac_try="$ac_link"
23084case "(($ac_try" in
23085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23086 *) ac_try_echo=$ac_try;;
23087esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023089 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023091 grep -v '^ *+' conftest.er1 >conftest.err
23092 rm -f conftest.er1
23093 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023095 (exit $ac_status); } && {
23096 test -z "$ac_c_werror_flag" ||
23097 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023098 } && test -s conftest$ac_exeext &&
23099 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023100 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023101else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023103sed 's/^/| /' conftest.$ac_ext >&5
23104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023105 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023107
23108rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023109 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023110LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023111fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023112{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23113echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23114if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023115 cat >>confdefs.h <<_ACEOF
23116#define HAVE_LIBIEEE 1
23117_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023118
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023119 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023120
Guido van Rossum627b2d71993-12-24 10:39:16 +000023121fi
23122
Michael W. Hudson54241132001-12-07 15:38:26 +000023123
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023124fi
23125
Michael W. Hudson54241132001-12-07 15:38:26 +000023126
Guido van Rossum7f253911997-05-09 02:42:48 +000023127# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023128{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23129echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023130
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023131# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023132if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023133 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023134if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023135then
23136
23137cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023138#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023139_ACEOF
23140
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023141 { echo "$as_me:$LINENO: result: yes" >&5
23142echo "${ECHO_T}yes" >&6; }
23143else { echo "$as_me:$LINENO: result: no" >&5
23144echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023145fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023146else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023147 { echo "$as_me:$LINENO: result: no" >&5
23148echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023149fi
23150
Guido van Rossum7f253911997-05-09 02:42:48 +000023151
Guido van Rossum7f43da71994-08-01 12:15:30 +000023152# check for --with-libm=...
23153
Guido van Rossum563e7081996-09-10 18:20:48 +000023154case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023155Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023156*) LIBM=-lm
23157esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023158{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23159echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023161# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023162if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023163 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023164if test "$withval" = no
23165then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023166 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23167echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023168elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023169then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023170 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23171echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23172else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23173echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023174 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023175fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023176else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023177 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23178echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023179fi
23180
Guido van Rossum7f43da71994-08-01 12:15:30 +000023181
23182# check for --with-libc=...
23183
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023184{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23185echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023187# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023188if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023189 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023190if test "$withval" = no
23191then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023192 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23193echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023194elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023195then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023196 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23197echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23198else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23199echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023200 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023201fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023202else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023203 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23204echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023205fi
23206
Guido van Rossum7f43da71994-08-01 12:15:30 +000023207
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023208# **************************************************
23209# * Check for various properties of floating point *
23210# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023211
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023212{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23213echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023214if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023215 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023216else
23217
23218if test "$cross_compiling" = yes; then
23219 ac_cv_little_endian_double=no
23220else
23221 cat >conftest.$ac_ext <<_ACEOF
23222/* confdefs.h. */
23223_ACEOF
23224cat confdefs.h >>conftest.$ac_ext
23225cat >>conftest.$ac_ext <<_ACEOF
23226/* end confdefs.h. */
23227
23228#include <string.h>
23229int main() {
23230 double x = 9006104071832581.0;
23231 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23232 return 0;
23233 else
23234 return 1;
23235}
23236
23237_ACEOF
23238rm -f conftest$ac_exeext
23239if { (ac_try="$ac_link"
23240case "(($ac_try" in
23241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23242 *) ac_try_echo=$ac_try;;
23243esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023245 (eval "$ac_link") 2>&5
23246 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023248 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23249 { (case "(($ac_try" in
23250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23251 *) ac_try_echo=$ac_try;;
23252esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023254 (eval "$ac_try") 2>&5
23255 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023257 (exit $ac_status); }; }; then
23258 ac_cv_little_endian_double=yes
23259else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023260 echo "$as_me: program exited with status $ac_status" >&5
23261echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023262sed 's/^/| /' conftest.$ac_ext >&5
23263
23264( exit $ac_status )
23265ac_cv_little_endian_double=no
23266fi
23267rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23268fi
23269
23270
23271fi
23272
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023273{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23274echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023275if test "$ac_cv_little_endian_double" = yes
23276then
23277
23278cat >>confdefs.h <<\_ACEOF
23279#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23280_ACEOF
23281
23282fi
23283
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023284{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23285echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023286if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023287 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023288else
23289
23290if test "$cross_compiling" = yes; then
23291 ac_cv_big_endian_double=no
23292else
23293 cat >conftest.$ac_ext <<_ACEOF
23294/* confdefs.h. */
23295_ACEOF
23296cat confdefs.h >>conftest.$ac_ext
23297cat >>conftest.$ac_ext <<_ACEOF
23298/* end confdefs.h. */
23299
23300#include <string.h>
23301int main() {
23302 double x = 9006104071832581.0;
23303 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23304 return 0;
23305 else
23306 return 1;
23307}
23308
23309_ACEOF
23310rm -f conftest$ac_exeext
23311if { (ac_try="$ac_link"
23312case "(($ac_try" in
23313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23314 *) ac_try_echo=$ac_try;;
23315esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023317 (eval "$ac_link") 2>&5
23318 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023320 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23321 { (case "(($ac_try" in
23322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23323 *) ac_try_echo=$ac_try;;
23324esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023326 (eval "$ac_try") 2>&5
23327 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023329 (exit $ac_status); }; }; then
23330 ac_cv_big_endian_double=yes
23331else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023332 echo "$as_me: program exited with status $ac_status" >&5
23333echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023334sed 's/^/| /' conftest.$ac_ext >&5
23335
23336( exit $ac_status )
23337ac_cv_big_endian_double=no
23338fi
23339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23340fi
23341
23342
23343fi
23344
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023345{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23346echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023347if test "$ac_cv_big_endian_double" = yes
23348then
23349
23350cat >>confdefs.h <<\_ACEOF
23351#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23352_ACEOF
23353
23354fi
23355
23356# Some ARM platforms use a mixed-endian representation for doubles.
23357# While Python doesn't currently have full support for these platforms
23358# (see e.g., issue 1762561), we can at least make sure that float <-> string
23359# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023360{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23361echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023362if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023363 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023364else
23365
23366if test "$cross_compiling" = yes; then
23367 ac_cv_mixed_endian_double=no
23368else
23369 cat >conftest.$ac_ext <<_ACEOF
23370/* confdefs.h. */
23371_ACEOF
23372cat confdefs.h >>conftest.$ac_ext
23373cat >>conftest.$ac_ext <<_ACEOF
23374/* end confdefs.h. */
23375
23376#include <string.h>
23377int main() {
23378 double x = 9006104071832581.0;
23379 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23380 return 0;
23381 else
23382 return 1;
23383}
23384
23385_ACEOF
23386rm -f conftest$ac_exeext
23387if { (ac_try="$ac_link"
23388case "(($ac_try" in
23389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23390 *) ac_try_echo=$ac_try;;
23391esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023393 (eval "$ac_link") 2>&5
23394 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023396 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23397 { (case "(($ac_try" in
23398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23399 *) ac_try_echo=$ac_try;;
23400esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023402 (eval "$ac_try") 2>&5
23403 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023405 (exit $ac_status); }; }; then
23406 ac_cv_mixed_endian_double=yes
23407else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023408 echo "$as_me: program exited with status $ac_status" >&5
23409echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023410sed 's/^/| /' conftest.$ac_ext >&5
23411
23412( exit $ac_status )
23413ac_cv_mixed_endian_double=no
23414fi
23415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23416fi
23417
23418
23419fi
23420
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023421{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23422echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023423if test "$ac_cv_mixed_endian_double" = yes
23424then
23425
23426cat >>confdefs.h <<\_ACEOF
23427#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23428_ACEOF
23429
23430fi
23431
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023432# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023433# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023434# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023435# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023436# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000023437# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023438
23439# This inline assembler syntax may also work for suncc and icc,
23440# so we try it on all platforms.
23441
23442{ 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 +000023443echo $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 +000023444cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023445/* confdefs.h. */
23446_ACEOF
23447cat confdefs.h >>conftest.$ac_ext
23448cat >>conftest.$ac_ext <<_ACEOF
23449/* end confdefs.h. */
23450
23451int
23452main ()
23453{
23454
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023455 unsigned short cw;
23456 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23457 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023458
23459 ;
23460 return 0;
23461}
23462_ACEOF
23463rm -f conftest.$ac_objext
23464if { (ac_try="$ac_compile"
23465case "(($ac_try" in
23466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23467 *) ac_try_echo=$ac_try;;
23468esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023470 (eval "$ac_compile") 2>conftest.er1
23471 ac_status=$?
23472 grep -v '^ *+' conftest.er1 >conftest.err
23473 rm -f conftest.er1
23474 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023476 (exit $ac_status); } && {
23477 test -z "$ac_c_werror_flag" ||
23478 test ! -s conftest.err
23479 } && test -s conftest.$ac_objext; then
23480 have_gcc_asm_for_x87=yes
23481else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023482 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023483sed 's/^/| /' conftest.$ac_ext >&5
23484
23485 have_gcc_asm_for_x87=no
23486fi
23487
23488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023489{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023490echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023491if test "$have_gcc_asm_for_x87" = yes
23492then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023493
23494cat >>confdefs.h <<\_ACEOF
23495#define HAVE_GCC_ASM_FOR_X87 1
23496_ACEOF
23497
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023498fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023499
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023500# Detect whether system arithmetic is subject to x87-style double
23501# rounding issues. The result of this test has little meaning on non
23502# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23503# mode is round-to-nearest and double rounding issues are present, and
23504# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023505{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23506echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023507# $BASECFLAGS may affect the result
23508ac_save_cc="$CC"
23509CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023510if test "$cross_compiling" = yes; then
23511 ac_cv_x87_double_rounding=no
23512else
23513 cat >conftest.$ac_ext <<_ACEOF
23514/* confdefs.h. */
23515_ACEOF
23516cat confdefs.h >>conftest.$ac_ext
23517cat >>conftest.$ac_ext <<_ACEOF
23518/* end confdefs.h. */
23519
23520#include <stdlib.h>
23521#include <math.h>
23522int main() {
23523 volatile double x, y, z;
23524 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23525 x = 0.99999999999999989; /* 1-2**-53 */
23526 y = 1./x;
23527 if (y != 1.)
23528 exit(0);
23529 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23530 x = 1e16;
23531 y = 2.99999;
23532 z = x + y;
23533 if (z != 1e16+4.)
23534 exit(0);
23535 /* both tests show evidence of double rounding */
23536 exit(1);
23537}
23538
23539_ACEOF
23540rm -f conftest$ac_exeext
23541if { (ac_try="$ac_link"
23542case "(($ac_try" in
23543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23544 *) ac_try_echo=$ac_try;;
23545esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023547 (eval "$ac_link") 2>&5
23548 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023550 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23551 { (case "(($ac_try" in
23552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23553 *) ac_try_echo=$ac_try;;
23554esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023556 (eval "$ac_try") 2>&5
23557 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023559 (exit $ac_status); }; }; then
23560 ac_cv_x87_double_rounding=no
23561else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023562 echo "$as_me: program exited with status $ac_status" >&5
23563echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023564sed 's/^/| /' conftest.$ac_ext >&5
23565
23566( exit $ac_status )
23567ac_cv_x87_double_rounding=yes
23568fi
23569rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23570fi
23571
23572
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023573CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023574{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23575echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023576if test "$ac_cv_x87_double_rounding" = yes
23577then
23578
23579cat >>confdefs.h <<\_ACEOF
23580#define X87_DOUBLE_ROUNDING 1
23581_ACEOF
23582
23583fi
23584
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023585# ************************************
23586# * Check for mathematical functions *
23587# ************************************
23588
23589LIBS_SAVE=$LIBS
23590LIBS="$LIBS $LIBM"
23591
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023592# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23593# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023594{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23595echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023596if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023597 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023598else
23599
23600if test "$cross_compiling" = yes; then
23601 ac_cv_tanh_preserves_zero_sign=no
23602else
23603 cat >conftest.$ac_ext <<_ACEOF
23604/* confdefs.h. */
23605_ACEOF
23606cat confdefs.h >>conftest.$ac_ext
23607cat >>conftest.$ac_ext <<_ACEOF
23608/* end confdefs.h. */
23609
23610#include <math.h>
23611#include <stdlib.h>
23612int main() {
23613 /* return 0 if either negative zeros don't exist
23614 on this platform or if negative zeros exist
23615 and tanh(-0.) == -0. */
23616 if (atan2(0., -1.) == atan2(-0., -1.) ||
23617 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23618 else exit(1);
23619}
23620
23621_ACEOF
23622rm -f conftest$ac_exeext
23623if { (ac_try="$ac_link"
23624case "(($ac_try" in
23625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23626 *) ac_try_echo=$ac_try;;
23627esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023629 (eval "$ac_link") 2>&5
23630 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023632 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23633 { (case "(($ac_try" in
23634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23635 *) ac_try_echo=$ac_try;;
23636esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023638 (eval "$ac_try") 2>&5
23639 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023641 (exit $ac_status); }; }; then
23642 ac_cv_tanh_preserves_zero_sign=yes
23643else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023644 echo "$as_me: program exited with status $ac_status" >&5
23645echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023646sed 's/^/| /' conftest.$ac_ext >&5
23647
23648( exit $ac_status )
23649ac_cv_tanh_preserves_zero_sign=no
23650fi
23651rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23652fi
23653
23654
23655fi
23656
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023657{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23658echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023659if test "$ac_cv_tanh_preserves_zero_sign" = yes
23660then
23661
23662cat >>confdefs.h <<\_ACEOF
23663#define TANH_PRESERVES_ZERO_SIGN 1
23664_ACEOF
23665
23666fi
23667
23668
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023669
Michael W. Hudson54241132001-12-07 15:38:26 +000023670
Christian Heimes99170a52007-12-19 02:07:34 +000023671
23672
23673
23674
23675
Mark Dickinsonf2537862009-04-18 13:58:18 +000023676
Mark Dickinson9c113362009-09-05 10:36:23 +000023677for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23678do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023679as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23680{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23681echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023682if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023683 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023684else
23685 cat >conftest.$ac_ext <<_ACEOF
23686/* confdefs.h. */
23687_ACEOF
23688cat confdefs.h >>conftest.$ac_ext
23689cat >>conftest.$ac_ext <<_ACEOF
23690/* end confdefs.h. */
23691/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23692 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23693#define $ac_func innocuous_$ac_func
23694
23695/* System header to define __stub macros and hopefully few prototypes,
23696 which can conflict with char $ac_func (); below.
23697 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23698 <limits.h> exists even on freestanding compilers. */
23699
23700#ifdef __STDC__
23701# include <limits.h>
23702#else
23703# include <assert.h>
23704#endif
23705
23706#undef $ac_func
23707
23708/* Override any GCC internal prototype to avoid an error.
23709 Use char because int might match the return type of a GCC
23710 builtin and then its argument prototype would still apply. */
23711#ifdef __cplusplus
23712extern "C"
23713#endif
23714char $ac_func ();
23715/* The GNU C library defines this for functions which it implements
23716 to always fail with ENOSYS. Some functions are actually named
23717 something starting with __ and the normal name is an alias. */
23718#if defined __stub_$ac_func || defined __stub___$ac_func
23719choke me
23720#endif
23721
23722int
23723main ()
23724{
23725return $ac_func ();
23726 ;
23727 return 0;
23728}
23729_ACEOF
23730rm -f conftest.$ac_objext conftest$ac_exeext
23731if { (ac_try="$ac_link"
23732case "(($ac_try" in
23733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23734 *) ac_try_echo=$ac_try;;
23735esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023737 (eval "$ac_link") 2>conftest.er1
23738 ac_status=$?
23739 grep -v '^ *+' conftest.er1 >conftest.err
23740 rm -f conftest.er1
23741 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023743 (exit $ac_status); } && {
23744 test -z "$ac_c_werror_flag" ||
23745 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023746 } && test -s conftest$ac_exeext &&
23747 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023748 eval "$as_ac_var=yes"
23749else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023750 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023751sed 's/^/| /' conftest.$ac_ext >&5
23752
23753 eval "$as_ac_var=no"
23754fi
23755
23756rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23757 conftest$ac_exeext conftest.$ac_ext
23758fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023759ac_res=`eval echo '${'$as_ac_var'}'`
23760 { echo "$as_me:$LINENO: result: $ac_res" >&5
23761echo "${ECHO_T}$ac_res" >&6; }
23762if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023763 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023764#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023765_ACEOF
23766
23767fi
23768done
23769
23770
23771
23772
23773
23774
23775for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023776do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023777as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23778{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23779echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023780if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023781 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023782else
23783 cat >conftest.$ac_ext <<_ACEOF
23784/* confdefs.h. */
23785_ACEOF
23786cat confdefs.h >>conftest.$ac_ext
23787cat >>conftest.$ac_ext <<_ACEOF
23788/* end confdefs.h. */
23789/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23790 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23791#define $ac_func innocuous_$ac_func
23792
23793/* System header to define __stub macros and hopefully few prototypes,
23794 which can conflict with char $ac_func (); below.
23795 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23796 <limits.h> exists even on freestanding compilers. */
23797
23798#ifdef __STDC__
23799# include <limits.h>
23800#else
23801# include <assert.h>
23802#endif
23803
23804#undef $ac_func
23805
23806/* Override any GCC internal prototype to avoid an error.
23807 Use char because int might match the return type of a GCC
23808 builtin and then its argument prototype would still apply. */
23809#ifdef __cplusplus
23810extern "C"
23811#endif
23812char $ac_func ();
23813/* The GNU C library defines this for functions which it implements
23814 to always fail with ENOSYS. Some functions are actually named
23815 something starting with __ and the normal name is an alias. */
23816#if defined __stub_$ac_func || defined __stub___$ac_func
23817choke me
23818#endif
23819
23820int
23821main ()
23822{
23823return $ac_func ();
23824 ;
23825 return 0;
23826}
23827_ACEOF
23828rm -f conftest.$ac_objext conftest$ac_exeext
23829if { (ac_try="$ac_link"
23830case "(($ac_try" in
23831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23832 *) ac_try_echo=$ac_try;;
23833esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023835 (eval "$ac_link") 2>conftest.er1
23836 ac_status=$?
23837 grep -v '^ *+' conftest.er1 >conftest.err
23838 rm -f conftest.er1
23839 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023841 (exit $ac_status); } && {
23842 test -z "$ac_c_werror_flag" ||
23843 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023844 } && test -s conftest$ac_exeext &&
23845 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023846 eval "$as_ac_var=yes"
23847else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023848 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023849sed 's/^/| /' conftest.$ac_ext >&5
23850
23851 eval "$as_ac_var=no"
23852fi
23853
23854rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23855 conftest$ac_exeext conftest.$ac_ext
23856fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023857ac_res=`eval echo '${'$as_ac_var'}'`
23858 { echo "$as_me:$LINENO: result: $ac_res" >&5
23859echo "${ECHO_T}$ac_res" >&6; }
23860if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023861 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023862#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023863_ACEOF
23864
23865fi
23866done
23867
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023868{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23869echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023870if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023871 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023872else
23873 cat >conftest.$ac_ext <<_ACEOF
23874/* confdefs.h. */
23875_ACEOF
23876cat confdefs.h >>conftest.$ac_ext
23877cat >>conftest.$ac_ext <<_ACEOF
23878/* end confdefs.h. */
23879#include <math.h>
23880
23881int
23882main ()
23883{
23884#ifndef isinf
23885 (void) isinf;
23886#endif
23887
23888 ;
23889 return 0;
23890}
23891_ACEOF
23892rm -f conftest.$ac_objext
23893if { (ac_try="$ac_compile"
23894case "(($ac_try" in
23895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23896 *) ac_try_echo=$ac_try;;
23897esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023899 (eval "$ac_compile") 2>conftest.er1
23900 ac_status=$?
23901 grep -v '^ *+' conftest.er1 >conftest.err
23902 rm -f conftest.er1
23903 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023905 (exit $ac_status); } && {
23906 test -z "$ac_c_werror_flag" ||
23907 test ! -s conftest.err
23908 } && test -s conftest.$ac_objext; then
23909 ac_cv_have_decl_isinf=yes
23910else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023911 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023912sed 's/^/| /' conftest.$ac_ext >&5
23913
23914 ac_cv_have_decl_isinf=no
23915fi
23916
23917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23918fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023919{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23920echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23921if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023922
23923cat >>confdefs.h <<_ACEOF
23924#define HAVE_DECL_ISINF 1
23925_ACEOF
23926
23927
23928else
23929 cat >>confdefs.h <<_ACEOF
23930#define HAVE_DECL_ISINF 0
23931_ACEOF
23932
23933
23934fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023935{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23936echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023937if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023938 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023939else
23940 cat >conftest.$ac_ext <<_ACEOF
23941/* confdefs.h. */
23942_ACEOF
23943cat confdefs.h >>conftest.$ac_ext
23944cat >>conftest.$ac_ext <<_ACEOF
23945/* end confdefs.h. */
23946#include <math.h>
23947
23948int
23949main ()
23950{
23951#ifndef isnan
23952 (void) isnan;
23953#endif
23954
23955 ;
23956 return 0;
23957}
23958_ACEOF
23959rm -f conftest.$ac_objext
23960if { (ac_try="$ac_compile"
23961case "(($ac_try" in
23962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23963 *) ac_try_echo=$ac_try;;
23964esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023966 (eval "$ac_compile") 2>conftest.er1
23967 ac_status=$?
23968 grep -v '^ *+' conftest.er1 >conftest.err
23969 rm -f conftest.er1
23970 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023972 (exit $ac_status); } && {
23973 test -z "$ac_c_werror_flag" ||
23974 test ! -s conftest.err
23975 } && test -s conftest.$ac_objext; then
23976 ac_cv_have_decl_isnan=yes
23977else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023978 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023979sed 's/^/| /' conftest.$ac_ext >&5
23980
23981 ac_cv_have_decl_isnan=no
23982fi
23983
23984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23985fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023986{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23987echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23988if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023989
23990cat >>confdefs.h <<_ACEOF
23991#define HAVE_DECL_ISNAN 1
23992_ACEOF
23993
23994
23995else
23996 cat >>confdefs.h <<_ACEOF
23997#define HAVE_DECL_ISNAN 0
23998_ACEOF
23999
24000
24001fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024002{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24003echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024004if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024005 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024006else
24007 cat >conftest.$ac_ext <<_ACEOF
24008/* confdefs.h. */
24009_ACEOF
24010cat confdefs.h >>conftest.$ac_ext
24011cat >>conftest.$ac_ext <<_ACEOF
24012/* end confdefs.h. */
24013#include <math.h>
24014
24015int
24016main ()
24017{
24018#ifndef isfinite
24019 (void) isfinite;
24020#endif
24021
24022 ;
24023 return 0;
24024}
24025_ACEOF
24026rm -f conftest.$ac_objext
24027if { (ac_try="$ac_compile"
24028case "(($ac_try" in
24029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24030 *) ac_try_echo=$ac_try;;
24031esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024033 (eval "$ac_compile") 2>conftest.er1
24034 ac_status=$?
24035 grep -v '^ *+' conftest.er1 >conftest.err
24036 rm -f conftest.er1
24037 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024039 (exit $ac_status); } && {
24040 test -z "$ac_c_werror_flag" ||
24041 test ! -s conftest.err
24042 } && test -s conftest.$ac_objext; then
24043 ac_cv_have_decl_isfinite=yes
24044else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024045 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024046sed 's/^/| /' conftest.$ac_ext >&5
24047
24048 ac_cv_have_decl_isfinite=no
24049fi
24050
24051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24052fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024053{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24054echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24055if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024056
24057cat >>confdefs.h <<_ACEOF
24058#define HAVE_DECL_ISFINITE 1
24059_ACEOF
24060
24061
24062else
24063 cat >>confdefs.h <<_ACEOF
24064#define HAVE_DECL_ISFINITE 0
24065_ACEOF
24066
24067
24068fi
24069
24070
Christian Heimes99170a52007-12-19 02:07:34 +000024071
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024072LIBS=$LIBS_SAVE
24073
Mark Dickinsona614f042009-11-28 12:48:43 +000024074# For multiprocessing module, check that sem_open
24075# actually works. For FreeBSD versions <= 7.2,
24076# the kernel module that provides POSIX semaphores
24077# isn't loaded by default, so an attempt to call
24078# sem_open results in a 'Signal 12' error.
24079{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24080echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24081if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24082 echo $ECHO_N "(cached) $ECHO_C" >&6
24083else
24084 if test "$cross_compiling" = yes; then
24085 ac_cv_posix_semaphores_enabled=yes
24086else
24087 cat >conftest.$ac_ext <<_ACEOF
24088/* confdefs.h. */
24089_ACEOF
24090cat confdefs.h >>conftest.$ac_ext
24091cat >>conftest.$ac_ext <<_ACEOF
24092/* end confdefs.h. */
24093
24094#include <unistd.h>
24095#include <fcntl.h>
24096#include <stdio.h>
24097#include <semaphore.h>
24098#include <sys/stat.h>
24099
24100int main(void) {
24101 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24102 if (a == SEM_FAILED) {
24103 perror("sem_open");
24104 return 1;
24105 }
24106 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024107 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000024108 return 0;
24109}
24110
24111_ACEOF
24112rm -f conftest$ac_exeext
24113if { (ac_try="$ac_link"
24114case "(($ac_try" in
24115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24116 *) ac_try_echo=$ac_try;;
24117esac
24118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24119 (eval "$ac_link") 2>&5
24120 ac_status=$?
24121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24122 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24123 { (case "(($ac_try" in
24124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24125 *) ac_try_echo=$ac_try;;
24126esac
24127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24128 (eval "$ac_try") 2>&5
24129 ac_status=$?
24130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24131 (exit $ac_status); }; }; then
24132 ac_cv_posix_semaphores_enabled=yes
24133else
24134 echo "$as_me: program exited with status $ac_status" >&5
24135echo "$as_me: failed program was:" >&5
24136sed 's/^/| /' conftest.$ac_ext >&5
24137
24138( exit $ac_status )
24139ac_cv_posix_semaphores_enabled=no
24140fi
24141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24142fi
24143
24144
24145
24146fi
24147
24148{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24149echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24150if test $ac_cv_posix_semaphores_enabled = no
24151then
24152
24153cat >>confdefs.h <<\_ACEOF
24154#define POSIX_SEMAPHORES_NOT_ENABLED 1
24155_ACEOF
24156
24157fi
24158
Mark Dickinson10683072009-04-18 21:18:19 +000024159# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024160{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24161echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024162if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024163 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024164else
24165 if test "$cross_compiling" = yes; then
24166 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000024167else
24168 cat >conftest.$ac_ext <<_ACEOF
24169/* confdefs.h. */
24170_ACEOF
24171cat confdefs.h >>conftest.$ac_ext
24172cat >>conftest.$ac_ext <<_ACEOF
24173/* end confdefs.h. */
24174
24175#include <unistd.h>
24176#include <fcntl.h>
24177#include <stdio.h>
24178#include <semaphore.h>
24179#include <sys/stat.h>
24180
24181int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000024182 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000024183 int count;
24184 int res;
24185 if(a==SEM_FAILED){
24186 perror("sem_open");
24187 return 1;
24188
24189 }
24190 res = sem_getvalue(a, &count);
24191 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024192 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000024193 return res==-1 ? 1 : 0;
24194}
24195
Mark Dickinson10683072009-04-18 21:18:19 +000024196_ACEOF
24197rm -f conftest$ac_exeext
24198if { (ac_try="$ac_link"
24199case "(($ac_try" in
24200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24201 *) ac_try_echo=$ac_try;;
24202esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024204 (eval "$ac_link") 2>&5
24205 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024207 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24208 { (case "(($ac_try" in
24209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24210 *) ac_try_echo=$ac_try;;
24211esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024213 (eval "$ac_try") 2>&5
24214 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024216 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024217 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000024218else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024219 echo "$as_me: program exited with status $ac_status" >&5
24220echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024221sed 's/^/| /' conftest.$ac_ext >&5
24222
24223( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024224ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024225fi
24226rm -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 +000024227fi
24228
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024229
24230
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024231fi
24232
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024233{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24234echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024235if test $ac_cv_broken_sem_getvalue = yes
24236then
24237
24238cat >>confdefs.h <<\_ACEOF
24239#define HAVE_BROKEN_SEM_GETVALUE 1
24240_ACEOF
24241
24242fi
24243
Mark Dickinsonbd792642009-03-18 20:06:12 +000024244# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024245{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24246echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024247# Check whether --enable-big-digits was given.
24248if test "${enable_big_digits+set}" = set; then
24249 enableval=$enable_big_digits; case $enable_big_digits in
24250yes)
24251 enable_big_digits=30 ;;
24252no)
24253 enable_big_digits=15 ;;
2425415|30)
24255 ;;
24256*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024257 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24258echo "$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 +000024259 { (exit 1); exit 1; }; } ;;
24260esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024261{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24262echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024263
24264cat >>confdefs.h <<_ACEOF
24265#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24266_ACEOF
24267
24268
24269else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024270 { echo "$as_me:$LINENO: result: no value specified" >&5
24271echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024272fi
24273
24274
Guido van Rossumef2255b2000-03-10 22:30:29 +000024275# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024276if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024277 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24278echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024279if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024280 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024281fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024282{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24283echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024284else
Martin v. Löwis11437992002-04-12 09:54:03 +000024285 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024286{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24287echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024288cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024289/* confdefs.h. */
24290_ACEOF
24291cat confdefs.h >>conftest.$ac_ext
24292cat >>conftest.$ac_ext <<_ACEOF
24293/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024294$ac_includes_default
24295#include <wchar.h>
24296_ACEOF
24297rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024298if { (ac_try="$ac_compile"
24299case "(($ac_try" in
24300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24301 *) ac_try_echo=$ac_try;;
24302esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024304 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024305 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024306 grep -v '^ *+' conftest.er1 >conftest.err
24307 rm -f conftest.er1
24308 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024310 (exit $ac_status); } && {
24311 test -z "$ac_c_werror_flag" ||
24312 test ! -s conftest.err
24313 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024314 ac_header_compiler=yes
24315else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024317sed 's/^/| /' conftest.$ac_ext >&5
24318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024319 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024321
24322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024323{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24324echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024325
24326# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024327{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24328echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024329cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024330/* confdefs.h. */
24331_ACEOF
24332cat confdefs.h >>conftest.$ac_ext
24333cat >>conftest.$ac_ext <<_ACEOF
24334/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024335#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024336_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024337if { (ac_try="$ac_cpp conftest.$ac_ext"
24338case "(($ac_try" in
24339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24340 *) ac_try_echo=$ac_try;;
24341esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024343 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024344 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024345 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024346 rm -f conftest.er1
24347 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024349 (exit $ac_status); } >/dev/null && {
24350 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24351 test ! -s conftest.err
24352 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024353 ac_header_preproc=yes
24354else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024356sed 's/^/| /' conftest.$ac_ext >&5
24357
Martin v. Löwis11437992002-04-12 09:54:03 +000024358 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024360
Martin v. Löwis11437992002-04-12 09:54:03 +000024361rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024362{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24363echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024364
24365# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024366case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24367 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024368 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24369echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24370 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24371echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024372 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024373 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024374 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024375 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24376echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24377 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24378echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24379 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24380echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24381 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24382echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24383 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24384echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24385 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24386echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024387 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024388## -------------------------------------- ##
24389## Report this to http://bugs.python.org/ ##
24390## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024391_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024392 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024393 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024394esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024395{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24396echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024397if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024398 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024399else
24400 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024401fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024402{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24403echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024404
24405fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024406if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024407
24408
24409cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024410#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024411_ACEOF
24412
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024413 wchar_h="yes"
24414
Guido van Rossumef2255b2000-03-10 22:30:29 +000024415else
Martin v. Löwis11437992002-04-12 09:54:03 +000024416 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024417
24418fi
24419
Michael W. Hudson54241132001-12-07 15:38:26 +000024420
Martin v. Löwis11437992002-04-12 09:54:03 +000024421
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024422# determine wchar_t size
24423if test "$wchar_h" = yes
24424then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024425 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24426echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24427if test "${ac_cv_type_wchar_t+set}" = set; then
24428 echo $ECHO_N "(cached) $ECHO_C" >&6
24429else
24430 cat >conftest.$ac_ext <<_ACEOF
24431/* confdefs.h. */
24432_ACEOF
24433cat confdefs.h >>conftest.$ac_ext
24434cat >>conftest.$ac_ext <<_ACEOF
24435/* end confdefs.h. */
24436#include <wchar.h>
24437
24438typedef wchar_t ac__type_new_;
24439int
24440main ()
24441{
24442if ((ac__type_new_ *) 0)
24443 return 0;
24444if (sizeof (ac__type_new_))
24445 return 0;
24446 ;
24447 return 0;
24448}
24449_ACEOF
24450rm -f conftest.$ac_objext
24451if { (ac_try="$ac_compile"
24452case "(($ac_try" in
24453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24454 *) ac_try_echo=$ac_try;;
24455esac
24456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24457 (eval "$ac_compile") 2>conftest.er1
24458 ac_status=$?
24459 grep -v '^ *+' conftest.er1 >conftest.err
24460 rm -f conftest.er1
24461 cat conftest.err >&5
24462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24463 (exit $ac_status); } && {
24464 test -z "$ac_c_werror_flag" ||
24465 test ! -s conftest.err
24466 } && test -s conftest.$ac_objext; then
24467 ac_cv_type_wchar_t=yes
24468else
24469 echo "$as_me: failed program was:" >&5
24470sed 's/^/| /' conftest.$ac_ext >&5
24471
24472 ac_cv_type_wchar_t=no
24473fi
24474
24475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24476fi
24477{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24478echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24479
24480# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024481# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24482# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24483# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024484{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24485echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024486if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024487 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024488else
Martin v. Löwis11437992002-04-12 09:54:03 +000024489 if test "$cross_compiling" = yes; then
24490 # Depending upon the size, compute the lo and hi bounds.
24491cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024492/* confdefs.h. */
24493_ACEOF
24494cat confdefs.h >>conftest.$ac_ext
24495cat >>conftest.$ac_ext <<_ACEOF
24496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024497#include <wchar.h>
24498
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024499 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024500int
24501main ()
24502{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024503static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024504test_array [0] = 0
24505
24506 ;
24507 return 0;
24508}
24509_ACEOF
24510rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024511if { (ac_try="$ac_compile"
24512case "(($ac_try" in
24513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24514 *) ac_try_echo=$ac_try;;
24515esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024519 grep -v '^ *+' conftest.er1 >conftest.err
24520 rm -f conftest.er1
24521 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024523 (exit $ac_status); } && {
24524 test -z "$ac_c_werror_flag" ||
24525 test ! -s conftest.err
24526 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024527 ac_lo=0 ac_mid=0
24528 while :; do
24529 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024530/* confdefs.h. */
24531_ACEOF
24532cat confdefs.h >>conftest.$ac_ext
24533cat >>conftest.$ac_ext <<_ACEOF
24534/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024535#include <wchar.h>
24536
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024537 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024538int
24539main ()
24540{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024541static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024542test_array [0] = 0
24543
24544 ;
24545 return 0;
24546}
24547_ACEOF
24548rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024549if { (ac_try="$ac_compile"
24550case "(($ac_try" in
24551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24552 *) ac_try_echo=$ac_try;;
24553esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024555 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024557 grep -v '^ *+' conftest.er1 >conftest.err
24558 rm -f conftest.er1
24559 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024561 (exit $ac_status); } && {
24562 test -z "$ac_c_werror_flag" ||
24563 test ! -s conftest.err
24564 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024565 ac_hi=$ac_mid; break
24566else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024568sed 's/^/| /' conftest.$ac_ext >&5
24569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024570 ac_lo=`expr $ac_mid + 1`
24571 if test $ac_lo -le $ac_mid; then
24572 ac_lo= ac_hi=
24573 break
24574 fi
24575 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024577
24578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024579 done
24580else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024582sed 's/^/| /' conftest.$ac_ext >&5
24583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024584 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024585/* confdefs.h. */
24586_ACEOF
24587cat confdefs.h >>conftest.$ac_ext
24588cat >>conftest.$ac_ext <<_ACEOF
24589/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024590#include <wchar.h>
24591
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024592 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024593int
24594main ()
24595{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024596static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024597test_array [0] = 0
24598
24599 ;
24600 return 0;
24601}
24602_ACEOF
24603rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024604if { (ac_try="$ac_compile"
24605case "(($ac_try" in
24606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24607 *) ac_try_echo=$ac_try;;
24608esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024610 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024612 grep -v '^ *+' conftest.er1 >conftest.err
24613 rm -f conftest.er1
24614 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024616 (exit $ac_status); } && {
24617 test -z "$ac_c_werror_flag" ||
24618 test ! -s conftest.err
24619 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024620 ac_hi=-1 ac_mid=-1
24621 while :; do
24622 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024623/* confdefs.h. */
24624_ACEOF
24625cat confdefs.h >>conftest.$ac_ext
24626cat >>conftest.$ac_ext <<_ACEOF
24627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024628#include <wchar.h>
24629
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024630 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024631int
24632main ()
24633{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024634static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024635test_array [0] = 0
24636
24637 ;
24638 return 0;
24639}
24640_ACEOF
24641rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024642if { (ac_try="$ac_compile"
24643case "(($ac_try" in
24644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24645 *) ac_try_echo=$ac_try;;
24646esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024648 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024649 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024650 grep -v '^ *+' conftest.er1 >conftest.err
24651 rm -f conftest.er1
24652 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024654 (exit $ac_status); } && {
24655 test -z "$ac_c_werror_flag" ||
24656 test ! -s conftest.err
24657 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024658 ac_lo=$ac_mid; break
24659else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024661sed 's/^/| /' conftest.$ac_ext >&5
24662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024663 ac_hi=`expr '(' $ac_mid ')' - 1`
24664 if test $ac_mid -le $ac_hi; then
24665 ac_lo= ac_hi=
24666 break
24667 fi
24668 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024670
24671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024672 done
24673else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024675sed 's/^/| /' conftest.$ac_ext >&5
24676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024677 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024679
24680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024682
24683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024684# Binary search between lo and hi bounds.
24685while test "x$ac_lo" != "x$ac_hi"; do
24686 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24687 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024688/* confdefs.h. */
24689_ACEOF
24690cat confdefs.h >>conftest.$ac_ext
24691cat >>conftest.$ac_ext <<_ACEOF
24692/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024693#include <wchar.h>
24694
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024695 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024696int
24697main ()
24698{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024699static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024700test_array [0] = 0
24701
24702 ;
24703 return 0;
24704}
24705_ACEOF
24706rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024707if { (ac_try="$ac_compile"
24708case "(($ac_try" in
24709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24710 *) ac_try_echo=$ac_try;;
24711esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024713 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024715 grep -v '^ *+' conftest.er1 >conftest.err
24716 rm -f conftest.er1
24717 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024719 (exit $ac_status); } && {
24720 test -z "$ac_c_werror_flag" ||
24721 test ! -s conftest.err
24722 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024723 ac_hi=$ac_mid
24724else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024726sed 's/^/| /' conftest.$ac_ext >&5
24727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024728 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024730
24731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024732done
24733case $ac_lo in
24734?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024735'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024736 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024737See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024738echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024739See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024740 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024741 else
24742 ac_cv_sizeof_wchar_t=0
24743 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024744esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024745else
Martin v. Löwis11437992002-04-12 09:54:03 +000024746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024747/* confdefs.h. */
24748_ACEOF
24749cat confdefs.h >>conftest.$ac_ext
24750cat >>conftest.$ac_ext <<_ACEOF
24751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024752#include <wchar.h>
24753
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024754 typedef wchar_t ac__type_sizeof_;
24755static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24756static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024757#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024758#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024759int
24760main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024761{
Martin v. Löwis11437992002-04-12 09:54:03 +000024762
24763 FILE *f = fopen ("conftest.val", "w");
24764 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024765 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024766 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024767 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024768 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024769 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024770 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024771 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024772 }
24773 else
24774 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024775 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024776 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024777 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024778 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024779 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024780 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024781
24782 ;
24783 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024784}
Martin v. Löwis11437992002-04-12 09:54:03 +000024785_ACEOF
24786rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024787if { (ac_try="$ac_link"
24788case "(($ac_try" in
24789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24790 *) ac_try_echo=$ac_try;;
24791esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024793 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024794 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024796 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024797 { (case "(($ac_try" in
24798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24799 *) ac_try_echo=$ac_try;;
24800esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024802 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024803 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024805 (exit $ac_status); }; }; then
24806 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024807else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024808 echo "$as_me: program exited with status $ac_status" >&5
24809echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024810sed 's/^/| /' conftest.$ac_ext >&5
24811
Martin v. Löwis11437992002-04-12 09:54:03 +000024812( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024813if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024814 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024815See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024816echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024817See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024818 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024819 else
24820 ac_cv_sizeof_wchar_t=0
24821 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024823rm -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 +000024824fi
24825rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024826fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024827{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24828echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024829
24830
24831
Martin v. Löwis11437992002-04-12 09:54:03 +000024832cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024833#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024834_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024835
Michael W. Hudson54241132001-12-07 15:38:26 +000024836
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024837fi
24838
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024839{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24840echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024841have_ucs4_tcl=no
24842cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024843/* confdefs.h. */
24844_ACEOF
24845cat confdefs.h >>conftest.$ac_ext
24846cat >>conftest.$ac_ext <<_ACEOF
24847/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024848
24849#include <tcl.h>
24850#if TCL_UTF_MAX != 6
24851# error "NOT UCS4_TCL"
24852#endif
24853int
24854main ()
24855{
24856
24857 ;
24858 return 0;
24859}
24860_ACEOF
24861rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024862if { (ac_try="$ac_compile"
24863case "(($ac_try" in
24864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24865 *) ac_try_echo=$ac_try;;
24866esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024868 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024870 grep -v '^ *+' conftest.er1 >conftest.err
24871 rm -f conftest.er1
24872 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024874 (exit $ac_status); } && {
24875 test -z "$ac_c_werror_flag" ||
24876 test ! -s conftest.err
24877 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024878
24879
24880cat >>confdefs.h <<\_ACEOF
24881#define HAVE_UCS4_TCL 1
24882_ACEOF
24883
24884 have_ucs4_tcl=yes
24885
24886else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024888sed 's/^/| /' conftest.$ac_ext >&5
24889
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024890
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024892
24893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024894{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24895echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024896
Skip Montanaro6dead952003-09-25 14:50:04 +000024897# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024898if test "$wchar_h" = yes
24899then
24900 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024901 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24902echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024903 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024904 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024905else
24906
24907 if test "$cross_compiling" = yes; then
24908 ac_cv_wchar_t_signed=yes
24909else
24910 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024911/* confdefs.h. */
24912_ACEOF
24913cat confdefs.h >>conftest.$ac_ext
24914cat >>conftest.$ac_ext <<_ACEOF
24915/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024916
24917 #include <wchar.h>
24918 int main()
24919 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024920 /* Success: exit code 0 */
24921 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024922 }
24923
24924_ACEOF
24925rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024926if { (ac_try="$ac_link"
24927case "(($ac_try" in
24928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24929 *) ac_try_echo=$ac_try;;
24930esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024932 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024933 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024935 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024936 { (case "(($ac_try" in
24937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24938 *) ac_try_echo=$ac_try;;
24939esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024941 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024942 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024944 (exit $ac_status); }; }; then
24945 ac_cv_wchar_t_signed=yes
24946else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024947 echo "$as_me: program exited with status $ac_status" >&5
24948echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024949sed 's/^/| /' conftest.$ac_ext >&5
24950
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024951( exit $ac_status )
24952ac_cv_wchar_t_signed=no
24953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024954rm -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 +000024955fi
24956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024957
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024958fi
24959
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024960 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24961echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024962fi
24963
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024964{ echo "$as_me:$LINENO: checking what type to use for str" >&5
24965echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000024966
24967# Check whether --with-wide-unicode was given.
24968if test "${with_wide_unicode+set}" = set; then
24969 withval=$with_wide_unicode;
24970if test "$withval" != no
24971then unicode_size="4"
24972else unicode_size="2"
24973fi
24974
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024975else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024976
Georg Brandl52d168a2008-01-07 18:10:24 +000024977case "$have_ucs4_tcl" in
24978 yes) unicode_size="4" ;;
24979 *) unicode_size="2" ;;
24980esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024981
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024982fi
24983
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024984
24985
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024986
Georg Brandl52d168a2008-01-07 18:10:24 +000024987case "$unicode_size" in
24988 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024989#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024990_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000024991 ;;
24992 *) cat >>confdefs.h <<\_ACEOF
24993#define Py_UNICODE_SIZE 2
24994_ACEOF
24995 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024996esac
24997
Michael W. Hudson54241132001-12-07 15:38:26 +000024998
Martin v. Löwis11437992002-04-12 09:54:03 +000024999
25000
Georg Brandl52d168a2008-01-07 18:10:24 +000025001# wchar_t is only usable if it maps to an unsigned type
25002if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025003 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000025004then
25005 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025006
Martin v. Löwis11437992002-04-12 09:54:03 +000025007cat >>confdefs.h <<\_ACEOF
25008#define HAVE_USABLE_WCHAR_T 1
25009_ACEOF
25010
Georg Brandl52d168a2008-01-07 18:10:24 +000025011 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025012#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025013_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025014
Georg Brandl52d168a2008-01-07 18:10:24 +000025015elif test "$ac_cv_sizeof_short" = "$unicode_size"
25016then
25017 PY_UNICODE_TYPE="unsigned short"
25018 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025019#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025020_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025021
Georg Brandl52d168a2008-01-07 18:10:24 +000025022elif test "$ac_cv_sizeof_long" = "$unicode_size"
25023then
25024 PY_UNICODE_TYPE="unsigned long"
25025 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025026#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025027_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025028
Georg Brandl52d168a2008-01-07 18:10:24 +000025029else
25030 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025031fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025032{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25033echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000025034
25035# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025036{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25037echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025038if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025039 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025040else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025041 # See if sys/param.h defines the BYTE_ORDER macro.
25042cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025043/* confdefs.h. */
25044_ACEOF
25045cat confdefs.h >>conftest.$ac_ext
25046cat >>conftest.$ac_ext <<_ACEOF
25047/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025048#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025049#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025050
Martin v. Löwis11437992002-04-12 09:54:03 +000025051int
25052main ()
25053{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025054#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25055 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25056 bogus endian macros
25057#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025058
25059 ;
25060 return 0;
25061}
25062_ACEOF
25063rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025064if { (ac_try="$ac_compile"
25065case "(($ac_try" in
25066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25067 *) ac_try_echo=$ac_try;;
25068esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025070 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025071 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025072 grep -v '^ *+' conftest.er1 >conftest.err
25073 rm -f conftest.er1
25074 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025076 (exit $ac_status); } && {
25077 test -z "$ac_c_werror_flag" ||
25078 test ! -s conftest.err
25079 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025080 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025081cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025082/* confdefs.h. */
25083_ACEOF
25084cat confdefs.h >>conftest.$ac_ext
25085cat >>conftest.$ac_ext <<_ACEOF
25086/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025087#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025088#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025089
Martin v. Löwis11437992002-04-12 09:54:03 +000025090int
25091main ()
25092{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025093#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025094 not big endian
25095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025096
25097 ;
25098 return 0;
25099}
25100_ACEOF
25101rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025102if { (ac_try="$ac_compile"
25103case "(($ac_try" in
25104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25105 *) ac_try_echo=$ac_try;;
25106esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025108 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025110 grep -v '^ *+' conftest.er1 >conftest.err
25111 rm -f conftest.er1
25112 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025114 (exit $ac_status); } && {
25115 test -z "$ac_c_werror_flag" ||
25116 test ! -s conftest.err
25117 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025118 ac_cv_c_bigendian=yes
25119else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025121sed 's/^/| /' conftest.$ac_ext >&5
25122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025123 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025125
25126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025127else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025128 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025129sed 's/^/| /' conftest.$ac_ext >&5
25130
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025131 # It does not; compile a test program.
25132if test "$cross_compiling" = yes; then
25133 # try to guess the endianness by grepping values into an object file
25134 ac_cv_c_bigendian=unknown
25135 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025136/* confdefs.h. */
25137_ACEOF
25138cat confdefs.h >>conftest.$ac_ext
25139cat >>conftest.$ac_ext <<_ACEOF
25140/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025141short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25142short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25143void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25144short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25145short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25146void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025147int
25148main ()
25149{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025150 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025151 ;
25152 return 0;
25153}
25154_ACEOF
25155rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025156if { (ac_try="$ac_compile"
25157case "(($ac_try" in
25158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25159 *) ac_try_echo=$ac_try;;
25160esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025162 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025164 grep -v '^ *+' conftest.er1 >conftest.err
25165 rm -f conftest.er1
25166 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025168 (exit $ac_status); } && {
25169 test -z "$ac_c_werror_flag" ||
25170 test ! -s conftest.err
25171 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025172 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025173 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025174fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025175if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25176 if test "$ac_cv_c_bigendian" = unknown; then
25177 ac_cv_c_bigendian=no
25178 else
25179 # finding both strings is unlikely to happen, but who knows?
25180 ac_cv_c_bigendian=unknown
25181 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025182fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025183else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025185sed 's/^/| /' conftest.$ac_ext >&5
25186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025187
Martin v. Löwis11437992002-04-12 09:54:03 +000025188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025189
25190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025191else
25192 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025193/* confdefs.h. */
25194_ACEOF
25195cat confdefs.h >>conftest.$ac_ext
25196cat >>conftest.$ac_ext <<_ACEOF
25197/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025198$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025199int
25200main ()
25201{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025202
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025203 /* Are we little or big endian? From Harbison&Steele. */
25204 union
25205 {
25206 long int l;
25207 char c[sizeof (long int)];
25208 } u;
25209 u.l = 1;
25210 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025211
25212 ;
25213 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025214}
Martin v. Löwis11437992002-04-12 09:54:03 +000025215_ACEOF
25216rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025217if { (ac_try="$ac_link"
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_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025224 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025226 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025227 { (case "(($ac_try" in
25228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25229 *) ac_try_echo=$ac_try;;
25230esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025232 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025233 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025235 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025236 ac_cv_c_bigendian=no
25237else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025238 echo "$as_me: program exited with status $ac_status" >&5
25239echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025240sed 's/^/| /' conftest.$ac_ext >&5
25241
Martin v. Löwis11437992002-04-12 09:54:03 +000025242( exit $ac_status )
25243ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025245rm -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 +000025246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025247
25248
Martin v. Löwis11437992002-04-12 09:54:03 +000025249fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025250
25251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25252fi
25253{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25254echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25255case $ac_cv_c_bigendian in
25256 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025257
25258cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025259#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025260_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025261 ;;
25262 no)
25263 ;;
25264 *)
25265 { { echo "$as_me:$LINENO: error: unknown endianness
25266presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25267echo "$as_me: error: unknown endianness
25268presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025269 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025270esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025271
Michael W. Hudson54241132001-12-07 15:38:26 +000025272
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025273# Check whether right shifting a negative integer extends the sign bit
25274# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025275{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25276echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025277if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025278 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025279else
Martin v. Löwis11437992002-04-12 09:54:03 +000025280
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025281if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025282 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025283else
Martin v. Löwis11437992002-04-12 09:54:03 +000025284 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025285/* confdefs.h. */
25286_ACEOF
25287cat confdefs.h >>conftest.$ac_ext
25288cat >>conftest.$ac_ext <<_ACEOF
25289/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025290
25291int main()
25292{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025293 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025294}
25295
Martin v. Löwis11437992002-04-12 09:54:03 +000025296_ACEOF
25297rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025298if { (ac_try="$ac_link"
25299case "(($ac_try" in
25300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25301 *) ac_try_echo=$ac_try;;
25302esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025304 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025305 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025307 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025308 { (case "(($ac_try" in
25309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25310 *) ac_try_echo=$ac_try;;
25311esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025313 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025314 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025316 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025317 ac_cv_rshift_extends_sign=yes
25318else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025319 echo "$as_me: program exited with status $ac_status" >&5
25320echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025321sed 's/^/| /' conftest.$ac_ext >&5
25322
Martin v. Löwis11437992002-04-12 09:54:03 +000025323( exit $ac_status )
25324ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025326rm -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 +000025327fi
25328
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025329
25330fi
25331
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025332{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25333echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025334if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025335then
Martin v. Löwis11437992002-04-12 09:54:03 +000025336
25337cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025338#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025339_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025340
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025341fi
25342
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025343# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025344{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25345echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025346if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025347 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025348else
Martin v. Löwis11437992002-04-12 09:54:03 +000025349
25350cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025351/* confdefs.h. */
25352_ACEOF
25353cat confdefs.h >>conftest.$ac_ext
25354cat >>conftest.$ac_ext <<_ACEOF
25355/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025356#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025357int
25358main ()
25359{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025360
25361 FILE *f = fopen("/dev/null", "r");
25362 flockfile(f);
25363 getc_unlocked(f);
25364 funlockfile(f);
25365
Martin v. Löwis11437992002-04-12 09:54:03 +000025366 ;
25367 return 0;
25368}
25369_ACEOF
25370rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025371if { (ac_try="$ac_link"
25372case "(($ac_try" in
25373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25374 *) ac_try_echo=$ac_try;;
25375esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025377 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025378 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025379 grep -v '^ *+' conftest.er1 >conftest.err
25380 rm -f conftest.er1
25381 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025383 (exit $ac_status); } && {
25384 test -z "$ac_c_werror_flag" ||
25385 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025386 } && test -s conftest$ac_exeext &&
25387 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025388 ac_cv_have_getc_unlocked=yes
25389else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025391sed 's/^/| /' conftest.$ac_ext >&5
25392
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025393 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025395
25396rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025397 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025398fi
25399
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025400{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25401echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025402if test "$ac_cv_have_getc_unlocked" = yes
25403then
Martin v. Löwis11437992002-04-12 09:54:03 +000025404
25405cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025406#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025407_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025408
25409fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025410
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025411# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025412# save the value of LIBS so we don't actually link Python with readline
25413LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025414
Gregory P. Smith18820942008-09-07 06:24:49 +000025415# On some systems we need to link readline to a termcap compatible
25416# library. NOTE: Keep the precedence of listed libraries synchronised
25417# with setup.py.
25418py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025419{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25420echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025421for py_libtermcap in "" ncursesw ncurses curses termcap; do
25422 if test -z "$py_libtermcap"; then
25423 READLINE_LIBS="-lreadline"
25424 else
25425 READLINE_LIBS="-lreadline -l$py_libtermcap"
25426 fi
25427 LIBS="$READLINE_LIBS $LIBS_no_readline"
25428 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025429/* confdefs.h. */
25430_ACEOF
25431cat confdefs.h >>conftest.$ac_ext
25432cat >>conftest.$ac_ext <<_ACEOF
25433/* end confdefs.h. */
25434
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025435/* Override any GCC internal prototype to avoid an error.
25436 Use char because int might match the return type of a GCC
25437 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025438#ifdef __cplusplus
25439extern "C"
25440#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025441char readline ();
25442int
25443main ()
25444{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025445return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025446 ;
25447 return 0;
25448}
25449_ACEOF
25450rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025451if { (ac_try="$ac_link"
25452case "(($ac_try" in
25453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25454 *) ac_try_echo=$ac_try;;
25455esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025457 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025458 ac_status=$?
25459 grep -v '^ *+' conftest.er1 >conftest.err
25460 rm -f conftest.er1
25461 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025463 (exit $ac_status); } && {
25464 test -z "$ac_c_werror_flag" ||
25465 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025466 } && test -s conftest$ac_exeext &&
25467 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025468 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025469else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025470 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025471sed 's/^/| /' conftest.$ac_ext >&5
25472
Gregory P. Smith18820942008-09-07 06:24:49 +000025473
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025475
25476rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025477 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025478 if test $py_cv_lib_readline = yes; then
25479 break
25480 fi
25481done
25482# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25483#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025484if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025485 { echo "$as_me:$LINENO: result: none" >&5
25486echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025487else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025488 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25489echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025490
25491cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025492#define HAVE_LIBREADLINE 1
25493_ACEOF
25494
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025495fi
25496
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025497# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025498{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25499echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025500if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025501 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025502else
25503 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025504LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025505cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025506/* confdefs.h. */
25507_ACEOF
25508cat confdefs.h >>conftest.$ac_ext
25509cat >>conftest.$ac_ext <<_ACEOF
25510/* end confdefs.h. */
25511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025512/* Override any GCC internal prototype to avoid an error.
25513 Use char because int might match the return type of a GCC
25514 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025515#ifdef __cplusplus
25516extern "C"
25517#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025518char rl_callback_handler_install ();
25519int
25520main ()
25521{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025522return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025523 ;
25524 return 0;
25525}
25526_ACEOF
25527rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025528if { (ac_try="$ac_link"
25529case "(($ac_try" in
25530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25531 *) ac_try_echo=$ac_try;;
25532esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025534 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025535 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025536 grep -v '^ *+' conftest.er1 >conftest.err
25537 rm -f conftest.er1
25538 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025540 (exit $ac_status); } && {
25541 test -z "$ac_c_werror_flag" ||
25542 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025543 } && test -s conftest$ac_exeext &&
25544 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025545 ac_cv_lib_readline_rl_callback_handler_install=yes
25546else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025547 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025548sed 's/^/| /' conftest.$ac_ext >&5
25549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025550 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025551fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025552
25553rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025554 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025555LIBS=$ac_check_lib_save_LIBS
25556fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025557{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25558echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25559if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025560
25561cat >>confdefs.h <<\_ACEOF
25562#define HAVE_RL_CALLBACK 1
25563_ACEOF
25564
25565fi
25566
25567
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025568# check for readline 2.2
25569cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025570/* confdefs.h. */
25571_ACEOF
25572cat confdefs.h >>conftest.$ac_ext
25573cat >>conftest.$ac_ext <<_ACEOF
25574/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025575#include <readline/readline.h>
25576_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025577if { (ac_try="$ac_cpp conftest.$ac_ext"
25578case "(($ac_try" in
25579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25580 *) ac_try_echo=$ac_try;;
25581esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025583 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025584 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025585 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025586 rm -f conftest.er1
25587 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025589 (exit $ac_status); } >/dev/null && {
25590 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25591 test ! -s conftest.err
25592 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025593 have_readline=yes
25594else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025595 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025596sed 's/^/| /' conftest.$ac_ext >&5
25597
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025598 have_readline=no
25599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025600
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025601rm -f conftest.err conftest.$ac_ext
25602if test $have_readline = yes
25603then
25604 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025605/* confdefs.h. */
25606_ACEOF
25607cat confdefs.h >>conftest.$ac_ext
25608cat >>conftest.$ac_ext <<_ACEOF
25609/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025610#include <readline/readline.h>
25611
25612_ACEOF
25613if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025614 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025615
25616cat >>confdefs.h <<\_ACEOF
25617#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25618_ACEOF
25619
25620fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000025621rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025622
Antoine Pitroud5131772009-10-26 19:22:14 +000025623 cat >conftest.$ac_ext <<_ACEOF
25624/* confdefs.h. */
25625_ACEOF
25626cat confdefs.h >>conftest.$ac_ext
25627cat >>conftest.$ac_ext <<_ACEOF
25628/* end confdefs.h. */
25629#include <readline/readline.h>
25630
25631_ACEOF
25632if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25633 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25634
25635cat >>confdefs.h <<\_ACEOF
25636#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25637_ACEOF
25638
25639fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000025640rm -f -r conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000025641
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025642fi
25643
Martin v. Löwis0daad592001-09-30 21:09:59 +000025644# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025645{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25646echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025647if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025648 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025649else
Martin v. Löwis11437992002-04-12 09:54:03 +000025650 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025651LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025652cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025653/* confdefs.h. */
25654_ACEOF
25655cat confdefs.h >>conftest.$ac_ext
25656cat >>conftest.$ac_ext <<_ACEOF
25657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025659/* Override any GCC internal prototype to avoid an error.
25660 Use char because int might match the return type of a GCC
25661 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025662#ifdef __cplusplus
25663extern "C"
25664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025665char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025666int
25667main ()
25668{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025669return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025670 ;
25671 return 0;
25672}
25673_ACEOF
25674rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025675if { (ac_try="$ac_link"
25676case "(($ac_try" in
25677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25678 *) ac_try_echo=$ac_try;;
25679esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025681 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025683 grep -v '^ *+' conftest.er1 >conftest.err
25684 rm -f conftest.er1
25685 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025687 (exit $ac_status); } && {
25688 test -z "$ac_c_werror_flag" ||
25689 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025690 } && test -s conftest$ac_exeext &&
25691 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025692 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025693else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025695sed 's/^/| /' conftest.$ac_ext >&5
25696
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025697 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025698fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025699
25700rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025701 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025702LIBS=$ac_check_lib_save_LIBS
25703fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025704{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25705echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25706if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025707
Martin v. Löwis11437992002-04-12 09:54:03 +000025708cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025709#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025710_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025711
Martin v. Löwis0daad592001-09-30 21:09:59 +000025712fi
25713
Michael W. Hudson54241132001-12-07 15:38:26 +000025714
Thomas Wouters89d996e2007-09-08 17:39:28 +000025715# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025716{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25717echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025718if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025719 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025720else
25721 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025722LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025723cat >conftest.$ac_ext <<_ACEOF
25724/* confdefs.h. */
25725_ACEOF
25726cat confdefs.h >>conftest.$ac_ext
25727cat >>conftest.$ac_ext <<_ACEOF
25728/* end confdefs.h. */
25729
25730/* Override any GCC internal prototype to avoid an error.
25731 Use char because int might match the return type of a GCC
25732 builtin and then its argument prototype would still apply. */
25733#ifdef __cplusplus
25734extern "C"
25735#endif
25736char rl_completion_display_matches_hook ();
25737int
25738main ()
25739{
25740return rl_completion_display_matches_hook ();
25741 ;
25742 return 0;
25743}
25744_ACEOF
25745rm -f conftest.$ac_objext conftest$ac_exeext
25746if { (ac_try="$ac_link"
25747case "(($ac_try" in
25748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25749 *) ac_try_echo=$ac_try;;
25750esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025752 (eval "$ac_link") 2>conftest.er1
25753 ac_status=$?
25754 grep -v '^ *+' conftest.er1 >conftest.err
25755 rm -f conftest.er1
25756 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025758 (exit $ac_status); } && {
25759 test -z "$ac_c_werror_flag" ||
25760 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025761 } && test -s conftest$ac_exeext &&
25762 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025763 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25764else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025765 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025766sed 's/^/| /' conftest.$ac_ext >&5
25767
25768 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25769fi
25770
25771rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25772 conftest$ac_exeext conftest.$ac_ext
25773LIBS=$ac_check_lib_save_LIBS
25774fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025775{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25776echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25777if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025778
25779cat >>confdefs.h <<\_ACEOF
25780#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25781_ACEOF
25782
25783fi
25784
25785
Martin v. Löwis0daad592001-09-30 21:09:59 +000025786# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025787{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25788echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025789if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025790 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025791else
Martin v. Löwis11437992002-04-12 09:54:03 +000025792 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025793LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025794cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025795/* confdefs.h. */
25796_ACEOF
25797cat confdefs.h >>conftest.$ac_ext
25798cat >>conftest.$ac_ext <<_ACEOF
25799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025801/* Override any GCC internal prototype to avoid an error.
25802 Use char because int might match the return type of a GCC
25803 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025804#ifdef __cplusplus
25805extern "C"
25806#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025807char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025808int
25809main ()
25810{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025811return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025812 ;
25813 return 0;
25814}
25815_ACEOF
25816rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025817if { (ac_try="$ac_link"
25818case "(($ac_try" in
25819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25820 *) ac_try_echo=$ac_try;;
25821esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025823 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025824 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025825 grep -v '^ *+' conftest.er1 >conftest.err
25826 rm -f conftest.er1
25827 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025829 (exit $ac_status); } && {
25830 test -z "$ac_c_werror_flag" ||
25831 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025832 } && test -s conftest$ac_exeext &&
25833 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025834 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025835else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025836 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025837sed 's/^/| /' conftest.$ac_ext >&5
25838
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025839 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025841
25842rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025843 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025844LIBS=$ac_check_lib_save_LIBS
25845fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025846{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25847echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25848if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025849
Martin v. Löwis11437992002-04-12 09:54:03 +000025850cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025851#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025852_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025853
Guido van Rossum353ae582001-07-10 16:45:32 +000025854fi
25855
Jack Jansendd19cf82001-12-06 22:36:17 +000025856
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025857# also in readline 4.2
25858cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025859/* confdefs.h. */
25860_ACEOF
25861cat confdefs.h >>conftest.$ac_ext
25862cat >>conftest.$ac_ext <<_ACEOF
25863/* end confdefs.h. */
25864#include <readline/readline.h>
25865_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025866if { (ac_try="$ac_cpp conftest.$ac_ext"
25867case "(($ac_try" in
25868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25869 *) ac_try_echo=$ac_try;;
25870esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025872 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025873 ac_status=$?
25874 grep -v '^ *+' conftest.er1 >conftest.err
25875 rm -f conftest.er1
25876 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025878 (exit $ac_status); } >/dev/null && {
25879 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25880 test ! -s conftest.err
25881 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025882 have_readline=yes
25883else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025884 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025885sed 's/^/| /' conftest.$ac_ext >&5
25886
25887 have_readline=no
25888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025889
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025890rm -f conftest.err conftest.$ac_ext
25891if test $have_readline = yes
25892then
25893 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025894/* confdefs.h. */
25895_ACEOF
25896cat confdefs.h >>conftest.$ac_ext
25897cat >>conftest.$ac_ext <<_ACEOF
25898/* end confdefs.h. */
25899#include <readline/readline.h>
25900
25901_ACEOF
25902if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25903 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25904
25905cat >>confdefs.h <<\_ACEOF
25906#define HAVE_RL_CATCH_SIGNAL 1
25907_ACEOF
25908
25909fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000025910rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025911
25912fi
25913
Martin v. Löwis82bca632006-02-10 20:49:30 +000025914# End of readline checks: restore LIBS
25915LIBS=$LIBS_no_readline
25916
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025917{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25918echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025919if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025920 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025921else
Martin v. Löwis11437992002-04-12 09:54:03 +000025922
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025923if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025924 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025925else
Martin v. Löwis11437992002-04-12 09:54:03 +000025926 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025927/* confdefs.h. */
25928_ACEOF
25929cat confdefs.h >>conftest.$ac_ext
25930cat >>conftest.$ac_ext <<_ACEOF
25931/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025932
25933int main()
25934{
25935 int val1 = nice(1);
25936 if (val1 != -1 && val1 == nice(2))
25937 exit(0);
25938 exit(1);
25939}
25940
Martin v. Löwis11437992002-04-12 09:54:03 +000025941_ACEOF
25942rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025943if { (ac_try="$ac_link"
25944case "(($ac_try" in
25945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25946 *) ac_try_echo=$ac_try;;
25947esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025949 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025950 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025952 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025953 { (case "(($ac_try" in
25954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25955 *) ac_try_echo=$ac_try;;
25956esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025958 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025959 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025961 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025962 ac_cv_broken_nice=yes
25963else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025964 echo "$as_me: program exited with status $ac_status" >&5
25965echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025966sed 's/^/| /' conftest.$ac_ext >&5
25967
Martin v. Löwis11437992002-04-12 09:54:03 +000025968( exit $ac_status )
25969ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025971rm -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 +000025972fi
25973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025974
25975fi
25976
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025977{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25978echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025979if test "$ac_cv_broken_nice" = yes
25980then
Martin v. Löwis11437992002-04-12 09:54:03 +000025981
25982cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025983#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025984_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025985
25986fi
25987
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025988{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25989echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025990if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025991 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025992else
25993 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025994 ac_cv_broken_poll=no
25995else
25996 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025997/* confdefs.h. */
25998_ACEOF
25999cat confdefs.h >>conftest.$ac_ext
26000cat >>conftest.$ac_ext <<_ACEOF
26001/* end confdefs.h. */
26002
26003#include <poll.h>
26004
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026005int main()
26006{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026007 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026008 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026009
26010 close (42);
26011
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026012 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026013 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026014 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026015 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026016 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026017 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026018 return 1;
26019}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026020
26021_ACEOF
26022rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026023if { (ac_try="$ac_link"
26024case "(($ac_try" in
26025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26026 *) ac_try_echo=$ac_try;;
26027esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026029 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026030 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026032 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026033 { (case "(($ac_try" in
26034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26035 *) ac_try_echo=$ac_try;;
26036esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026038 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026039 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026041 (exit $ac_status); }; }; then
26042 ac_cv_broken_poll=yes
26043else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026044 echo "$as_me: program exited with status $ac_status" >&5
26045echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026046sed 's/^/| /' conftest.$ac_ext >&5
26047
26048( exit $ac_status )
26049ac_cv_broken_poll=no
26050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026051rm -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 +000026052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026053
26054
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026055fi
26056
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026057{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26058echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026059if test "$ac_cv_broken_poll" = yes
26060then
26061
26062cat >>confdefs.h <<\_ACEOF
26063#define HAVE_BROKEN_POLL 1
26064_ACEOF
26065
26066fi
26067
Brett Cannon43802422005-02-10 20:48:03 +000026068# 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 +000026069# (which is not required by ISO C or UNIX spec) and/or if we support
26070# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026071{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26072echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026073if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026074 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026075else
26076 cat >conftest.$ac_ext <<_ACEOF
26077/* confdefs.h. */
26078_ACEOF
26079cat confdefs.h >>conftest.$ac_ext
26080cat >>conftest.$ac_ext <<_ACEOF
26081/* end confdefs.h. */
26082#include <sys/types.h>
26083#include <$ac_cv_struct_tm>
26084
26085
26086int
26087main ()
26088{
26089static struct tm ac_aggr;
26090if (ac_aggr.tm_zone)
26091return 0;
26092 ;
26093 return 0;
26094}
26095_ACEOF
26096rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026097if { (ac_try="$ac_compile"
26098case "(($ac_try" in
26099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26100 *) ac_try_echo=$ac_try;;
26101esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026103 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026104 ac_status=$?
26105 grep -v '^ *+' conftest.er1 >conftest.err
26106 rm -f conftest.er1
26107 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026109 (exit $ac_status); } && {
26110 test -z "$ac_c_werror_flag" ||
26111 test ! -s conftest.err
26112 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026113 ac_cv_member_struct_tm_tm_zone=yes
26114else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026115 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026116sed 's/^/| /' conftest.$ac_ext >&5
26117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026118 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026119/* confdefs.h. */
26120_ACEOF
26121cat confdefs.h >>conftest.$ac_ext
26122cat >>conftest.$ac_ext <<_ACEOF
26123/* end confdefs.h. */
26124#include <sys/types.h>
26125#include <$ac_cv_struct_tm>
26126
26127
26128int
26129main ()
26130{
26131static struct tm ac_aggr;
26132if (sizeof ac_aggr.tm_zone)
26133return 0;
26134 ;
26135 return 0;
26136}
26137_ACEOF
26138rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026139if { (ac_try="$ac_compile"
26140case "(($ac_try" in
26141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26142 *) ac_try_echo=$ac_try;;
26143esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026145 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026146 ac_status=$?
26147 grep -v '^ *+' conftest.er1 >conftest.err
26148 rm -f conftest.er1
26149 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026151 (exit $ac_status); } && {
26152 test -z "$ac_c_werror_flag" ||
26153 test ! -s conftest.err
26154 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026155 ac_cv_member_struct_tm_tm_zone=yes
26156else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026157 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026158sed 's/^/| /' conftest.$ac_ext >&5
26159
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026160 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026162
26163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026165
26166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026167fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026168{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26169echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26170if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026171
26172cat >>confdefs.h <<_ACEOF
26173#define HAVE_STRUCT_TM_TM_ZONE 1
26174_ACEOF
26175
26176
26177fi
26178
26179if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26180
26181cat >>confdefs.h <<\_ACEOF
26182#define HAVE_TM_ZONE 1
26183_ACEOF
26184
26185else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026186 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26187echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026188if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026189 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 <time.h>
26198
26199int
26200main ()
26201{
26202#ifndef tzname
26203 (void) tzname;
26204#endif
26205
26206 ;
26207 return 0;
26208}
26209_ACEOF
26210rm -f conftest.$ac_objext
26211if { (ac_try="$ac_compile"
26212case "(($ac_try" in
26213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26214 *) ac_try_echo=$ac_try;;
26215esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026217 (eval "$ac_compile") 2>conftest.er1
26218 ac_status=$?
26219 grep -v '^ *+' conftest.er1 >conftest.err
26220 rm -f conftest.er1
26221 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026223 (exit $ac_status); } && {
26224 test -z "$ac_c_werror_flag" ||
26225 test ! -s conftest.err
26226 } && test -s conftest.$ac_objext; then
26227 ac_cv_have_decl_tzname=yes
26228else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026229 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026230sed 's/^/| /' conftest.$ac_ext >&5
26231
26232 ac_cv_have_decl_tzname=no
26233fi
26234
26235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26236fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026237{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26238echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26239if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026240
26241cat >>confdefs.h <<_ACEOF
26242#define HAVE_DECL_TZNAME 1
26243_ACEOF
26244
26245
26246else
26247 cat >>confdefs.h <<_ACEOF
26248#define HAVE_DECL_TZNAME 0
26249_ACEOF
26250
26251
26252fi
26253
26254
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026255 { echo "$as_me:$LINENO: checking for tzname" >&5
26256echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026257if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026258 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026259else
26260 cat >conftest.$ac_ext <<_ACEOF
26261/* confdefs.h. */
26262_ACEOF
26263cat confdefs.h >>conftest.$ac_ext
26264cat >>conftest.$ac_ext <<_ACEOF
26265/* end confdefs.h. */
26266#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026267#if !HAVE_DECL_TZNAME
26268extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026269#endif
26270
26271int
26272main ()
26273{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026274return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026275 ;
26276 return 0;
26277}
26278_ACEOF
26279rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026280if { (ac_try="$ac_link"
26281case "(($ac_try" in
26282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26283 *) ac_try_echo=$ac_try;;
26284esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026286 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026287 ac_status=$?
26288 grep -v '^ *+' conftest.er1 >conftest.err
26289 rm -f conftest.er1
26290 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026292 (exit $ac_status); } && {
26293 test -z "$ac_c_werror_flag" ||
26294 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026295 } && test -s conftest$ac_exeext &&
26296 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026297 ac_cv_var_tzname=yes
26298else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026299 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026300sed 's/^/| /' conftest.$ac_ext >&5
26301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026302 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026304
26305rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026306 conftest$ac_exeext conftest.$ac_ext
26307fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026308{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26309echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026310 if test $ac_cv_var_tzname = yes; then
26311
26312cat >>confdefs.h <<\_ACEOF
26313#define HAVE_TZNAME 1
26314_ACEOF
26315
26316 fi
26317fi
26318
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026319
Martin v. Löwis1d459062005-03-14 21:23:33 +000026320# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026321{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26322echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026323if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026324 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026325else
26326
26327if test "$cross_compiling" = yes; then
26328 ac_cv_working_tzset=no
26329else
26330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026331/* confdefs.h. */
26332_ACEOF
26333cat confdefs.h >>conftest.$ac_ext
26334cat >>conftest.$ac_ext <<_ACEOF
26335/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026336
26337#include <stdlib.h>
26338#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026339#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026340
26341#if HAVE_TZNAME
26342extern char *tzname[];
26343#endif
26344
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026345int main()
26346{
Brett Cannon18367812003-09-19 00:59:16 +000026347 /* Note that we need to ensure that not only does tzset(3)
26348 do 'something' with localtime, but it works as documented
26349 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026350 This includes making sure that tzname is set properly if
26351 tm->tm_zone does not exist since it is the alternative way
26352 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026353
26354 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026355 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026356 */
26357
Martin v. Löwis1d459062005-03-14 21:23:33 +000026358 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026359 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26360
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026361 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026362 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026363 if (localtime(&groundhogday)->tm_hour != 0)
26364 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026365#if HAVE_TZNAME
26366 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26367 if (strcmp(tzname[0], "UTC") ||
26368 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26369 exit(1);
26370#endif
Brett Cannon18367812003-09-19 00:59:16 +000026371
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026372 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026373 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026374 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026375 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026376#if HAVE_TZNAME
26377 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26378 exit(1);
26379#endif
Brett Cannon18367812003-09-19 00:59:16 +000026380
26381 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26382 tzset();
26383 if (localtime(&groundhogday)->tm_hour != 11)
26384 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026385#if HAVE_TZNAME
26386 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26387 exit(1);
26388#endif
26389
26390#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026391 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26392 exit(1);
26393 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26394 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026395#endif
Brett Cannon18367812003-09-19 00:59:16 +000026396
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026397 exit(0);
26398}
26399
26400_ACEOF
26401rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026402if { (ac_try="$ac_link"
26403case "(($ac_try" in
26404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26405 *) ac_try_echo=$ac_try;;
26406esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026408 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026409 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026411 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026412 { (case "(($ac_try" in
26413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26414 *) ac_try_echo=$ac_try;;
26415esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026417 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026418 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026420 (exit $ac_status); }; }; then
26421 ac_cv_working_tzset=yes
26422else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026423 echo "$as_me: program exited with status $ac_status" >&5
26424echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026425sed 's/^/| /' conftest.$ac_ext >&5
26426
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026427( exit $ac_status )
26428ac_cv_working_tzset=no
26429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026430rm -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 +000026431fi
26432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026433
26434fi
26435
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026436{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26437echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026438if test "$ac_cv_working_tzset" = yes
26439then
26440
26441cat >>confdefs.h <<\_ACEOF
26442#define HAVE_WORKING_TZSET 1
26443_ACEOF
26444
26445fi
26446
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026447# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026448{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26449echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026450if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026451 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026452else
26453 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026454/* confdefs.h. */
26455_ACEOF
26456cat confdefs.h >>conftest.$ac_ext
26457cat >>conftest.$ac_ext <<_ACEOF
26458/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026459#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026460int
26461main ()
26462{
26463
26464struct stat st;
26465st.st_mtim.tv_nsec = 1;
26466
26467 ;
26468 return 0;
26469}
26470_ACEOF
26471rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026472if { (ac_try="$ac_compile"
26473case "(($ac_try" in
26474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26475 *) ac_try_echo=$ac_try;;
26476esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026478 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026479 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026480 grep -v '^ *+' conftest.er1 >conftest.err
26481 rm -f conftest.er1
26482 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026484 (exit $ac_status); } && {
26485 test -z "$ac_c_werror_flag" ||
26486 test ! -s conftest.err
26487 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026488 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026489else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026491sed 's/^/| /' conftest.$ac_ext >&5
26492
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026493 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026494fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26497fi
26498
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026499{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26500echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026501if test "$ac_cv_stat_tv_nsec" = yes
26502then
26503
26504cat >>confdefs.h <<\_ACEOF
26505#define HAVE_STAT_TV_NSEC 1
26506_ACEOF
26507
26508fi
26509
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026510# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026511{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26512echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026513if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026514 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026515else
26516 cat >conftest.$ac_ext <<_ACEOF
26517/* confdefs.h. */
26518_ACEOF
26519cat confdefs.h >>conftest.$ac_ext
26520cat >>conftest.$ac_ext <<_ACEOF
26521/* end confdefs.h. */
26522#include <sys/stat.h>
26523int
26524main ()
26525{
26526
26527struct stat st;
26528st.st_mtimespec.tv_nsec = 1;
26529
26530 ;
26531 return 0;
26532}
26533_ACEOF
26534rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026535if { (ac_try="$ac_compile"
26536case "(($ac_try" in
26537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26538 *) ac_try_echo=$ac_try;;
26539esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026541 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026542 ac_status=$?
26543 grep -v '^ *+' conftest.er1 >conftest.err
26544 rm -f conftest.er1
26545 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026547 (exit $ac_status); } && {
26548 test -z "$ac_c_werror_flag" ||
26549 test ! -s conftest.err
26550 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026551 ac_cv_stat_tv_nsec2=yes
26552else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026553 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026554sed 's/^/| /' conftest.$ac_ext >&5
26555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026556 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026557fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026558
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26560fi
26561
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026562{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26563echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026564if test "$ac_cv_stat_tv_nsec2" = yes
26565then
26566
26567cat >>confdefs.h <<\_ACEOF
26568#define HAVE_STAT_TV_NSEC2 1
26569_ACEOF
26570
26571fi
26572
Jack Jansen666b1e72001-10-31 12:11:48 +000026573# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026574{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26575echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026576if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026577 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026578else
Martin v. Löwis11437992002-04-12 09:54:03 +000026579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026580/* confdefs.h. */
26581_ACEOF
26582cat confdefs.h >>conftest.$ac_ext
26583cat >>conftest.$ac_ext <<_ACEOF
26584/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026585#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026586int
26587main ()
26588{
Jack Jansen666b1e72001-10-31 12:11:48 +000026589
26590 int rtn;
26591 rtn = mvwdelch(0,0,0);
26592
Martin v. Löwis11437992002-04-12 09:54:03 +000026593 ;
26594 return 0;
26595}
26596_ACEOF
26597rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026598if { (ac_try="$ac_compile"
26599case "(($ac_try" in
26600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26601 *) ac_try_echo=$ac_try;;
26602esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026604 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026606 grep -v '^ *+' conftest.er1 >conftest.err
26607 rm -f conftest.er1
26608 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026610 (exit $ac_status); } && {
26611 test -z "$ac_c_werror_flag" ||
26612 test ! -s conftest.err
26613 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026614 ac_cv_mvwdelch_is_expression=yes
26615else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026617sed 's/^/| /' conftest.$ac_ext >&5
26618
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026619 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026620fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26623fi
26624
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026625{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26626echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026627
26628if test "$ac_cv_mvwdelch_is_expression" = yes
26629then
Martin v. Löwis11437992002-04-12 09:54:03 +000026630
26631cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026632#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026633_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026634
26635fi
26636
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026637{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26638echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026639if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026640 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026641else
Martin v. Löwis11437992002-04-12 09:54:03 +000026642 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026643/* confdefs.h. */
26644_ACEOF
26645cat confdefs.h >>conftest.$ac_ext
26646cat >>conftest.$ac_ext <<_ACEOF
26647/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026648#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026649int
26650main ()
26651{
Jack Jansen666b1e72001-10-31 12:11:48 +000026652
26653 WINDOW *w;
26654 w->_flags = 0;
26655
Martin v. Löwis11437992002-04-12 09:54:03 +000026656 ;
26657 return 0;
26658}
26659_ACEOF
26660rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026661if { (ac_try="$ac_compile"
26662case "(($ac_try" in
26663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26664 *) ac_try_echo=$ac_try;;
26665esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026667 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026669 grep -v '^ *+' conftest.er1 >conftest.err
26670 rm -f conftest.er1
26671 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026673 (exit $ac_status); } && {
26674 test -z "$ac_c_werror_flag" ||
26675 test ! -s conftest.err
26676 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026677 ac_cv_window_has_flags=yes
26678else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026680sed 's/^/| /' conftest.$ac_ext >&5
26681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026682 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026683fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26686fi
26687
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026688{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26689echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026690
Jack Jansen666b1e72001-10-31 12:11:48 +000026691
26692if test "$ac_cv_window_has_flags" = yes
26693then
Martin v. Löwis11437992002-04-12 09:54:03 +000026694
26695cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026696#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026697_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026698
26699fi
26700
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026701{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26702echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026703cat >conftest.$ac_ext <<_ACEOF
26704/* confdefs.h. */
26705_ACEOF
26706cat confdefs.h >>conftest.$ac_ext
26707cat >>conftest.$ac_ext <<_ACEOF
26708/* end confdefs.h. */
26709#include <curses.h>
26710int
26711main ()
26712{
26713void *x=is_term_resized
26714 ;
26715 return 0;
26716}
26717_ACEOF
26718rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026719if { (ac_try="$ac_compile"
26720case "(($ac_try" in
26721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26722 *) ac_try_echo=$ac_try;;
26723esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026725 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026726 ac_status=$?
26727 grep -v '^ *+' conftest.er1 >conftest.err
26728 rm -f conftest.er1
26729 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026731 (exit $ac_status); } && {
26732 test -z "$ac_c_werror_flag" ||
26733 test ! -s conftest.err
26734 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026735
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026736cat >>confdefs.h <<\_ACEOF
26737#define HAVE_CURSES_IS_TERM_RESIZED 1
26738_ACEOF
26739
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026740 { echo "$as_me:$LINENO: result: yes" >&5
26741echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026742else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026743 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026744sed 's/^/| /' conftest.$ac_ext >&5
26745
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026746 { echo "$as_me:$LINENO: result: no" >&5
26747echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026748
26749fi
26750
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26752
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026753{ echo "$as_me:$LINENO: checking for resize_term" >&5
26754echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026755cat >conftest.$ac_ext <<_ACEOF
26756/* confdefs.h. */
26757_ACEOF
26758cat confdefs.h >>conftest.$ac_ext
26759cat >>conftest.$ac_ext <<_ACEOF
26760/* end confdefs.h. */
26761#include <curses.h>
26762int
26763main ()
26764{
26765void *x=resize_term
26766 ;
26767 return 0;
26768}
26769_ACEOF
26770rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026771if { (ac_try="$ac_compile"
26772case "(($ac_try" in
26773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26774 *) ac_try_echo=$ac_try;;
26775esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026777 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026778 ac_status=$?
26779 grep -v '^ *+' conftest.er1 >conftest.err
26780 rm -f conftest.er1
26781 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026783 (exit $ac_status); } && {
26784 test -z "$ac_c_werror_flag" ||
26785 test ! -s conftest.err
26786 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026787
26788cat >>confdefs.h <<\_ACEOF
26789#define HAVE_CURSES_RESIZE_TERM 1
26790_ACEOF
26791
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026792 { echo "$as_me:$LINENO: result: yes" >&5
26793echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026794else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026795 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026796sed 's/^/| /' conftest.$ac_ext >&5
26797
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026798 { echo "$as_me:$LINENO: result: no" >&5
26799echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026800
26801fi
26802
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26804
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026805{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26806echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026807cat >conftest.$ac_ext <<_ACEOF
26808/* confdefs.h. */
26809_ACEOF
26810cat confdefs.h >>conftest.$ac_ext
26811cat >>conftest.$ac_ext <<_ACEOF
26812/* end confdefs.h. */
26813#include <curses.h>
26814int
26815main ()
26816{
26817void *x=resizeterm
26818 ;
26819 return 0;
26820}
26821_ACEOF
26822rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026823if { (ac_try="$ac_compile"
26824case "(($ac_try" in
26825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26826 *) ac_try_echo=$ac_try;;
26827esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026829 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026830 ac_status=$?
26831 grep -v '^ *+' conftest.er1 >conftest.err
26832 rm -f conftest.er1
26833 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026835 (exit $ac_status); } && {
26836 test -z "$ac_c_werror_flag" ||
26837 test ! -s conftest.err
26838 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026839
26840cat >>confdefs.h <<\_ACEOF
26841#define HAVE_CURSES_RESIZETERM 1
26842_ACEOF
26843
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026844 { echo "$as_me:$LINENO: result: yes" >&5
26845echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026846else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026847 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026848sed 's/^/| /' conftest.$ac_ext >&5
26849
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026850 { echo "$as_me:$LINENO: result: no" >&5
26851echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026852
26853fi
26854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26856
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026857{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26858echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026859
26860if test -r /dev/ptmx
26861then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026862 { echo "$as_me:$LINENO: result: yes" >&5
26863echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026864
26865cat >>confdefs.h <<\_ACEOF
26866#define HAVE_DEV_PTMX 1
26867_ACEOF
26868
Thomas Wouters89f507f2006-12-13 04:49:30 +000026869else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026870 { echo "$as_me:$LINENO: result: no" >&5
26871echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026872fi
26873
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026874{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26875echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026876
26877if test -r /dev/ptc
26878then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026879 { echo "$as_me:$LINENO: result: yes" >&5
26880echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026881
26882cat >>confdefs.h <<\_ACEOF
26883#define HAVE_DEV_PTC 1
26884_ACEOF
26885
Thomas Wouters89f507f2006-12-13 04:49:30 +000026886else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026887 { echo "$as_me:$LINENO: result: no" >&5
26888echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026889fi
26890
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026891if test "$have_long_long" = yes
26892then
26893 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
26894echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
26895 if test "${ac_cv_have_long_long_format+set}" = set; then
26896 echo $ECHO_N "(cached) $ECHO_C" >&6
26897else
26898 if test "$cross_compiling" = yes; then
26899 ac_cv_have_long_long_format=no
26900else
26901 cat >conftest.$ac_ext <<_ACEOF
26902/* confdefs.h. */
26903_ACEOF
26904cat confdefs.h >>conftest.$ac_ext
26905cat >>conftest.$ac_ext <<_ACEOF
26906/* end confdefs.h. */
26907
26908 #include <stdio.h>
26909 #include <stddef.h>
26910 #include <string.h>
26911
26912 #ifdef HAVE_SYS_TYPES_H
26913 #include <sys/types.h>
26914 #endif
26915
26916 int main()
26917 {
26918 char buffer[256];
26919
26920 if (sprintf(buffer, "%lld", (long long)123) < 0)
26921 return 1;
26922 if (strcmp(buffer, "123"))
26923 return 1;
26924
26925 if (sprintf(buffer, "%lld", (long long)-123) < 0)
26926 return 1;
26927 if (strcmp(buffer, "-123"))
26928 return 1;
26929
26930 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
26931 return 1;
26932 if (strcmp(buffer, "123"))
26933 return 1;
26934
26935 return 0;
26936 }
26937
26938_ACEOF
26939rm -f conftest$ac_exeext
26940if { (ac_try="$ac_link"
26941case "(($ac_try" in
26942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26943 *) ac_try_echo=$ac_try;;
26944esac
26945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26946 (eval "$ac_link") 2>&5
26947 ac_status=$?
26948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26949 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26950 { (case "(($ac_try" in
26951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26952 *) ac_try_echo=$ac_try;;
26953esac
26954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26955 (eval "$ac_try") 2>&5
26956 ac_status=$?
26957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26958 (exit $ac_status); }; }; then
26959 ac_cv_have_long_long_format=yes
26960else
26961 echo "$as_me: program exited with status $ac_status" >&5
26962echo "$as_me: failed program was:" >&5
26963sed 's/^/| /' conftest.$ac_ext >&5
26964
26965( exit $ac_status )
26966ac_cv_have_long_long_format=no
26967fi
26968rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26969fi
26970
26971
26972
26973fi
26974
26975 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
26976echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
26977fi
26978
Mark Dickinson89d7d412009-12-31 20:50:59 +000026979if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026980then
26981
26982cat >>confdefs.h <<\_ACEOF
26983#define PY_FORMAT_LONG_LONG "ll"
26984_ACEOF
26985
26986fi
26987
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000026988if test $ac_sys_system = Darwin
26989then
26990 LIBS="$LIBS -framework CoreFoundation"
26991fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026992
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026993{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26994echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026995if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026996 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026997else
26998 if test "$cross_compiling" = yes; then
Benjamin Peterson8f326b22009-12-13 02:10:36 +000026999 ac_cv_have_size_t_format="cross -- assuming yes"
27000
Thomas Wouters477c8d52006-05-27 19:21:47 +000027001else
27002 cat >conftest.$ac_ext <<_ACEOF
27003/* confdefs.h. */
27004_ACEOF
27005cat confdefs.h >>conftest.$ac_ext
27006cat >>conftest.$ac_ext <<_ACEOF
27007/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027008
Thomas Wouters477c8d52006-05-27 19:21:47 +000027009#include <stdio.h>
27010#include <stddef.h>
27011#include <string.h>
27012
Christian Heimes2c181612007-12-17 20:04:13 +000027013#ifdef HAVE_SYS_TYPES_H
27014#include <sys/types.h>
27015#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000027016
27017#ifdef HAVE_SSIZE_T
27018typedef ssize_t Py_ssize_t;
27019#elif SIZEOF_VOID_P == SIZEOF_LONG
27020typedef long Py_ssize_t;
27021#else
27022typedef int Py_ssize_t;
27023#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000027024
Christian Heimes2c181612007-12-17 20:04:13 +000027025int main()
27026{
27027 char buffer[256];
27028
Thomas Wouters477c8d52006-05-27 19:21:47 +000027029 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27030 return 1;
27031
Thomas Wouters89f507f2006-12-13 04:49:30 +000027032 if (strcmp(buffer, "123"))
27033 return 1;
27034
27035 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27036 return 1;
27037
27038 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000027039 return 1;
27040
27041 return 0;
27042}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027043
Thomas Wouters477c8d52006-05-27 19:21:47 +000027044_ACEOF
27045rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027046if { (ac_try="$ac_link"
27047case "(($ac_try" in
27048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27049 *) ac_try_echo=$ac_try;;
27050esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027052 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027053 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027055 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027056 { (case "(($ac_try" in
27057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27058 *) ac_try_echo=$ac_try;;
27059esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027061 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027062 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027064 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027065 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027066else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027067 echo "$as_me: program exited with status $ac_status" >&5
27068echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027069sed 's/^/| /' conftest.$ac_ext >&5
27070
27071( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027072ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027073fi
27074rm -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 +000027075fi
27076
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027077
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027078fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027079{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27080echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027081if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027082
27083cat >>confdefs.h <<\_ACEOF
27084#define PY_FORMAT_SIZE_T "z"
27085_ACEOF
27086
27087fi
27088
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027089{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27090echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027091if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027092 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027093else
Martin v. Löwis11437992002-04-12 09:54:03 +000027094 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027095/* confdefs.h. */
27096_ACEOF
27097cat confdefs.h >>conftest.$ac_ext
27098cat >>conftest.$ac_ext <<_ACEOF
27099/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027100
27101#ifdef HAVE_SYS_TYPES_H
27102#include <sys/types.h>
27103#endif
27104#ifdef HAVE_SYS_SOCKET_H
27105#include <sys/socket.h>
27106#endif
27107
27108
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027109typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027110int
27111main ()
27112{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027113if ((ac__type_new_ *) 0)
27114 return 0;
27115if (sizeof (ac__type_new_))
27116 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027117 ;
27118 return 0;
27119}
27120_ACEOF
27121rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027122if { (ac_try="$ac_compile"
27123case "(($ac_try" in
27124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27125 *) ac_try_echo=$ac_try;;
27126esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027128 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027130 grep -v '^ *+' conftest.er1 >conftest.err
27131 rm -f conftest.er1
27132 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027134 (exit $ac_status); } && {
27135 test -z "$ac_c_werror_flag" ||
27136 test ! -s conftest.err
27137 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027138 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027139else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027140 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027141sed 's/^/| /' conftest.$ac_ext >&5
27142
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027143 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027144fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027145
27146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027147fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027148{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27149echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27150if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027151 :
27152else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027153
Martin v. Löwis01c04012002-11-11 14:58:44 +000027154cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027155#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027156_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027157
27158fi
27159
Michael W. Hudson54241132001-12-07 15:38:26 +000027160
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027161{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
27162echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027163if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027164 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027165else
27166 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000027167 ac_cv_broken_mbstowcs=no
27168else
27169 cat >conftest.$ac_ext <<_ACEOF
27170/* confdefs.h. */
27171_ACEOF
27172cat confdefs.h >>conftest.$ac_ext
27173cat >>conftest.$ac_ext <<_ACEOF
27174/* end confdefs.h. */
27175
27176#include<stdlib.h>
27177int main() {
27178 size_t len = -1;
27179 const char *str = "text";
27180 len = mbstowcs(NULL, str, 0);
27181 return (len != 4);
27182}
27183
27184_ACEOF
27185rm -f conftest$ac_exeext
27186if { (ac_try="$ac_link"
27187case "(($ac_try" in
27188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27189 *) ac_try_echo=$ac_try;;
27190esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027192 (eval "$ac_link") 2>&5
27193 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027195 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27196 { (case "(($ac_try" in
27197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27198 *) ac_try_echo=$ac_try;;
27199esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027201 (eval "$ac_try") 2>&5
27202 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027204 (exit $ac_status); }; }; then
27205 ac_cv_broken_mbstowcs=no
27206else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027207 echo "$as_me: program exited with status $ac_status" >&5
27208echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027209sed 's/^/| /' conftest.$ac_ext >&5
27210
27211( exit $ac_status )
27212ac_cv_broken_mbstowcs=yes
27213fi
27214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27215fi
27216
27217
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027218fi
27219
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027220{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
27221echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000027222if test "$ac_cv_broken_mbstowcs" = yes
27223then
27224
27225cat >>confdefs.h <<\_ACEOF
27226#define HAVE_BROKEN_MBSTOWCS 1
27227_ACEOF
27228
27229fi
27230
Antoine Pitroub52ec782009-01-25 16:34:23 +000027231# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027232{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
27233echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027234
27235# Check whether --with-computed-gotos was given.
27236if test "${with_computed_gotos+set}" = set; then
27237 withval=$with_computed_gotos;
27238if test "$withval" != no
27239then
27240
27241cat >>confdefs.h <<\_ACEOF
27242#define USE_COMPUTED_GOTOS 1
27243_ACEOF
27244
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027245 { echo "$as_me:$LINENO: result: yes" >&5
27246echo "${ECHO_T}yes" >&6; }
27247else { echo "$as_me:$LINENO: result: no" >&5
27248echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027249fi
27250else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027251 { echo "$as_me:$LINENO: result: no" >&5
27252echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027253fi
27254
27255
27256
Michael W. Hudson54241132001-12-07 15:38:26 +000027257
27258
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027259for h in `(cd $srcdir;echo Python/thread_*.h)`
27260do
27261 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27262done
27263
Michael W. Hudson54241132001-12-07 15:38:26 +000027264
Neal Norwitzd24499d2005-12-18 21:36:39 +000027265SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027266{ echo "$as_me:$LINENO: checking for build directories" >&5
27267echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027268for dir in $SRCDIRS; do
27269 if test ! -d $dir; then
27270 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027271 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027272done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027273{ echo "$as_me:$LINENO: result: done" >&5
27274echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027275
Guido van Rossum627b2d71993-12-24 10:39:16 +000027276# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000027277ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027278
Martin v. Löwis11437992002-04-12 09:54:03 +000027279cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027280# This file is a shell script that caches the results of configure
27281# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027282# scripts and configure runs, see configure's option --config-cache.
27283# It is not useful on other systems. If it contains results you don't
27284# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027285#
Martin v. Löwis11437992002-04-12 09:54:03 +000027286# config.status only pays attention to the cache file if you give it
27287# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027288#
Skip Montanaro6dead952003-09-25 14:50:04 +000027289# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027290# loading this file, other *unset* `ac_cv_foo' will be assigned the
27291# following values.
27292
27293_ACEOF
27294
Guido van Rossumf78abae1997-01-21 22:02:36 +000027295# The following way of writing the cache mishandles newlines in values,
27296# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027297# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027298# Ultrix sh set writes to stderr and can't be redirected directly,
27299# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027300(
27301 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27302 eval ac_val=\$$ac_var
27303 case $ac_val in #(
27304 *${as_nl}*)
27305 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027306 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27307echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027308 esac
27309 case $ac_var in #(
27310 _ | IFS | as_nl) ;; #(
27311 *) $as_unset $ac_var ;;
27312 esac ;;
27313 esac
27314 done
27315
Martin v. Löwis11437992002-04-12 09:54:03 +000027316 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027317 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27318 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027319 # `set' does not quote correctly, so add quotes (double-quote
27320 # substitution turns \\\\ into \\, and sed turns \\ into \).
27321 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027322 "s/'/'\\\\''/g;
27323 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027324 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027325 *)
27326 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027327 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027328 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027329 esac |
27330 sort
27331) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027332 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027333 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027334 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027335 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027336 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27337 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027338 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27339 :end' >>confcache
27340if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27341 if test -w "$cache_file"; then
27342 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027343 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27344echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027345 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027346 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027347 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27348echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027349 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027350fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027351rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027352
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027353test "x$prefix" = xNONE && prefix=$ac_default_prefix
27354# Let make expand exec_prefix.
27355test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027356
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027357DEFS=-DHAVE_CONFIG_H
27358
Skip Montanaro6dead952003-09-25 14:50:04 +000027359ac_libobjs=
27360ac_ltlibobjs=
27361for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27362 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027363 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027364 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027365 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27366 # will be set to the directory where LIBOBJS objects are built.
27367 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27368 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027369done
27370LIBOBJS=$ac_libobjs
27371
27372LTLIBOBJS=$ac_ltlibobjs
27373
27374
Martin v. Löwis11437992002-04-12 09:54:03 +000027375
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027376: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027377ac_clean_files_save=$ac_clean_files
27378ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027379{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27380echo "$as_me: creating $CONFIG_STATUS" >&6;}
27381cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027382#! $SHELL
27383# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027384# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027385# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027386# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027387
Martin v. Löwis11437992002-04-12 09:54:03 +000027388debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027389ac_cs_recheck=false
27390ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027391SHELL=\${CONFIG_SHELL-$SHELL}
27392_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027393
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027394cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027395## --------------------- ##
27396## M4sh Initialization. ##
27397## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027399# Be more Bourne compatible
27400DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027401if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27402 emulate sh
27403 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027404 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027405 # is contrary to our usage. Disable this feature.
27406 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027407 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027408else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027409 case `(set -o) 2>/dev/null` in
27410 *posix*) set -o posix ;;
27411esac
27412
Michael W. Hudson54241132001-12-07 15:38:26 +000027413fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000027414
27415
Michael W. Hudson54241132001-12-07 15:38:26 +000027416
Michael W. Hudson54241132001-12-07 15:38:26 +000027417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027418# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027419# Avoid depending upon Character Ranges.
27420as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27421as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27422as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27423as_cr_digits='0123456789'
27424as_cr_alnum=$as_cr_Letters$as_cr_digits
27425
27426# The user is always right.
27427if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027428 echo "#! /bin/sh" >conf$$.sh
27429 echo "exit 0" >>conf$$.sh
27430 chmod +x conf$$.sh
27431 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27432 PATH_SEPARATOR=';'
27433 else
27434 PATH_SEPARATOR=:
27435 fi
27436 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027437fi
27438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027439# Support unset when possible.
27440if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27441 as_unset=unset
27442else
27443 as_unset=false
27444fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027446
27447# IFS
27448# We need space, tab and new line, in precisely that order. Quoting is
27449# there to prevent editors from complaining about space-tab.
27450# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27451# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027452as_nl='
27453'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027454IFS=" "" $as_nl"
27455
27456# Find who we are. Look in the path if we contain no directory separator.
27457case $0 in
27458 *[\\/]* ) as_myself=$0 ;;
27459 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027460for as_dir in $PATH
27461do
27462 IFS=$as_save_IFS
27463 test -z "$as_dir" && as_dir=.
27464 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27465done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027466IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027467
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027468 ;;
27469esac
27470# We did not find ourselves, most probably we were run as `sh COMMAND'
27471# in which case we are not to be found in the path.
27472if test "x$as_myself" = x; then
27473 as_myself=$0
27474fi
27475if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027476 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027477 { (exit 1); exit 1; }
27478fi
27479
27480# Work around bugs in pre-3.0 UWIN ksh.
27481for as_var in ENV MAIL MAILPATH
27482do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27483done
27484PS1='$ '
27485PS2='> '
27486PS4='+ '
27487
27488# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027489for as_var in \
27490 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27491 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27492 LC_TELEPHONE LC_TIME
27493do
27494 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27495 eval $as_var=C; export $as_var
27496 else
27497 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27498 fi
27499done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027500
27501# Required to use basename.
27502if expr a : '\(a\)' >/dev/null 2>&1 &&
27503 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27504 as_expr=expr
27505else
27506 as_expr=false
27507fi
27508
27509if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27510 as_basename=basename
27511else
27512 as_basename=false
27513fi
27514
27515
27516# Name of the executable.
27517as_me=`$as_basename -- "$0" ||
27518$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27519 X"$0" : 'X\(//\)$' \| \
27520 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027521echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027522 sed '/^.*\/\([^/][^/]*\)\/*$/{
27523 s//\1/
27524 q
27525 }
27526 /^X\/\(\/\/\)$/{
27527 s//\1/
27528 q
27529 }
27530 /^X\/\(\/\).*/{
27531 s//\1/
27532 q
27533 }
27534 s/.*/./; q'`
27535
27536# CDPATH.
27537$as_unset CDPATH
27538
27539
27540
Martin v. Löwis11437992002-04-12 09:54:03 +000027541 as_lineno_1=$LINENO
27542 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027543 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027544 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027545
Martin v. Löwis11437992002-04-12 09:54:03 +000027546 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27547 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027548 # line-number line after each line using $LINENO; the second 'sed'
27549 # does the real work. The second script uses 'N' to pair each
27550 # line-number line with the line containing $LINENO, and appends
27551 # trailing '-' during substitution so that $LINENO is not a special
27552 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027553 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027554 # scripts with optimization help from Paolo Bonzini. Blame Lee
27555 # E. McMahon (1931-1989) for sed's syntax. :-)
27556 sed -n '
27557 p
27558 /[$]LINENO/=
27559 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027560 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027561 s/[$]LINENO.*/&-/
27562 t lineno
27563 b
27564 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027565 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027566 :loop
27567 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027568 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027569 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027570 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027571 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027572 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027573 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027574
Martin v. Löwis11437992002-04-12 09:54:03 +000027575 # Don't try to exec as it changes $[0], causing all sort of problems
27576 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027577 # original and so on. Autoconf is especially sensitive to this).
27578 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027579 # Exit status is that of the last command.
27580 exit
27581}
27582
27583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027584if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27585 as_dirname=dirname
27586else
27587 as_dirname=false
27588fi
27589
27590ECHO_C= ECHO_N= ECHO_T=
27591case `echo -n x` in
27592-n*)
27593 case `echo 'x\c'` in
27594 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27595 *) ECHO_C='\c';;
27596 esac;;
27597*)
27598 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027599esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027600
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027601if expr a : '\(a\)' >/dev/null 2>&1 &&
27602 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027603 as_expr=expr
27604else
27605 as_expr=false
27606fi
27607
27608rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027609if test -d conf$$.dir; then
27610 rm -f conf$$.dir/conf$$.file
27611else
27612 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027613 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027614fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027615echo >conf$$.file
27616if ln -s conf$$.file conf$$ 2>/dev/null; then
27617 as_ln_s='ln -s'
27618 # ... but there are two gotchas:
27619 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27620 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27621 # In both cases, we have to default to `cp -p'.
27622 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027623 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027624elif ln conf$$.file conf$$ 2>/dev/null; then
27625 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027626else
27627 as_ln_s='cp -p'
27628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027629rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27630rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027631
Skip Montanaro6dead952003-09-25 14:50:04 +000027632if mkdir -p . 2>/dev/null; then
27633 as_mkdir_p=:
27634else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027635 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027636 as_mkdir_p=false
27637fi
27638
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027639if test -x / >/dev/null 2>&1; then
27640 as_test_x='test -x'
27641else
27642 if ls -dL / >/dev/null 2>&1; then
27643 as_ls_L_option=L
27644 else
27645 as_ls_L_option=
27646 fi
27647 as_test_x='
27648 eval sh -c '\''
27649 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027650 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027651 else
27652 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027653 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027654 esac;
27655 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27656 ???[sx]*):;;*)false;;esac;fi
27657 '\'' sh
27658 '
27659fi
27660as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027661
27662# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027663as_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 +000027664
27665# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027666as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027667
27668
Martin v. Löwis11437992002-04-12 09:54:03 +000027669exec 6>&1
27670
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027671# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027672# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027673# values after options handling.
27674ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027675This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027676generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027677
27678 CONFIG_FILES = $CONFIG_FILES
27679 CONFIG_HEADERS = $CONFIG_HEADERS
27680 CONFIG_LINKS = $CONFIG_LINKS
27681 CONFIG_COMMANDS = $CONFIG_COMMANDS
27682 $ $0 $@
27683
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027684on `(hostname || uname -n) 2>/dev/null | sed 1q`
27685"
27686
Martin v. Löwis11437992002-04-12 09:54:03 +000027687_ACEOF
27688
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027689cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027690# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027691config_files="$ac_config_files"
27692config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027693
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027694_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027695
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027696cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027697ac_cs_usage="\
27698\`$as_me' instantiates files from templates according to the
27699current configuration.
27700
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027701Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027702
27703 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027704 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027705 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027706 -d, --debug don't remove temporary files
27707 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027708 --file=FILE[:TEMPLATE]
27709 instantiate the configuration file FILE
27710 --header=FILE[:TEMPLATE]
27711 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027712
27713Configuration files:
27714$config_files
27715
27716Configuration headers:
27717$config_headers
27718
27719Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027720
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027721_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027722cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027723ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027724python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027725configured by $0, generated by GNU Autoconf 2.61,
27726 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027727
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027728Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027729This config.status script is free software; the Free Software Foundation
27730gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027731
27732ac_pwd='$ac_pwd'
27733srcdir='$srcdir'
27734INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027735_ACEOF
27736
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027737cat >>$CONFIG_STATUS <<\_ACEOF
27738# If no file are specified by the user, then we need to provide default
27739# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027740ac_need_defaults=:
27741while test $# != 0
27742do
27743 case $1 in
27744 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027745 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27746 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027747 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027748 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027749 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027750 ac_option=$1
27751 ac_optarg=$2
27752 ac_shift=shift
27753 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027754 esac
27755
Skip Montanaro6dead952003-09-25 14:50:04 +000027756 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027757 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027758 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27759 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027760 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027761 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027762 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027763 debug=: ;;
27764 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027765 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027766 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027767 ac_need_defaults=false;;
27768 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027769 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027770 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027771 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027772 --he | --h)
27773 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027774 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027775Try \`$0 --help' for more information." >&2
27776 { (exit 1); exit 1; }; };;
27777 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027778 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027779 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27780 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27781 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027782
27783 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027784 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027785Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027786 { (exit 1); exit 1; }; } ;;
27787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027788 *) ac_config_targets="$ac_config_targets $1"
27789 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027790
27791 esac
27792 shift
27793done
27794
Skip Montanaro6dead952003-09-25 14:50:04 +000027795ac_configure_extra_args=
27796
27797if $ac_cs_silent; then
27798 exec 6>/dev/null
27799 ac_configure_extra_args="$ac_configure_extra_args --silent"
27800fi
27801
27802_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027803cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027804if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027805 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27806 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027807 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027808 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027809fi
27810
Martin v. Löwis11437992002-04-12 09:54:03 +000027811_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027812cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027813exec 5>>config.log
27814{
27815 echo
27816 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27817## Running $as_me. ##
27818_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027819 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027820} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027821
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027822_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027823cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027824_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027825
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027826cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027827
27828# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027829for ac_config_target in $ac_config_targets
27830do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027831 case $ac_config_target in
27832 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27833 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27834 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027835 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27836 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027837 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27838 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027839 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027840
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027841 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27842echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027843 { (exit 1); exit 1; }; };;
27844 esac
27845done
27846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027847
Martin v. Löwis11437992002-04-12 09:54:03 +000027848# If the user did not use the arguments to specify the items to instantiate,
27849# then the envvar interface is used. Set only those that are not.
27850# We use the long form for the default assignment because of an extremely
27851# bizarre bug on SunOS 4.1.3.
27852if $ac_need_defaults; then
27853 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27854 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27855fi
27856
Skip Montanaro6dead952003-09-25 14:50:04 +000027857# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027858# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027859# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027860# Hook for its removal unless debugging.
27861# Note that there is a small window in which the directory will not be cleaned:
27862# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027863$debug ||
27864{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027865 tmp=
27866 trap 'exit_status=$?
27867 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27868' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027869 trap '{ (exit 1); exit 1; }' 1 2 13 15
27870}
Martin v. Löwis11437992002-04-12 09:54:03 +000027871# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027872
Martin v. Löwis11437992002-04-12 09:54:03 +000027873{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027874 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027875 test -n "$tmp" && test -d "$tmp"
27876} ||
27877{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027878 tmp=./conf$$-$RANDOM
27879 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027880} ||
27881{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027882 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027883 { (exit 1); exit 1; }
27884}
27885
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027886#
27887# Set up the sed scripts for CONFIG_FILES section.
27888#
27889
27890# No need to generate the scripts if there are no CONFIG_FILES.
27891# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027892if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027893
27894_ACEOF
27895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027896
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027897
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027898ac_delim='%!_!# '
27899for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027900 cat >conf$$subs.sed <<_ACEOF
27901SHELL!$SHELL$ac_delim
27902PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27903PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27904PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27905PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27906PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27907PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27908exec_prefix!$exec_prefix$ac_delim
27909prefix!$prefix$ac_delim
27910program_transform_name!$program_transform_name$ac_delim
27911bindir!$bindir$ac_delim
27912sbindir!$sbindir$ac_delim
27913libexecdir!$libexecdir$ac_delim
27914datarootdir!$datarootdir$ac_delim
27915datadir!$datadir$ac_delim
27916sysconfdir!$sysconfdir$ac_delim
27917sharedstatedir!$sharedstatedir$ac_delim
27918localstatedir!$localstatedir$ac_delim
27919includedir!$includedir$ac_delim
27920oldincludedir!$oldincludedir$ac_delim
27921docdir!$docdir$ac_delim
27922infodir!$infodir$ac_delim
27923htmldir!$htmldir$ac_delim
27924dvidir!$dvidir$ac_delim
27925pdfdir!$pdfdir$ac_delim
27926psdir!$psdir$ac_delim
27927libdir!$libdir$ac_delim
27928localedir!$localedir$ac_delim
27929mandir!$mandir$ac_delim
27930DEFS!$DEFS$ac_delim
27931ECHO_C!$ECHO_C$ac_delim
27932ECHO_N!$ECHO_N$ac_delim
27933ECHO_T!$ECHO_T$ac_delim
27934LIBS!$LIBS$ac_delim
27935build_alias!$build_alias$ac_delim
27936host_alias!$host_alias$ac_delim
27937target_alias!$target_alias$ac_delim
27938VERSION!$VERSION$ac_delim
27939SOVERSION!$SOVERSION$ac_delim
27940CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27941UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27942ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000027943LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027944PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27945PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27946PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27947PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27948PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27949FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27950FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27951FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27952FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27953FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27954MACHDEP!$MACHDEP$ac_delim
27955SGI_ABI!$SGI_ABI$ac_delim
27956CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27957EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27958CC!$CC$ac_delim
27959CFLAGS!$CFLAGS$ac_delim
27960LDFLAGS!$LDFLAGS$ac_delim
27961CPPFLAGS!$CPPFLAGS$ac_delim
27962ac_ct_CC!$ac_ct_CC$ac_delim
27963EXEEXT!$EXEEXT$ac_delim
27964OBJEXT!$OBJEXT$ac_delim
27965CXX!$CXX$ac_delim
27966MAINCC!$MAINCC$ac_delim
27967CPP!$CPP$ac_delim
27968GREP!$GREP$ac_delim
27969EGREP!$EGREP$ac_delim
27970BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27971LIBRARY!$LIBRARY$ac_delim
27972LDLIBRARY!$LDLIBRARY$ac_delim
27973DLLLIBRARY!$DLLLIBRARY$ac_delim
27974BLDLIBRARY!$BLDLIBRARY$ac_delim
27975LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27976INSTSONAME!$INSTSONAME$ac_delim
27977RUNSHARED!$RUNSHARED$ac_delim
27978LINKCC!$LINKCC$ac_delim
27979GNULD!$GNULD$ac_delim
27980RANLIB!$RANLIB$ac_delim
27981AR!$AR$ac_delim
27982ARFLAGS!$ARFLAGS$ac_delim
27983SVNVERSION!$SVNVERSION$ac_delim
27984INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27985INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27986INSTALL_DATA!$INSTALL_DATA$ac_delim
27987LN!$LN$ac_delim
27988OPT!$OPT$ac_delim
27989BASECFLAGS!$BASECFLAGS$ac_delim
27990UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27991OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27992LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27993SO!$SO$ac_delim
27994LDSHARED!$LDSHARED$ac_delim
27995BLDSHARED!$BLDSHARED$ac_delim
27996CCSHARED!$CCSHARED$ac_delim
27997LINKFORSHARED!$LINKFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027998_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027999
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028000 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028001 break
28002 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028003 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28004echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028005 { (exit 1); exit 1; }; }
28006 else
28007 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028008 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028009done
28010
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028011ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28012if test -n "$ac_eof"; then
28013 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28014 ac_eof=`expr $ac_eof + 1`
28015fi
28016
28017cat >>$CONFIG_STATUS <<_ACEOF
28018cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28019/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028020_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028021sed '
28022s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28023s/^/s,@/; s/!/@,|#_!!_#|/
28024:n
28025t n
28026s/'"$ac_delim"'$/,g/; t
28027s/$/\\/; p
28028N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28029' >>$CONFIG_STATUS <conf$$subs.sed
28030rm -f conf$$subs.sed
28031cat >>$CONFIG_STATUS <<_ACEOF
28032CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028033_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028034
28035
28036ac_delim='%!_!# '
28037for ac_last_try in false false false false false :; do
28038 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000028039CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028040SHLIBS!$SHLIBS$ac_delim
Benjamin Petersond78735d2010-01-01 16:04:23 +000028041PKG_CONFIG!$PKG_CONFIG$ac_delim
28042LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028043USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28044SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28045USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28046LDLAST!$LDLAST$ac_delim
28047THREADOBJ!$THREADOBJ$ac_delim
28048DLINCLDIR!$DLINCLDIR$ac_delim
28049DYNLOADFILE!$DYNLOADFILE$ac_delim
28050MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28051TRUE!$TRUE$ac_delim
28052LIBOBJS!$LIBOBJS$ac_delim
28053HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28054HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28055HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28056HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28057HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28058LIBM!$LIBM$ac_delim
28059LIBC!$LIBC$ac_delim
28060THREADHEADERS!$THREADHEADERS$ac_delim
28061SRCDIRS!$SRCDIRS$ac_delim
28062LTLIBOBJS!$LTLIBOBJS$ac_delim
28063_ACEOF
28064
Benjamin Petersond78735d2010-01-01 16:04:23 +000028065 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028066 break
28067 elif $ac_last_try; then
28068 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28069echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028070 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028071 else
28072 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28073 fi
28074done
28075
28076ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28077if test -n "$ac_eof"; then
28078 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28079 ac_eof=`expr $ac_eof + 1`
28080fi
28081
28082cat >>$CONFIG_STATUS <<_ACEOF
28083cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28084/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028085_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028086sed '
28087s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28088s/^/s,@/; s/!/@,|#_!!_#|/
28089:n
28090t n
28091s/'"$ac_delim"'$/,g/; t
28092s/$/\\/; p
28093N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28094' >>$CONFIG_STATUS <conf$$subs.sed
28095rm -f conf$$subs.sed
28096cat >>$CONFIG_STATUS <<_ACEOF
28097:end
28098s/|#_!!_#|//g
28099CEOF$ac_eof
28100_ACEOF
28101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028102
28103# VPATH may cause trouble with some makes, so we remove $(srcdir),
28104# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28105# trailing colons and then remove the whole line if VPATH becomes empty
28106# (actually we leave an empty line to preserve line numbers).
28107if test "x$srcdir" = x.; then
28108 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28109s/:*\$(srcdir):*/:/
28110s/:*\${srcdir}:*/:/
28111s/:*@srcdir@:*/:/
28112s/^\([^=]*=[ ]*\):*/\1/
28113s/:*$//
28114s/^[^=]*=[ ]*$//
28115}'
28116fi
28117
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028118cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028119fi # test -n "$CONFIG_FILES"
28120
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028121
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028122for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028123do
28124 case $ac_tag in
28125 :[FHLC]) ac_mode=$ac_tag; continue;;
28126 esac
28127 case $ac_mode$ac_tag in
28128 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028129 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28130echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028131 { (exit 1); exit 1; }; };;
28132 :[FH]-) ac_tag=-:-;;
28133 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28134 esac
28135 ac_save_IFS=$IFS
28136 IFS=:
28137 set x $ac_tag
28138 IFS=$ac_save_IFS
28139 shift
28140 ac_file=$1
28141 shift
28142
28143 case $ac_mode in
28144 :L) ac_source=$1;;
28145 :[FH])
28146 ac_file_inputs=
28147 for ac_f
28148 do
28149 case $ac_f in
28150 -) ac_f="$tmp/stdin";;
28151 *) # Look for the file first in the build tree, then in the source tree
28152 # (if the path is not absolute). The absolute path cannot be DOS-style,
28153 # because $ac_f cannot contain `:'.
28154 test -f "$ac_f" ||
28155 case $ac_f in
28156 [\\/$]*) false;;
28157 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28158 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028159 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28160echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028161 { (exit 1); exit 1; }; };;
28162 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028163 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028164 done
28165
28166 # Let's still pretend it is `configure' which instantiates (i.e., don't
28167 # use $as_me), people would be surprised to read:
28168 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028169 configure_input="Generated from "`IFS=:
28170 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028171 if test x"$ac_file" != x-; then
28172 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028173 { echo "$as_me:$LINENO: creating $ac_file" >&5
28174echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028175 fi
28176
28177 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028178 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028179 esac
28180 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028181 esac
28182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028183 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028184$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028185 X"$ac_file" : 'X\(//\)[^/]' \| \
28186 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028187 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028188echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028189 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28190 s//\1/
28191 q
28192 }
28193 /^X\(\/\/\)[^/].*/{
28194 s//\1/
28195 q
28196 }
28197 /^X\(\/\/\)$/{
28198 s//\1/
28199 q
28200 }
28201 /^X\(\/\).*/{
28202 s//\1/
28203 q
28204 }
28205 s/.*/./; q'`
28206 { as_dir="$ac_dir"
28207 case $as_dir in #(
28208 -*) as_dir=./$as_dir;;
28209 esac
28210 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028211 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028212 while :; do
28213 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028214 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028215 *) as_qdir=$as_dir;;
28216 esac
28217 as_dirs="'$as_qdir' $as_dirs"
28218 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028219$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028220 X"$as_dir" : 'X\(//\)[^/]' \| \
28221 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028222 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028223echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028224 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28225 s//\1/
28226 q
28227 }
28228 /^X\(\/\/\)[^/].*/{
28229 s//\1/
28230 q
28231 }
28232 /^X\(\/\/\)$/{
28233 s//\1/
28234 q
28235 }
28236 /^X\(\/\).*/{
28237 s//\1/
28238 q
28239 }
28240 s/.*/./; q'`
28241 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028242 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028243 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028244 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28245echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028246 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028247 ac_builddir=.
28248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028249case "$ac_dir" in
28250.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28251*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028252 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028253 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028254 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028255 case $ac_top_builddir_sub in
28256 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28257 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28258 esac ;;
28259esac
28260ac_abs_top_builddir=$ac_pwd
28261ac_abs_builddir=$ac_pwd$ac_dir_suffix
28262# for backward compatibility:
28263ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028264
28265case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028266 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028267 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028268 ac_top_srcdir=$ac_top_builddir_sub
28269 ac_abs_top_srcdir=$ac_pwd ;;
28270 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028271 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028272 ac_top_srcdir=$srcdir
28273 ac_abs_top_srcdir=$srcdir ;;
28274 *) # Relative name.
28275 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28276 ac_top_srcdir=$ac_top_build_prefix$srcdir
28277 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028278esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028279ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028280
Martin v. Löwis11437992002-04-12 09:54:03 +000028281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028282 case $ac_mode in
28283 :F)
28284 #
28285 # CONFIG_FILE
28286 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028287
28288 case $INSTALL in
28289 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028290 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028291 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000028292_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028293
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028294cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028295# If the template does not know about datarootdir, expand it.
28296# FIXME: This hack should be removed a few years after 2.60.
28297ac_datarootdir_hack=; ac_datarootdir_seen=
28298
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028299case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028300 p
28301 q
28302}
28303/@datadir@/p
28304/@docdir@/p
28305/@infodir@/p
28306/@localedir@/p
28307/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028308' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028309*datarootdir*) ac_datarootdir_seen=yes;;
28310*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028311 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28312echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028313_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028314cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028315 ac_datarootdir_hack='
28316 s&@datadir@&$datadir&g
28317 s&@docdir@&$docdir&g
28318 s&@infodir@&$infodir&g
28319 s&@localedir@&$localedir&g
28320 s&@mandir@&$mandir&g
28321 s&\\\${datarootdir}&$datarootdir&g' ;;
28322esac
28323_ACEOF
28324
28325# Neutralize VPATH when `$srcdir' = `.'.
28326# Shell code in configure.ac might set extrasub.
28327# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028328cat >>$CONFIG_STATUS <<_ACEOF
28329 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028330$extrasub
28331_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028332cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028333:t
28334/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028335s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028336s&@top_builddir@&$ac_top_builddir_sub&;t t
28337s&@srcdir@&$ac_srcdir&;t t
28338s&@abs_srcdir@&$ac_abs_srcdir&;t t
28339s&@top_srcdir@&$ac_top_srcdir&;t t
28340s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28341s&@builddir@&$ac_builddir&;t t
28342s&@abs_builddir@&$ac_abs_builddir&;t t
28343s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28344s&@INSTALL@&$ac_INSTALL&;t t
28345$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028346" $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 +000028347
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028348test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28349 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28350 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028351 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028352which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028353echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028354which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000028355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028356 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028357 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028358 -) cat "$tmp/out"; rm -f "$tmp/out";;
28359 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28360 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028361 ;;
28362 :H)
28363 #
28364 # CONFIG_HEADER
28365 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028366_ACEOF
28367
28368# Transform confdefs.h into a sed script `conftest.defines', that
28369# substitutes the proper values into config.h.in to produce config.h.
28370rm -f conftest.defines conftest.tail
28371# First, append a space to every undef/define line, to ease matching.
28372echo 's/$/ /' >conftest.defines
28373# Then, protect against being on the right side of a sed subst, or in
28374# an unquoted here document, in config.status. If some macros were
28375# called several times there might be several #defines for the same
28376# symbol, which is useless. But do not sort them, since the last
28377# AC_DEFINE must be honored.
28378ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28379# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28380# NAME is the cpp macro being defined, VALUE is the value it is being given.
28381# PARAMS is the parameter list in the macro definition--in most cases, it's
28382# just an empty string.
28383ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28384ac_dB='\\)[ (].*,\\1define\\2'
28385ac_dC=' '
28386ac_dD=' ,'
28387
28388uniq confdefs.h |
28389 sed -n '
28390 t rset
28391 :rset
28392 s/^[ ]*#[ ]*define[ ][ ]*//
28393 t ok
28394 d
28395 :ok
28396 s/[\\&,]/\\&/g
28397 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28398 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28399 ' >>conftest.defines
28400
28401# Remove the space that was appended to ease matching.
28402# Then replace #undef with comments. This is necessary, for
28403# example, in the case of _POSIX_SOURCE, which is predefined and required
28404# on some systems where configure will not decide to define it.
28405# (The regexp can be short, since the line contains either #define or #undef.)
28406echo 's/ $//
28407s,^[ #]*u.*,/* & */,' >>conftest.defines
28408
28409# Break up conftest.defines:
28410ac_max_sed_lines=50
28411
28412# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28413# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28414# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28415# et cetera.
28416ac_in='$ac_file_inputs'
28417ac_out='"$tmp/out1"'
28418ac_nxt='"$tmp/out2"'
28419
28420while :
28421do
28422 # Write a here document:
28423 cat >>$CONFIG_STATUS <<_ACEOF
28424 # First, check the format of the line:
28425 cat >"\$tmp/defines.sed" <<\\CEOF
28426/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28427/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28428b
28429:def
28430_ACEOF
28431 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28432 echo 'CEOF
28433 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28434 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28435 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28436 grep . conftest.tail >/dev/null || break
28437 rm -f conftest.defines
28438 mv conftest.tail conftest.defines
28439done
28440rm -f conftest.defines conftest.tail
28441
28442echo "ac_result=$ac_in" >>$CONFIG_STATUS
28443cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028444 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028445 echo "/* $configure_input */" >"$tmp/config.h"
28446 cat "$ac_result" >>"$tmp/config.h"
28447 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28448 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28449echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028450 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028451 rm -f $ac_file
28452 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028453 fi
28454 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028455 echo "/* $configure_input */"
28456 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028457 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028458 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028459 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028461
28462 esac
28463
28464done # for ac_tag
28465
Guido van Rossum627b2d71993-12-24 10:39:16 +000028466
Martin v. Löwis11437992002-04-12 09:54:03 +000028467{ (exit 0); exit 0; }
28468_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028469chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028470ac_clean_files=$ac_clean_files_save
28471
28472
28473# configure is writing to config.log, and then calls config.status.
28474# config.status does its own redirection, appending to config.log.
28475# Unfortunately, on DOS this fails, as config.log is still kept open
28476# by configure, so config.status won't be able to write to it; its
28477# output is simply discarded. So we exec the FD to /dev/null,
28478# effectively closing config.log, so it can be properly (re)opened and
28479# appended to by config.status. When coming back to configure, we
28480# need to make the FD available again.
28481if test "$no_create" != yes; then
28482 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028483 ac_config_status_args=
28484 test "$silent" = yes &&
28485 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028486 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028487 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028488 exec 5>>config.log
28489 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28490 # would make configure fail if this is the last instruction.
28491 $ac_cs_success || { (exit 1); exit 1; }
28492fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028493
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028494
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028495echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028496if test ! -f Modules/Setup
28497then
28498 cp $srcdir/Modules/Setup.dist Modules/Setup
28499fi
28500
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028501echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028502if test ! -f Modules/Setup.local
28503then
28504 echo "# Edit this file for local setup changes" >Modules/Setup.local
28505fi
28506
28507echo "creating Makefile"
28508$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28509 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028510 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028511mv config.c Modules