blob: 94c6c6dcb9b16636f597b330cd05500fb8604631 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002# From configure.in Revision: 76815 .
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
718USE_SIGNAL_MODULE
719SIGNAL_OBJS
720USE_THREAD_MODULE
721LDLAST
722THREADOBJ
723DLINCLDIR
724DYNLOADFILE
725MACHDEP_OBJS
726TRUE
727LIBOBJS
728HAVE_GETHOSTBYNAME_R_6_ARG
729HAVE_GETHOSTBYNAME_R_5_ARG
730HAVE_GETHOSTBYNAME_R_3_ARG
731HAVE_GETHOSTBYNAME_R
732HAVE_GETHOSTBYNAME
733LIBM
734LIBC
735THREADHEADERS
736SRCDIRS
737LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000738ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000739 ac_precious_vars='build_alias
740host_alias
741target_alias
742CC
743CFLAGS
744LDFLAGS
745LIBS
746CPPFLAGS
747CPP'
748
Guido van Rossum627b2d71993-12-24 10:39:16 +0000749
Guido van Rossum7f43da71994-08-01 12:15:30 +0000750# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000751ac_init_help=
752ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000753# The variables have the same names as the options, with
754# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000755cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000757no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758no_recursion=
759prefix=NONE
760program_prefix=NONE
761program_suffix=NONE
762program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000767x_includes=NONE
768x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000769
770# Installation directory options.
771# These are left unexpanded so users can "make install exec_prefix=/foo"
772# and all the variables that are supposed to be based on exec_prefix
773# by default will actually change.
774# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000775# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000776bindir='${exec_prefix}/bin'
777sbindir='${exec_prefix}/sbin'
778libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000779datarootdir='${prefix}/share'
780datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000781sysconfdir='${prefix}/etc'
782sharedstatedir='${prefix}/com'
783localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000784includedir='${prefix}/include'
785oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000786docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
787infodir='${datarootdir}/info'
788htmldir='${docdir}'
789dvidir='${docdir}'
790pdfdir='${docdir}'
791psdir='${docdir}'
792libdir='${exec_prefix}/lib'
793localedir='${datarootdir}/locale'
794mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000797ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000799do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800 # If the previous option needs an argument, assign it.
801 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000802 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803 ac_prev=
804 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000807 case $ac_option in
808 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
809 *) ac_optarg=yes ;;
810 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000811
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000812 # Accept the important Cygnus configure options, so we can diagnose typos.
813
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000814 case $ac_dashdash$ac_option in
815 --)
816 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000818 -bindir | --bindir | --bindi | --bind | --bin | --bi)
819 ac_prev=bindir ;;
820 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000821 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822
823 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000824 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000828 -cache-file | --cache-file | --cache-fil | --cache-fi \
829 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
830 ac_prev=cache_file ;;
831 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
832 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000833 cache_file=$ac_optarg ;;
834
835 --config-cache | -C)
836 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000841 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
844 | --dataroo | --dataro | --datar)
845 ac_prev=datarootdir ;;
846 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
847 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
848 datarootdir=$ac_optarg ;;
849
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850 -disable-* | --disable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000851 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000853 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
854 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000855 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000856 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
857 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858
859 -docdir | --docdir | --docdi | --doc | --do)
860 ac_prev=docdir ;;
861 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
862 docdir=$ac_optarg ;;
863
864 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
865 ac_prev=dvidir ;;
866 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
867 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868
869 -enable-* | --enable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000870 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000872 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
873 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000874 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000875 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
876 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
879 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
880 | --exec | --exe | --ex)
881 ac_prev=exec_prefix ;;
882 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
883 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
884 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000885 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886
887 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 # Obsolete; use --with-gas.
889 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890
Martin v. Löwis11437992002-04-12 09:54:03 +0000891 -help | --help | --hel | --he | -h)
892 ac_init_help=long ;;
893 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
894 ac_init_help=recursive ;;
895 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
896 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897
898 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
904 ac_prev=htmldir ;;
905 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
906 | --ht=*)
907 htmldir=$ac_optarg ;;
908
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909 -includedir | --includedir | --includedi | --included | --include \
910 | --includ | --inclu | --incl | --inc)
911 ac_prev=includedir ;;
912 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
913 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915
916 -infodir | --infodir | --infodi | --infod | --info | --inf)
917 ac_prev=infodir ;;
918 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000920
921 -libdir | --libdir | --libdi | --libd)
922 ac_prev=libdir ;;
923 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925
926 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
927 | --libexe | --libex | --libe)
928 ac_prev=libexecdir ;;
929 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
930 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000933 -localedir | --localedir | --localedi | --localed | --locale)
934 ac_prev=localedir ;;
935 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
936 localedir=$ac_optarg ;;
937
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000939 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 ac_prev=localstatedir ;;
941 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000942 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944
945 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
946 ac_prev=mandir ;;
947 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951 # Obsolete; use --without-fp.
952 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
954 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 no_create=yes ;;
957
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
959 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
960 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
963 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
964 | --oldin | --oldi | --old | --ol | --o)
965 ac_prev=oldincludedir ;;
966 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
967 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
968 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
972 ac_prev=prefix ;;
973 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
976 -program-prefix | --program-prefix | --program-prefi | --program-pref \
977 | --program-pre | --program-pr | --program-p)
978 ac_prev=program_prefix ;;
979 -program-prefix=* | --program-prefix=* | --program-prefi=* \
980 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -program-suffix | --program-suffix | --program-suffi | --program-suff \
984 | --program-suf | --program-su | --program-s)
985 ac_prev=program_suffix ;;
986 -program-suffix=* | --program-suffix=* | --program-suffi=* \
987 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -program-transform-name | --program-transform-name \
991 | --program-transform-nam | --program-transform-na \
992 | --program-transform-n | --program-transform- \
993 | --program-transform | --program-transfor \
994 | --program-transfo | --program-transf \
995 | --program-trans | --program-tran \
996 | --progr-tra | --program-tr | --program-t)
997 ac_prev=program_transform_name ;;
998 -program-transform-name=* | --program-transform-name=* \
999 | --program-transform-nam=* | --program-transform-na=* \
1000 | --program-transform-n=* | --program-transform-=* \
1001 | --program-transform=* | --program-transfor=* \
1002 | --program-transfo=* | --program-transf=* \
1003 | --program-trans=* | --program-tran=* \
1004 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001007 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1008 ac_prev=pdfdir ;;
1009 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1010 pdfdir=$ac_optarg ;;
1011
1012 -psdir | --psdir | --psdi | --psd | --ps)
1013 ac_prev=psdir ;;
1014 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1015 psdir=$ac_optarg ;;
1016
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1018 | -silent | --silent | --silen | --sile | --sil)
1019 silent=yes ;;
1020
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1022 ac_prev=sbindir ;;
1023 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1024 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
1027 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1028 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1029 | --sharedst | --shareds | --shared | --share | --shar \
1030 | --sha | --sh)
1031 ac_prev=sharedstatedir ;;
1032 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1033 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1034 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1035 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 -site | --site | --sit)
1039 ac_prev=site ;;
1040 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001042
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1044 ac_prev=srcdir ;;
1045 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1049 | --syscon | --sysco | --sysc | --sys | --sy)
1050 ac_prev=sysconfdir ;;
1051 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1052 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 ac_prev=target_alias ;;
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 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059
1060 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1061 verbose=yes ;;
1062
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 -version | --version | --versio | --versi | --vers | -V)
1064 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
1066 -with-* | --with-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001067 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001069 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1070 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001072 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1073 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -without-* | --without-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001076 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001078 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1079 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001081 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1082 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 --x)
1085 # Obsolete; use --with-x.
1086 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
1088 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1089 | --x-incl | --x-inc | --x-in | --x-i)
1090 ac_prev=x_includes ;;
1091 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1092 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1096 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1097 ac_prev=x_libraries ;;
1098 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1099 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001102 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001103Try \`$0 --help' for more information." >&2
1104 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 ;;
1106
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 *=*)
1108 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1109 # Reject names that are not valid shell variable names.
1110 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001111 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001113 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 export $ac_envvar ;;
1115
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001116 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001118 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001120 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122 ;;
1123
1124 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001125done
1126
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001129 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131fi
1132
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001133# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001134for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1135 datadir sysconfdir sharedstatedir localstatedir includedir \
1136 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1137 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001139 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001141 [\\/$]* | ?:[\\/]* ) continue;;
1142 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001144 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001145 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001146done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001147
Martin v. Löwis11437992002-04-12 09:54:03 +00001148# There might be people who depend on the old broken behavior: `$host'
1149# used to hold the argument of --host etc.
1150# FIXME: To remove some day.
1151build=$build_alias
1152host=$host_alias
1153target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001154
Martin v. Löwis11437992002-04-12 09:54:03 +00001155# FIXME: To remove some day.
1156if test "x$host_alias" != x; then
1157 if test "x$build_alias" = x; then
1158 cross_compiling=maybe
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001159 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 +00001160 If a cross compiler is detected then cross compile mode will be used." >&2
1161 elif test "x$build_alias" != "x$host_alias"; then
1162 cross_compiling=yes
1163 fi
1164fi
1165
1166ac_tool_prefix=
1167test -n "$host_alias" && ac_tool_prefix=$host_alias-
1168
1169test "$silent" = yes && exec 6>/dev/null
1170
Guido van Rossum627b2d71993-12-24 10:39:16 +00001171
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001172ac_pwd=`pwd` && test -n "$ac_pwd" &&
1173ac_ls_di=`ls -di .` &&
1174ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001175 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001176 { (exit 1); exit 1; }; }
1177test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001178 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001179 { (exit 1); exit 1; }; }
1180
1181
Guido van Rossum627b2d71993-12-24 10:39:16 +00001182# Find the source files, if location was not specified.
1183if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001185 # Try the directory containing this script, then the parent directory.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001186 ac_confdir=`$as_dirname -- "$0" ||
1187$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1188 X"$0" : 'X\(//\)[^/]' \| \
1189 X"$0" : 'X\(//\)$' \| \
1190 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1191echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001192 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1193 s//\1/
1194 q
1195 }
1196 /^X\(\/\/\)[^/].*/{
1197 s//\1/
1198 q
1199 }
1200 /^X\(\/\/\)$/{
1201 s//\1/
1202 q
1203 }
1204 /^X\(\/\).*/{
1205 s//\1/
1206 q
1207 }
1208 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001210 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001211 srcdir=..
1212 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213else
1214 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001216if test ! -r "$srcdir/$ac_unique_file"; then
1217 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001218 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001221ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1222ac_abs_confdir=`(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001223 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001224 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001225 pwd)`
1226# When building in place, set srcdir=.
1227if test "$ac_abs_confdir" = "$ac_pwd"; then
1228 srcdir=.
1229fi
1230# Remove unnecessary trailing slashes from srcdir.
1231# Double slashes in file names in object file debugging info
1232# mess up M-x gdb in Emacs.
1233case $srcdir in
1234*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1235esac
1236for ac_var in $ac_precious_vars; do
1237 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1238 eval ac_env_${ac_var}_value=\$${ac_var}
1239 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1241done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001242
Martin v. Löwis11437992002-04-12 09:54:03 +00001243#
1244# Report the --help message.
1245#
1246if test "$ac_init_help" = "long"; then
1247 # Omit some internal or obsolete options to make the list less imposing.
1248 # This message is too long to be a string in the A/UX 3.1 sh.
1249 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001250\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001251
1252Usage: $0 [OPTION]... [VAR=VALUE]...
1253
1254To assign environment variables (e.g., CC, CFLAGS...), specify them as
1255VAR=VALUE. See below for descriptions of some of the useful variables.
1256
1257Defaults for the options are specified in brackets.
1258
1259Configuration:
1260 -h, --help display this help and exit
1261 --help=short display options specific to this package
1262 --help=recursive display the short help of all the included packages
1263 -V, --version display version information and exit
1264 -q, --quiet, --silent do not print \`checking...' messages
1265 --cache-file=FILE cache test results in FILE [disabled]
1266 -C, --config-cache alias for \`--cache-file=config.cache'
1267 -n, --no-create do not create output files
1268 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1269
Martin v. Löwis11437992002-04-12 09:54:03 +00001270Installation directories:
1271 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001272 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001274 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275
1276By default, \`make install' will install all the files in
1277\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1278an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1279for instance \`--prefix=\$HOME'.
1280
1281For better control, use the options below.
1282
1283Fine tuning of the installation directories:
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001284 --bindir=DIR user executables [EPREFIX/bin]
1285 --sbindir=DIR system admin executables [EPREFIX/sbin]
1286 --libexecdir=DIR program executables [EPREFIX/libexec]
1287 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1288 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1289 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1290 --libdir=DIR object code libraries [EPREFIX/lib]
1291 --includedir=DIR C header files [PREFIX/include]
1292 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1293 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1294 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1295 --infodir=DIR info documentation [DATAROOTDIR/info]
1296 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1297 --mandir=DIR man documentation [DATAROOTDIR/man]
1298 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1299 --htmldir=DIR html documentation [DOCDIR]
1300 --dvidir=DIR dvi documentation [DOCDIR]
1301 --pdfdir=DIR pdf documentation [DOCDIR]
1302 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001303_ACEOF
1304
1305 cat <<\_ACEOF
1306_ACEOF
1307fi
1308
1309if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001310 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001311 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001313 cat <<\_ACEOF
1314
1315Optional Features:
1316 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1317 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001318 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001319 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001320 --enable-framework[=INSTALLDIR]
1321 Build (MacOSX|Darwin) framework
1322 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001323 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001324 --enable-ipv6 Enable ipv6 (with ipv4) support
1325 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001326 --enable-big-digits[=BITS]
1327 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001328
1329Optional Packages:
1330 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1331 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001332 --with-universal-archs=ARCH
1333 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001334 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001335 --with-framework-name=FRAMEWORK
1336 specify an alternate name of the framework built
1337 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001338 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001339 --with-cxx-main=<compiler>
1340 compile main() and link python executable with C++
1341 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001342 --with-suffix=.exe set executable suffix
1343 --with-pydebug build with Py_DEBUG defined
1344 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001345 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001346 --with-dbmliborder=db1:db2:...
1347 order to check db backends for dbm. Valid value is a
1348 colon separated string with the backend names
1349 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001350 --with-signal-module disable/enable signal module
1351 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1352 --with(out)-threads[=DIRECTORY]
1353 disable/enable thread support
1354 --with(out)-thread[=DIRECTORY]
1355 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001356 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001357 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001359 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001361 --with-fpectl enable SIGFPE catching
1362 --with-libm=STRING math library
1363 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001364 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001365 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1366 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001367
1368Some influential environment variables:
1369 CC C compiler command
1370 CFLAGS C compiler flags
1371 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1372 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373 LIBS libraries to pass to the linker, e.g. -l<library>
1374 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1375 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001376 CPP C preprocessor
1377
1378Use these variables to override the choices made by `configure' or to help
1379it to find libraries and programs with nonstandard names/locations.
1380
Georg Brandle2e15612009-05-20 18:25:10 +00001381Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001382_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001383ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001384fi
1385
1386if test "$ac_init_help" = "recursive"; then
1387 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001388 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001389 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 ac_builddir=.
1391
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001392case "$ac_dir" in
1393.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1394*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001395 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001396 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001397 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001398 case $ac_top_builddir_sub in
1399 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1400 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1401 esac ;;
1402esac
1403ac_abs_top_builddir=$ac_pwd
1404ac_abs_builddir=$ac_pwd$ac_dir_suffix
1405# for backward compatibility:
1406ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001407
1408case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001409 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001410 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001411 ac_top_srcdir=$ac_top_builddir_sub
1412 ac_abs_top_srcdir=$ac_pwd ;;
1413 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001415 ac_top_srcdir=$srcdir
1416 ac_abs_top_srcdir=$srcdir ;;
1417 *) # Relative name.
1418 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1419 ac_top_srcdir=$ac_top_build_prefix$srcdir
1420 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001421esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001422ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001423
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001424 cd "$ac_dir" || { ac_status=$?; continue; }
1425 # Check for guested configure.
1426 if test -f "$ac_srcdir/configure.gnu"; then
1427 echo &&
1428 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1429 elif test -f "$ac_srcdir/configure"; then
1430 echo &&
1431 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001432 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001433 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001434 fi || ac_status=$?
1435 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 done
1437fi
1438
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001439test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001440if $ac_init_version; then
1441 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001442python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001443generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001444
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001445Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014462002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001447This configure script is free software; the Free Software Foundation
1448gives unlimited permission to copy, distribute and modify it.
1449_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001450 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001452cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001453This file contains any messages produced by compilers while
1454running configure, to aid debugging if configure makes a mistake.
1455
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001456It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001457generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001458
1459 $ $0 $@
1460
1461_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001462exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001463{
1464cat <<_ASUNAME
1465## --------- ##
1466## Platform. ##
1467## --------- ##
1468
1469hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1470uname -m = `(uname -m) 2>/dev/null || echo unknown`
1471uname -r = `(uname -r) 2>/dev/null || echo unknown`
1472uname -s = `(uname -s) 2>/dev/null || echo unknown`
1473uname -v = `(uname -v) 2>/dev/null || echo unknown`
1474
1475/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1476/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1477
1478/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1479/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1480/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001481/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001482/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1483/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1484/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1485
1486_ASUNAME
1487
1488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1489for as_dir in $PATH
1490do
1491 IFS=$as_save_IFS
1492 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001493 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001494done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001496
1497} >&5
1498
1499cat >&5 <<_ACEOF
1500
1501
1502## ----------- ##
1503## Core tests. ##
1504## ----------- ##
1505
1506_ACEOF
1507
1508
1509# Keep a trace of the command line.
1510# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001511# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001512# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001513# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001515ac_configure_args0=
1516ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001517ac_must_keep_next=false
1518for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001519do
Skip Montanaro6dead952003-09-25 14:50:04 +00001520 for ac_arg
1521 do
1522 case $ac_arg in
1523 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1524 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1525 | -silent | --silent | --silen | --sile | --sil)
1526 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001527 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001528 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001529 esac
1530 case $ac_pass in
1531 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1532 2)
1533 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1534 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001535 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001536 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001537 case $ac_arg in
1538 *=* | --config-cache | -C | -disable-* | --disable-* \
1539 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1540 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1541 | -with-* | --with-* | -without-* | --without-* | --x)
1542 case "$ac_configure_args0 " in
1543 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1544 esac
1545 ;;
1546 -* ) ac_must_keep_next=true ;;
1547 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001548 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001549 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001550 ;;
1551 esac
1552 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001553done
Skip Montanaro6dead952003-09-25 14:50:04 +00001554$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1555$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 +00001556
1557# When interrupted or exit'd, cleanup temporary files, and complete
1558# config.log. We remove comments because anyway the quotes in there
1559# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560# WARNING: Use '\'' to represent an apostrophe within the trap.
1561# 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 +00001562trap 'exit_status=$?
1563 # Save into config.log some information that might help in debugging.
1564 {
1565 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001566
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 cat <<\_ASBOX
1568## ---------------- ##
1569## Cache variables. ##
1570## ---------------- ##
1571_ASBOX
1572 echo
1573 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574(
1575 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1576 eval ac_val=\$$ac_var
1577 case $ac_val in #(
1578 *${as_nl}*)
1579 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001580 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1581echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001582 esac
1583 case $ac_var in #(
1584 _ | IFS | as_nl) ;; #(
1585 *) $as_unset $ac_var ;;
1586 esac ;;
1587 esac
1588 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1591 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593 "s/'\''/'\''\\\\'\'''\''/g;
1594 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1595 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001596 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001598 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 esac |
1600 sort
1601)
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001603
1604 cat <<\_ASBOX
1605## ----------------- ##
1606## Output variables. ##
1607## ----------------- ##
1608_ASBOX
1609 echo
1610 for ac_var in $ac_subst_vars
1611 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001612 eval ac_val=\$$ac_var
1613 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001614 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001616 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001617 done | sort
1618 echo
1619
1620 if test -n "$ac_subst_files"; then
1621 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001622## ------------------- ##
1623## File substitutions. ##
1624## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001625_ASBOX
1626 echo
1627 for ac_var in $ac_subst_files
1628 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001629 eval ac_val=\$$ac_var
1630 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001631 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001632 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001633 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001634 done | sort
1635 echo
1636 fi
1637
Martin v. Löwis11437992002-04-12 09:54:03 +00001638 if test -s confdefs.h; then
1639 cat <<\_ASBOX
1640## ----------- ##
1641## confdefs.h. ##
1642## ----------- ##
1643_ASBOX
1644 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001645 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001646 echo
1647 fi
1648 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001649 echo "$as_me: caught signal $ac_signal"
1650 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001651 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001652 rm -f core *.core core.conftest.* &&
1653 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001654 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001655' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001656for ac_signal in 1 2 13 15; do
1657 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1658done
1659ac_signal=0
1660
1661# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001662rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001663
1664# Predefined preprocessor variables.
1665
1666cat >>confdefs.h <<_ACEOF
1667#define PACKAGE_NAME "$PACKAGE_NAME"
1668_ACEOF
1669
1670
1671cat >>confdefs.h <<_ACEOF
1672#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1673_ACEOF
1674
1675
1676cat >>confdefs.h <<_ACEOF
1677#define PACKAGE_VERSION "$PACKAGE_VERSION"
1678_ACEOF
1679
1680
1681cat >>confdefs.h <<_ACEOF
1682#define PACKAGE_STRING "$PACKAGE_STRING"
1683_ACEOF
1684
1685
1686cat >>confdefs.h <<_ACEOF
1687#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1688_ACEOF
1689
1690
1691# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001692# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001693if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001694 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001695elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001696 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001697else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001698 set x "$ac_default_prefix/share/config.site" \
1699 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001700fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001701shift
1702for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001703do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001705 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1706echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001707 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708 . "$ac_site_file"
1709 fi
1710done
1711
1712if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001713 # Some versions of bash will fail to source /dev/null (special
1714 # files actually), so we avoid doing that.
1715 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001716 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1717echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001718 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001719 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1720 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001721 esac
1722 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001723else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001724 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1725echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001726 >$cache_file
1727fi
1728
1729# Check that the precious variables saved in the cache have kept the same
1730# value.
1731ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001732for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001733 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1734 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001735 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1736 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001737 case $ac_old_set,$ac_new_set in
1738 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001739 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1740echo "$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 +00001741 ac_cache_corrupted=: ;;
1742 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001743 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1744echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001745 ac_cache_corrupted=: ;;
1746 ,);;
1747 *)
1748 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001749 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1750echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1751 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1752echo "$as_me: former value: $ac_old_val" >&2;}
1753 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1754echo "$as_me: current value: $ac_new_val" >&2;}
1755 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001756 fi;;
1757 esac
1758 # Pass precious variables to config.status.
1759 if test "$ac_new_set" = set; then
1760 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001761 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001762 *) ac_arg=$ac_var=$ac_new_val ;;
1763 esac
1764 case " $ac_configure_args " in
1765 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1766 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1767 esac
1768 fi
1769done
1770if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001771 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1772echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1773 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1774echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001775 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001776fi
1777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
Guido van Rossum7f43da71994-08-01 12:15:30 +00001802ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001803ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001804ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1805ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1806ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001807
Guido van Rossum627b2d71993-12-24 10:39:16 +00001808
Michael W. Hudson54241132001-12-07 15:38:26 +00001809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001810ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001811
1812
Martin v. Löwis11437992002-04-12 09:54:03 +00001813
Benjamin Petersond23f8222009-04-05 19:13:16 +00001814if test "$prefix" != "/"; then
1815 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1816fi
1817
1818
Martin v. Löwis11437992002-04-12 09:54:03 +00001819
1820
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001821
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001822
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001823# We don't use PACKAGE_ variables, and they cause conflicts
1824# with other autoconf-based packages that include Python.h
1825grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1826rm confdefs.h
1827mv confdefs.h.new confdefs.h
1828
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001829
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001830VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001831
Martin v. Löwis1142de32002-03-29 16:28:31 +00001832
1833SOVERSION=1.0
1834
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001835# The later defininition of _XOPEN_SOURCE disables certain features
1836# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1837
1838cat >>confdefs.h <<\_ACEOF
1839#define _GNU_SOURCE 1
1840_ACEOF
1841
1842
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001843# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1844# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1845# them.
1846
1847cat >>confdefs.h <<\_ACEOF
1848#define _NETBSD_SOURCE 1
1849_ACEOF
1850
1851
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001852# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1853# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1854# them.
1855
1856cat >>confdefs.h <<\_ACEOF
1857#define __BSD_VISIBLE 1
1858_ACEOF
1859
1860
Martin v. Löwisd6320502004-08-12 13:45:08 +00001861# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1862# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1863
1864cat >>confdefs.h <<\_ACEOF
1865#define _BSD_TYPES 1
1866_ACEOF
1867
1868
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001869# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1870# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1871# them.
1872
1873cat >>confdefs.h <<\_ACEOF
1874#define _DARWIN_C_SOURCE 1
1875_ACEOF
1876
1877
1878
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001879define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001880
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001881# Arguments passed to configure.
1882
1883CONFIG_ARGS="$ac_configure_args"
1884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001885# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001886if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001887 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001888 case $enableval in
1889 yes)
1890 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1891 ;;
1892 esac
1893 case $enableval in
1894 no)
1895 UNIVERSALSDK=
1896 enable_universalsdk=
1897 ;;
1898 *)
1899 UNIVERSALSDK=$enableval
1900 ;;
1901 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001902
Thomas Wouters477c8d52006-05-27 19:21:47 +00001903else
1904
1905 UNIVERSALSDK=
1906 enable_universalsdk=
1907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001908fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001909
1910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001911
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001912
1913
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001914UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00001915
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001916{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1917echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001918
1919# Check whether --with-universal-archs was given.
1920if test "${with_universal_archs+set}" = set; then
1921 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001922 { echo "$as_me:$LINENO: result: $withval" >&5
1923echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001924 UNIVERSAL_ARCHS="$withval"
1925
1926else
1927
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001928 { echo "$as_me:$LINENO: result: 32-bit" >&5
1929echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001930
1931fi
1932
1933
1934
1935
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001936
1937# Check whether --with-framework-name was given.
1938if test "${with_framework_name+set}" = set; then
1939 withval=$with_framework_name;
1940 PYTHONFRAMEWORK=${withval}
1941 PYTHONFRAMEWORKDIR=${withval}.framework
1942 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1943
1944else
1945
1946 PYTHONFRAMEWORK=Python
1947 PYTHONFRAMEWORKDIR=Python.framework
1948 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1949
1950fi
1951
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001952# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001953if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001954 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001955 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001956 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001957 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001958 esac
1959 case $enableval in
1960 no)
1961 PYTHONFRAMEWORK=
1962 PYTHONFRAMEWORKDIR=no-framework
1963 PYTHONFRAMEWORKPREFIX=
1964 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001965 FRAMEWORKINSTALLFIRST=
1966 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001967 FRAMEWORKALTINSTALLFIRST=
1968 FRAMEWORKALTINSTALLLAST=
1969 if test "x${prefix}" = "xNONE"; then
1970 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1971 else
1972 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1973 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001974 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001975 ;;
1976 *)
1977 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001978 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001979 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001980 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00001981 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
1982 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001983
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001984 if test "x${prefix}" = "xNONE" ; then
1985 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1986 else
1987 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1988 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001989 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001990
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001991 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00001992 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001993 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001994
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001995 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001996
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001997 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
1998
1999 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2000
Jack Jansene578a632001-08-15 01:27:14 +00002001 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002002
Guido van Rossum563e7081996-09-10 18:20:48 +00002003else
Martin v. Löwis11437992002-04-12 09:54:03 +00002004
Jack Jansene578a632001-08-15 01:27:14 +00002005 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002006 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002007 PYTHONFRAMEWORKPREFIX=
2008 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002009 FRAMEWORKINSTALLFIRST=
2010 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002011 FRAMEWORKALTINSTALLFIRST=
2012 FRAMEWORKALTINSTALLLAST=
2013 if test "x${prefix}" = "xNONE" ; then
2014 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2015 else
2016 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2017 fi
Jack Jansene578a632001-08-15 01:27:14 +00002018 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002019
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002021fi
2022
Thomas Wouters477c8d52006-05-27 19:21:47 +00002023
2024
Michael W. Hudson54241132001-12-07 15:38:26 +00002025
2026
2027
2028
Jack Jansene578a632001-08-15 01:27:14 +00002029
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002030
2031
2032
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002033
Jack Jansene578a632001-08-15 01:27:14 +00002034##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002035## AC_HELP_STRING(--with-dyld,
2036## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002037##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002038# Set name for machine-dependent library files
2039
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002040{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2041echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002042if test -z "$MACHDEP"
2043then
Guido van Rossum563e7081996-09-10 18:20:48 +00002044 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002045 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002046 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002047 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002048 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002049 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002050 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002051 ac_md_system=`echo $ac_sys_system |
2052 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2053 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002054 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002055 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002056
Guido van Rossum07397971997-04-29 21:49:50 +00002057 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002058 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002059 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002060 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002061 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002062 esac
2063fi
Guido van Rossum91922671997-10-09 20:24:13 +00002064
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002065# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2066# disable features if it is defined, without any means to access these
2067# features as extensions. For these systems, we skip the definition of
2068# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2069# some feature, make sure there is no alternative way to access this
2070# feature. Also, when using wildcards, make sure you have verified the
2071# need for not defining _XOPEN_SOURCE on all systems matching the
2072# wildcard, and that the wildcard does not include future systems
2073# (which may remove their limitations).
2074case $ac_sys_system/$ac_sys_release in
2075 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2076 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002077 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002078 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002079 define_xopen_source=no
2080 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2081 # also defined. This can be overridden by defining _BSD_SOURCE
2082 # As this has a different meaning on Linux, only define it on OpenBSD
2083
2084cat >>confdefs.h <<\_ACEOF
2085#define _BSD_SOURCE 1
2086_ACEOF
2087
2088 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002089 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2090 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2091 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002092 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 +00002093 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002094 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2095 # of union __?sigval. Reported by Stuart Bishop.
2096 SunOS/5.6)
2097 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002098 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2099 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002100 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002101 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002102 define_xopen_source=no;;
2103 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002104 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002105 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002106 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002107 # On FreeBSD 4, the math functions C89 does not cover are never defined
2108 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2109 FreeBSD/4.*)
2110 define_xopen_source=no;;
2111 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2112 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2113 # identifies itself as Darwin/7.*
2114 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2115 # disables platform specific features beyond repair.
2116 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2117 # has no effect, don't bother defining them
2118 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002119 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002120 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2121 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2122 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002123 AIX/4)
2124 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002125 AIX/5)
2126 if test `uname -r` -eq 1; then
2127 define_xopen_source=no
2128 fi
2129 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002130 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2131 # defining NI_NUMERICHOST.
2132 QNX/6.3.2)
2133 define_xopen_source=no
2134 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002135
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002136esac
2137
2138if test $define_xopen_source = yes
2139then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002140 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2141 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002142 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2143 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002144 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002145 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002146
2147cat >>confdefs.h <<\_ACEOF
2148#define _XOPEN_SOURCE 500
2149_ACEOF
2150
2151 ;;
2152 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002153
2154cat >>confdefs.h <<\_ACEOF
2155#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002156_ACEOF
2157
Skip Montanarof0d5f792004-08-15 14:08:23 +00002158 ;;
2159 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002160
2161 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2162 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2163 # several APIs are not declared. Since this is also needed in some
2164 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002165 # except for Solaris 10, where it must not be defined,
2166 # as it implies XPG4.2
2167 case $ac_sys_system/$ac_sys_release in
2168 SunOS/5.10)
2169 ;;
2170 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002171
2172cat >>confdefs.h <<\_ACEOF
2173#define _XOPEN_SOURCE_EXTENDED 1
2174_ACEOF
2175
Martin v. Löwis7dece662005-11-26 11:38:24 +00002176 ;;
2177 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002178
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002179
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002180cat >>confdefs.h <<\_ACEOF
2181#define _POSIX_C_SOURCE 200112L
2182_ACEOF
2183
2184
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002185fi
2186
Guido van Rossum91922671997-10-09 20:24:13 +00002187#
2188# SGI compilers allow the specification of the both the ABI and the
2189# ISA on the command line. Depending on the values of these switches,
2190# different and often incompatable code will be generated.
2191#
2192# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2193# thus supply support for various ABI/ISA combinations. The MACHDEP
2194# variable is also adjusted.
2195#
2196
2197if test ! -z "$SGI_ABI"
2198then
2199 CC="cc $SGI_ABI"
2200 LDFLAGS="$SGI_ABI $LDFLAGS"
2201 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2202fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002203{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2204echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002205
Jack Jansen6b08a402004-06-03 12:41:45 +00002206# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2207# it may influence the way we can build extensions, so distutils
2208# needs to check it
2209
Thomas Wouters477c8d52006-05-27 19:21:47 +00002210
Jack Jansen6b08a402004-06-03 12:41:45 +00002211CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002212EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002213
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002214{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2215echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002216ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002217{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2218echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002219
Guido van Rossum627b2d71993-12-24 10:39:16 +00002220# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002221
2222# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2223# for debug/optimization stuff. BASECFLAGS is for flags that are required
2224# just to get things to compile and link. Users are free to override OPT
2225# when running configure or make. The build should not break if they do.
2226# BASECFLAGS should generally not be messed with, however.
2227
2228# XXX shouldn't some/most/all of this code be merged with the stuff later
2229# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002230{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2231echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002233# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002234if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002235 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002236 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002237 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002238 without_gcc=yes;;
2239 yes) CC=gcc
2240 without_gcc=no;;
2241 *) CC=$withval
2242 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002243 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002244else
Martin v. Löwis11437992002-04-12 09:54:03 +00002245
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002246 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002247 AIX*) CC=cc_r
2248 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002249 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002250 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002251fi
2252
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002253{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2254echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002255
Guido van Rossum8b131c51995-03-09 14:10:13 +00002256# If the user switches compilers, we can't believe the cache
2257if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2258then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002259 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002260(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002261echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002262(it is also a good idea to do 'make clean' before compiling)" >&2;}
2263 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002264fi
2265
Martin v. Löwis11437992002-04-12 09:54:03 +00002266ac_ext=c
2267ac_cpp='$CPP $CPPFLAGS'
2268ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2269ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2270ac_compiler_gnu=$ac_cv_c_compiler_gnu
2271if test -n "$ac_tool_prefix"; then
2272 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2273set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002274{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2275echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002276if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002277 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002278else
2279 if test -n "$CC"; then
2280 ac_cv_prog_CC="$CC" # Let the user override the test.
2281else
Martin v. Löwis11437992002-04-12 09:54:03 +00002282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2283for as_dir in $PATH
2284do
2285 IFS=$as_save_IFS
2286 test -z "$as_dir" && as_dir=.
2287 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002288 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 +00002289 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002290 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002291 break 2
2292 fi
2293done
2294done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002295IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002296
Jack Jansendd19cf82001-12-06 22:36:17 +00002297fi
2298fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002299CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002300if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002301 { echo "$as_me:$LINENO: result: $CC" >&5
2302echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002303else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002304 { echo "$as_me:$LINENO: result: no" >&5
2305echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002306fi
2307
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002308
Martin v. Löwis11437992002-04-12 09:54:03 +00002309fi
2310if test -z "$ac_cv_prog_CC"; then
2311 ac_ct_CC=$CC
2312 # Extract the first word of "gcc", so it can be a program name with args.
2313set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002314{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2315echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002316if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002317 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002318else
2319 if test -n "$ac_ct_CC"; then
2320 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2321else
2322as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2323for as_dir in $PATH
2324do
2325 IFS=$as_save_IFS
2326 test -z "$as_dir" && as_dir=.
2327 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002328 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 +00002329 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002330 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002331 break 2
2332 fi
2333done
2334done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002335IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002336
2337fi
2338fi
2339ac_ct_CC=$ac_cv_prog_ac_ct_CC
2340if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002341 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2342echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002343else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002344 { echo "$as_me:$LINENO: result: no" >&5
2345echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002346fi
2347
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002348 if test "x$ac_ct_CC" = x; then
2349 CC=""
2350 else
2351 case $cross_compiling:$ac_tool_warned in
2352yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002353{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2354whose name does not start with the host triplet. If you think this
2355configuration is useful to you, please write to autoconf@gnu.org." >&5
2356echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2357whose name does not start with the host triplet. If you think this
2358configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002359ac_tool_warned=yes ;;
2360esac
2361 CC=$ac_ct_CC
2362 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002363else
2364 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002365fi
2366
Jack Jansendd19cf82001-12-06 22:36:17 +00002367if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002368 if test -n "$ac_tool_prefix"; then
2369 # 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 +00002370set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002371{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2372echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002373if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002374 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002375else
2376 if test -n "$CC"; then
2377 ac_cv_prog_CC="$CC" # Let the user override the test.
2378else
Martin v. Löwis11437992002-04-12 09:54:03 +00002379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2380for as_dir in $PATH
2381do
2382 IFS=$as_save_IFS
2383 test -z "$as_dir" && as_dir=.
2384 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002385 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 +00002386 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002387 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002388 break 2
2389 fi
2390done
2391done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002392IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002393
2394fi
2395fi
2396CC=$ac_cv_prog_CC
2397if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002398 { echo "$as_me:$LINENO: result: $CC" >&5
2399echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002400else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002401 { echo "$as_me:$LINENO: result: no" >&5
2402echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002403fi
2404
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002405
Martin v. Löwis11437992002-04-12 09:54:03 +00002406 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002407fi
2408if test -z "$CC"; then
2409 # Extract the first word of "cc", so it can be a program name with args.
2410set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002411{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2412echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002413if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002414 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002415else
2416 if test -n "$CC"; then
2417 ac_cv_prog_CC="$CC" # Let the user override the test.
2418else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002419 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2421for as_dir in $PATH
2422do
2423 IFS=$as_save_IFS
2424 test -z "$as_dir" && as_dir=.
2425 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002426 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002427 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2428 ac_prog_rejected=yes
2429 continue
2430 fi
2431 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002432 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002433 break 2
2434 fi
2435done
2436done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002437IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002438
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002439if test $ac_prog_rejected = yes; then
2440 # We found a bogon in the path, so make sure we never use it.
2441 set dummy $ac_cv_prog_CC
2442 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002443 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002444 # We chose a different compiler from the bogus one.
2445 # However, it has the same basename, so the bogon will be chosen
2446 # first if we set CC to just the basename; use the full file name.
2447 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002448 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002449 fi
2450fi
2451fi
2452fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002453CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002454if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002455 { echo "$as_me:$LINENO: result: $CC" >&5
2456echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002457else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002458 { echo "$as_me:$LINENO: result: no" >&5
2459echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002460fi
2461
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462
Martin v. Löwis11437992002-04-12 09:54:03 +00002463fi
2464if test -z "$CC"; then
2465 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 do
2468 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2469set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002470{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2471echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002472if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002473 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002474else
2475 if test -n "$CC"; then
2476 ac_cv_prog_CC="$CC" # Let the user override the test.
2477else
Martin v. Löwis11437992002-04-12 09:54:03 +00002478as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2479for as_dir in $PATH
2480do
2481 IFS=$as_save_IFS
2482 test -z "$as_dir" && as_dir=.
2483 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 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 +00002485 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002486 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002488 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002489done
2490done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002492
2493fi
2494fi
2495CC=$ac_cv_prog_CC
2496if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002497 { echo "$as_me:$LINENO: result: $CC" >&5
2498echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002499else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002500 { echo "$as_me:$LINENO: result: no" >&5
2501echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002502fi
2503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504
Martin v. Löwis11437992002-04-12 09:54:03 +00002505 test -n "$CC" && break
2506 done
2507fi
2508if test -z "$CC"; then
2509 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002511do
2512 # Extract the first word of "$ac_prog", so it can be a program name with args.
2513set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002514{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2515echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002516if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002517 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002518else
2519 if test -n "$ac_ct_CC"; then
2520 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2521else
2522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2523for as_dir in $PATH
2524do
2525 IFS=$as_save_IFS
2526 test -z "$as_dir" && as_dir=.
2527 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 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 +00002529 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002530 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 break 2
2532 fi
2533done
2534done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002536
Martin v. Löwis11437992002-04-12 09:54:03 +00002537fi
2538fi
2539ac_ct_CC=$ac_cv_prog_ac_ct_CC
2540if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002541 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2542echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002543else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002544 { echo "$as_me:$LINENO: result: no" >&5
2545echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002546fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002547
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 test -n "$ac_ct_CC" && break
2550done
Michael W. Hudson54241132001-12-07 15:38:26 +00002551
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552 if test "x$ac_ct_CC" = x; then
2553 CC=""
2554 else
2555 case $cross_compiling:$ac_tool_warned in
2556yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002557{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2558whose name does not start with the host triplet. If you think this
2559configuration is useful to you, please write to autoconf@gnu.org." >&5
2560echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2561whose name does not start with the host triplet. If you think this
2562configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563ac_tool_warned=yes ;;
2564esac
2565 CC=$ac_ct_CC
2566 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002567fi
2568
2569fi
2570
2571
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002572test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002573See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002574echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002575See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002576 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002577
2578# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002579echo "$as_me:$LINENO: checking for C compiler version" >&5
2580ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581{ (ac_try="$ac_compiler --version >&5"
2582case "(($ac_try" in
2583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2584 *) ac_try_echo=$ac_try;;
2585esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002590 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591{ (ac_try="$ac_compiler -v >&5"
2592case "(($ac_try" in
2593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2594 *) ac_try_echo=$ac_try;;
2595esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601{ (ac_try="$ac_compiler -V >&5"
2602case "(($ac_try" in
2603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2604 *) ac_try_echo=$ac_try;;
2605esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 (exit $ac_status); }
2611
2612cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002613/* confdefs.h. */
2614_ACEOF
2615cat confdefs.h >>conftest.$ac_ext
2616cat >>conftest.$ac_ext <<_ACEOF
2617/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002618
Martin v. Löwis11437992002-04-12 09:54:03 +00002619int
2620main ()
2621{
2622
2623 ;
2624 return 0;
2625}
2626_ACEOF
2627ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002628ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002629# Try to create an executable without -o first, disregard a.out.
2630# It will help us diagnose broken compilers, and finding out an intuition
2631# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002632{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2633echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2634ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2635#
2636# List of possible output files, starting from the most likely.
2637# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2638# only as a last resort. b.out is created by i960 compilers.
2639ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2640#
2641# The IRIX 6 linker writes into existing files which may not be
2642# executable, retaining their permissions. Remove them first so a
2643# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644ac_rmfiles=
2645for ac_file in $ac_files
2646do
2647 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002648 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002649 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2650 esac
2651done
2652rm -f $ac_rmfiles
2653
2654if { (ac_try="$ac_link_default"
2655case "(($ac_try" in
2656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2657 *) ac_try_echo=$ac_try;;
2658esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002660 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002664 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2665# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2666# in a Makefile. We should not override ac_cv_exeext if it was cached,
2667# so that the user can short-circuit this test for compilers unknown to
2668# Autoconf.
2669for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002670do
2671 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 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 Wouters1ba5b3b2006-06-08 14:52:47 +00002674 ;;
2675 [ab].out )
2676 # We found the default executable, but exeext='' is most
2677 # certainly right.
2678 break;;
2679 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002680 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2681 then :; else
2682 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2683 fi
2684 # We set ac_cv_exeext here because the later test for it is not
2685 # safe: cross compilers may not add the suffix if given an `-o'
2686 # argument, so we may need to know it at that point already.
2687 # Even if this section looks crufty: it has the advantage of
2688 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002689 break;;
2690 * )
2691 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002692 esac
2693done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002694test "$ac_cv_exeext" = no && ac_cv_exeext=
2695
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002696else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002697 ac_file=''
2698fi
2699
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002700{ echo "$as_me:$LINENO: result: $ac_file" >&5
2701echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002702if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002703 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002704sed 's/^/| /' conftest.$ac_ext >&5
2705
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002706{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002707See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002708echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002709See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002710 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002711fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002712
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002713ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002715# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002716# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002717{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2718echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002719# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2720# If not cross compiling, check that we can run a simple program.
2721if test "$cross_compiling" != yes; then
2722 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002723 { (case "(($ac_try" in
2724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2725 *) ac_try_echo=$ac_try;;
2726esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002728 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 (exit $ac_status); }; }; then
2732 cross_compiling=no
2733 else
2734 if test "$cross_compiling" = maybe; then
2735 cross_compiling=yes
2736 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002737 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002738If you meant to cross compile, use \`--host'.
2739See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002740echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002741If you meant to cross compile, use \`--host'.
2742See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002743 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002744 fi
2745 fi
2746fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002747{ echo "$as_me:$LINENO: result: yes" >&5
2748echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002749
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002750rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002751ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002752# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002753# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002754{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2755echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2756{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2757echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002758
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002759{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2760echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002761if { (ac_try="$ac_link"
2762case "(($ac_try" in
2763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2764 *) ac_try_echo=$ac_try;;
2765esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002767 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002768 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002770 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002771 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2772# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2773# work properly (i.e., refer to `conftest.exe'), while it won't with
2774# `rm'.
2775for ac_file in conftest.exe conftest conftest.*; do
2776 test -f "$ac_file" || continue
2777 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002778 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002779 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2780 break;;
2781 * ) break;;
2782 esac
2783done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002784else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002785 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002786See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002787echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002788See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002789 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002790fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002791
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002792rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002793{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2794echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002795
2796rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002797EXEEXT=$ac_cv_exeext
2798ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002799{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2800echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002801if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002802 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002803else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002804 cat >conftest.$ac_ext <<_ACEOF
2805/* confdefs.h. */
2806_ACEOF
2807cat confdefs.h >>conftest.$ac_ext
2808cat >>conftest.$ac_ext <<_ACEOF
2809/* end confdefs.h. */
2810
2811int
2812main ()
2813{
2814
2815 ;
2816 return 0;
2817}
2818_ACEOF
2819rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002820if { (ac_try="$ac_compile"
2821case "(($ac_try" in
2822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2823 *) ac_try_echo=$ac_try;;
2824esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002826 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002827 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002829 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002830 for ac_file in conftest.o conftest.obj conftest.*; do
2831 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002832 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002833 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002834 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2835 break;;
2836 esac
2837done
2838else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002840sed 's/^/| /' conftest.$ac_ext >&5
2841
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002842{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002843See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002844echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002845See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002846 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002847fi
2848
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002849rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002850fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002851{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2852echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002853OBJEXT=$ac_cv_objext
2854ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002855{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2856echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002857if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002858 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002859else
2860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002861/* confdefs.h. */
2862_ACEOF
2863cat confdefs.h >>conftest.$ac_ext
2864cat >>conftest.$ac_ext <<_ACEOF
2865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002866
Martin v. Löwis11437992002-04-12 09:54:03 +00002867int
2868main ()
2869{
2870#ifndef __GNUC__
2871 choke me
2872#endif
2873
2874 ;
2875 return 0;
2876}
2877_ACEOF
2878rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002879if { (ac_try="$ac_compile"
2880case "(($ac_try" in
2881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2882 *) ac_try_echo=$ac_try;;
2883esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002885 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002886 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002887 grep -v '^ *+' conftest.er1 >conftest.err
2888 rm -f conftest.er1
2889 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002891 (exit $ac_status); } && {
2892 test -z "$ac_c_werror_flag" ||
2893 test ! -s conftest.err
2894 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002895 ac_compiler_gnu=yes
2896else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002898sed 's/^/| /' conftest.$ac_ext >&5
2899
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002900 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002902
2903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002904ac_cv_c_compiler_gnu=$ac_compiler_gnu
2905
2906fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002907{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2908echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2909GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002910ac_test_CFLAGS=${CFLAGS+set}
2911ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002912{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2913echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002914if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002915 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002916else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002917 ac_save_c_werror_flag=$ac_c_werror_flag
2918 ac_c_werror_flag=yes
2919 ac_cv_prog_cc_g=no
2920 CFLAGS="-g"
2921 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002922/* confdefs.h. */
2923_ACEOF
2924cat confdefs.h >>conftest.$ac_ext
2925cat >>conftest.$ac_ext <<_ACEOF
2926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002927
Martin v. Löwis11437992002-04-12 09:54:03 +00002928int
2929main ()
2930{
2931
2932 ;
2933 return 0;
2934}
2935_ACEOF
2936rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002937if { (ac_try="$ac_compile"
2938case "(($ac_try" in
2939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2940 *) ac_try_echo=$ac_try;;
2941esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002943 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002944 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002945 grep -v '^ *+' conftest.er1 >conftest.err
2946 rm -f conftest.er1
2947 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002949 (exit $ac_status); } && {
2950 test -z "$ac_c_werror_flag" ||
2951 test ! -s conftest.err
2952 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002953 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002954else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002956sed 's/^/| /' conftest.$ac_ext >&5
2957
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002958 CFLAGS=""
2959 cat >conftest.$ac_ext <<_ACEOF
2960/* confdefs.h. */
2961_ACEOF
2962cat confdefs.h >>conftest.$ac_ext
2963cat >>conftest.$ac_ext <<_ACEOF
2964/* end confdefs.h. */
2965
2966int
2967main ()
2968{
2969
2970 ;
2971 return 0;
2972}
2973_ACEOF
2974rm -f conftest.$ac_objext
2975if { (ac_try="$ac_compile"
2976case "(($ac_try" in
2977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2978 *) ac_try_echo=$ac_try;;
2979esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002981 (eval "$ac_compile") 2>conftest.er1
2982 ac_status=$?
2983 grep -v '^ *+' conftest.er1 >conftest.err
2984 rm -f conftest.er1
2985 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002987 (exit $ac_status); } && {
2988 test -z "$ac_c_werror_flag" ||
2989 test ! -s conftest.err
2990 } && test -s conftest.$ac_objext; then
2991 :
2992else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002993 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002994sed 's/^/| /' conftest.$ac_ext >&5
2995
2996 ac_c_werror_flag=$ac_save_c_werror_flag
2997 CFLAGS="-g"
2998 cat >conftest.$ac_ext <<_ACEOF
2999/* confdefs.h. */
3000_ACEOF
3001cat confdefs.h >>conftest.$ac_ext
3002cat >>conftest.$ac_ext <<_ACEOF
3003/* end confdefs.h. */
3004
3005int
3006main ()
3007{
3008
3009 ;
3010 return 0;
3011}
3012_ACEOF
3013rm -f conftest.$ac_objext
3014if { (ac_try="$ac_compile"
3015case "(($ac_try" in
3016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3017 *) ac_try_echo=$ac_try;;
3018esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003020 (eval "$ac_compile") 2>conftest.er1
3021 ac_status=$?
3022 grep -v '^ *+' conftest.er1 >conftest.err
3023 rm -f conftest.er1
3024 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003026 (exit $ac_status); } && {
3027 test -z "$ac_c_werror_flag" ||
3028 test ! -s conftest.err
3029 } && test -s conftest.$ac_objext; then
3030 ac_cv_prog_cc_g=yes
3031else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003032 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003033sed 's/^/| /' conftest.$ac_ext >&5
3034
3035
Guido van Rossum627b2d71993-12-24 10:39:16 +00003036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003037
3038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003040
3041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3042fi
3043
3044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3045 ac_c_werror_flag=$ac_save_c_werror_flag
3046fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003047{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3048echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003049if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003050 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003051elif test $ac_cv_prog_cc_g = yes; then
3052 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003053 CFLAGS="-g -O2"
3054 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003055 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003056 fi
3057else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003058 if test "$GCC" = yes; then
3059 CFLAGS="-O2"
3060 else
3061 CFLAGS=
3062 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003063fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003064{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3065echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003066if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003067 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003068else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003069 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003070ac_save_CC=$CC
3071cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003072/* confdefs.h. */
3073_ACEOF
3074cat confdefs.h >>conftest.$ac_ext
3075cat >>conftest.$ac_ext <<_ACEOF
3076/* end confdefs.h. */
3077#include <stdarg.h>
3078#include <stdio.h>
3079#include <sys/types.h>
3080#include <sys/stat.h>
3081/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3082struct buf { int x; };
3083FILE * (*rcsopen) (struct buf *, struct stat *, int);
3084static char *e (p, i)
3085 char **p;
3086 int i;
3087{
3088 return p[i];
3089}
3090static char *f (char * (*g) (char **, int), char **p, ...)
3091{
3092 char *s;
3093 va_list v;
3094 va_start (v,p);
3095 s = g (p, va_arg (v,int));
3096 va_end (v);
3097 return s;
3098}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003099
3100/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3101 function prototypes and stuff, but not '\xHH' hex character constants.
3102 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003103 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003104 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3105 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003106 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003107int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3108
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003109/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3110 inside strings and character constants. */
3111#define FOO(x) 'x'
3112int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3113
Skip Montanaro6dead952003-09-25 14:50:04 +00003114int test (int i, double x);
3115struct s1 {int (*f) (int a);};
3116struct s2 {int (*f) (double a);};
3117int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3118int argc;
3119char **argv;
3120int
3121main ()
3122{
3123return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3124 ;
3125 return 0;
3126}
3127_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003128for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3129 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003130do
3131 CC="$ac_save_CC $ac_arg"
3132 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003133if { (ac_try="$ac_compile"
3134case "(($ac_try" in
3135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3136 *) ac_try_echo=$ac_try;;
3137esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003139 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003140 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003141 grep -v '^ *+' conftest.er1 >conftest.err
3142 rm -f conftest.er1
3143 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003145 (exit $ac_status); } && {
3146 test -z "$ac_c_werror_flag" ||
3147 test ! -s conftest.err
3148 } && test -s conftest.$ac_objext; then
3149 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003150else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003152sed 's/^/| /' conftest.$ac_ext >&5
3153
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003154
Skip Montanaro6dead952003-09-25 14:50:04 +00003155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003156
3157rm -f core conftest.err conftest.$ac_objext
3158 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003159done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003160rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003161CC=$ac_save_CC
3162
3163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164# AC_CACHE_VAL
3165case "x$ac_cv_prog_cc_c89" in
3166 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003167 { echo "$as_me:$LINENO: result: none needed" >&5
3168echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003169 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003170 { echo "$as_me:$LINENO: result: unsupported" >&5
3171echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003172 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003173 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003174 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3175echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003176esac
3177
Skip Montanaro6dead952003-09-25 14:50:04 +00003178
Martin v. Löwis11437992002-04-12 09:54:03 +00003179ac_ext=c
3180ac_cpp='$CPP $CPPFLAGS'
3181ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3182ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3183ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003184
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003185
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003186
3187
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003188{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3189echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003190
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003191# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003192if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003193 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003194
3195 case $withval in
3196 no) with_cxx_main=no
3197 MAINCC='$(CC)';;
3198 yes) with_cxx_main=yes
3199 MAINCC='$(CXX)';;
3200 *) with_cxx_main=yes
3201 MAINCC=$withval
3202 if test -z "$CXX"
3203 then
3204 CXX=$withval
3205 fi;;
3206 esac
3207else
3208
3209 with_cxx_main=no
3210 MAINCC='$(CC)'
3211
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003212fi
3213
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003214{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3215echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003216
3217preset_cxx="$CXX"
3218if test -z "$CXX"
3219then
3220 case "$CC" in
3221 gcc) # Extract the first word of "g++", so it can be a program name with args.
3222set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003223{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3224echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003225if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003226 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003227else
3228 case $CXX in
3229 [\\/]* | ?:[\\/]*)
3230 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3231 ;;
3232 *)
3233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3234for as_dir in notfound
3235do
3236 IFS=$as_save_IFS
3237 test -z "$as_dir" && as_dir=.
3238 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003239 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 +00003240 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003241 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003242 break 2
3243 fi
3244done
3245done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003246IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003247
3248 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3249 ;;
3250esac
3251fi
3252CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003253if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003254 { echo "$as_me:$LINENO: result: $CXX" >&5
3255echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003256else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003257 { echo "$as_me:$LINENO: result: no" >&5
3258echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003260
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003261 ;;
3262 cc) # Extract the first word of "c++", so it can be a program name with args.
3263set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003264{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3265echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003266if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003267 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003268else
3269 case $CXX in
3270 [\\/]* | ?:[\\/]*)
3271 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3272 ;;
3273 *)
3274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3275for as_dir in notfound
3276do
3277 IFS=$as_save_IFS
3278 test -z "$as_dir" && as_dir=.
3279 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003280 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 +00003281 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003282 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003283 break 2
3284 fi
3285done
3286done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003287IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003288
3289 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3290 ;;
3291esac
3292fi
3293CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003294if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003295 { echo "$as_me:$LINENO: result: $CXX" >&5
3296echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003297else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003298 { echo "$as_me:$LINENO: result: no" >&5
3299echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003301
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003302 ;;
3303 esac
3304 if test "$CXX" = "notfound"
3305 then
3306 CXX=""
3307 fi
3308fi
3309if test -z "$CXX"
3310then
3311 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3312do
3313 # Extract the first word of "$ac_prog", so it can be a program name with args.
3314set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003315{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3316echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003317if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003318 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003319else
3320 if test -n "$CXX"; then
3321 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3322else
3323as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3324for as_dir in $PATH
3325do
3326 IFS=$as_save_IFS
3327 test -z "$as_dir" && as_dir=.
3328 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003329 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 +00003330 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003331 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003332 break 2
3333 fi
3334done
3335done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003336IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003337
3338fi
3339fi
3340CXX=$ac_cv_prog_CXX
3341if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003342 { echo "$as_me:$LINENO: result: $CXX" >&5
3343echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003344else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003345 { echo "$as_me:$LINENO: result: no" >&5
3346echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003347fi
3348
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003349
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003350 test -n "$CXX" && break
3351done
3352test -n "$CXX" || CXX="notfound"
3353
3354 if test "$CXX" = "notfound"
3355 then
3356 CXX=""
3357 fi
3358fi
3359if test "$preset_cxx" != "$CXX"
3360then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003361 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003362
3363 By default, distutils will build C++ extension modules with \"$CXX\".
3364 If this is not intended, then set CXX on the configure command line.
3365 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003366echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003367
3368 By default, distutils will build C++ extension modules with \"$CXX\".
3369 If this is not intended, then set CXX on the configure command line.
3370 " >&2;}
3371fi
3372
3373
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003374# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003375
3376ac_ext=c
3377ac_cpp='$CPP $CPPFLAGS'
3378ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3379ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3380ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003381{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3382echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003383# On Suns, sometimes $CPP names a directory.
3384if test -n "$CPP" && test -d "$CPP"; then
3385 CPP=
3386fi
3387if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003388 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003389 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003390else
Martin v. Löwis11437992002-04-12 09:54:03 +00003391 # Double quotes because CPP needs to be expanded
3392 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3393 do
3394 ac_preproc_ok=false
3395for ac_c_preproc_warn_flag in '' yes
3396do
3397 # Use a header file that comes with gcc, so configuring glibc
3398 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003399 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3400 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003401 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003402 # not just through cpp. "Syntax error" is here to catch this case.
3403 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003404/* confdefs.h. */
3405_ACEOF
3406cat confdefs.h >>conftest.$ac_ext
3407cat >>conftest.$ac_ext <<_ACEOF
3408/* end confdefs.h. */
3409#ifdef __STDC__
3410# include <limits.h>
3411#else
3412# include <assert.h>
3413#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003414 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003415_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003416if { (ac_try="$ac_cpp conftest.$ac_ext"
3417case "(($ac_try" in
3418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3419 *) ac_try_echo=$ac_try;;
3420esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003422 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003423 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003424 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003425 rm -f conftest.er1
3426 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003428 (exit $ac_status); } >/dev/null && {
3429 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3430 test ! -s conftest.err
3431 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003432 :
3433else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003435sed 's/^/| /' conftest.$ac_ext >&5
3436
Martin v. Löwis11437992002-04-12 09:54:03 +00003437 # Broken: fails on valid input.
3438continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003440
Martin v. Löwis11437992002-04-12 09:54:03 +00003441rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003443 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003444 # can be detected and how.
3445 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003446/* confdefs.h. */
3447_ACEOF
3448cat confdefs.h >>conftest.$ac_ext
3449cat >>conftest.$ac_ext <<_ACEOF
3450/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003451#include <ac_nonexistent.h>
3452_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453if { (ac_try="$ac_cpp conftest.$ac_ext"
3454case "(($ac_try" in
3455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3456 *) ac_try_echo=$ac_try;;
3457esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003459 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003460 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003461 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003462 rm -f conftest.er1
3463 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465 (exit $ac_status); } >/dev/null && {
3466 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3467 test ! -s conftest.err
3468 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003469 # Broken: success on invalid input.
3470continue
3471else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003473sed 's/^/| /' conftest.$ac_ext >&5
3474
Martin v. Löwis11437992002-04-12 09:54:03 +00003475 # Passes both tests.
3476ac_preproc_ok=:
3477break
3478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003479
Martin v. Löwis11437992002-04-12 09:54:03 +00003480rm -f conftest.err conftest.$ac_ext
3481
3482done
3483# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3484rm -f conftest.err conftest.$ac_ext
3485if $ac_preproc_ok; then
3486 break
3487fi
3488
3489 done
3490 ac_cv_prog_CPP=$CPP
3491
3492fi
3493 CPP=$ac_cv_prog_CPP
3494else
3495 ac_cv_prog_CPP=$CPP
3496fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003497{ echo "$as_me:$LINENO: result: $CPP" >&5
3498echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003499ac_preproc_ok=false
3500for ac_c_preproc_warn_flag in '' yes
3501do
3502 # Use a header file that comes with gcc, so configuring glibc
3503 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003504 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3505 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003506 # On the NeXT, cc -E runs the code through the compiler's parser,
3507 # not just through cpp. "Syntax error" is here to catch this case.
3508 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003509/* confdefs.h. */
3510_ACEOF
3511cat confdefs.h >>conftest.$ac_ext
3512cat >>conftest.$ac_ext <<_ACEOF
3513/* end confdefs.h. */
3514#ifdef __STDC__
3515# include <limits.h>
3516#else
3517# include <assert.h>
3518#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003519 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003520_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003521if { (ac_try="$ac_cpp conftest.$ac_ext"
3522case "(($ac_try" in
3523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3524 *) ac_try_echo=$ac_try;;
3525esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003527 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003528 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003529 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003530 rm -f conftest.er1
3531 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003533 (exit $ac_status); } >/dev/null && {
3534 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3535 test ! -s conftest.err
3536 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003537 :
3538else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003539 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003540sed 's/^/| /' conftest.$ac_ext >&5
3541
Martin v. Löwis11437992002-04-12 09:54:03 +00003542 # Broken: fails on valid input.
3543continue
3544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003545
Martin v. Löwis11437992002-04-12 09:54:03 +00003546rm -f conftest.err conftest.$ac_ext
3547
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003548 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003549 # can be detected and how.
3550 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003551/* confdefs.h. */
3552_ACEOF
3553cat confdefs.h >>conftest.$ac_ext
3554cat >>conftest.$ac_ext <<_ACEOF
3555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003556#include <ac_nonexistent.h>
3557_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558if { (ac_try="$ac_cpp conftest.$ac_ext"
3559case "(($ac_try" in
3560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3561 *) ac_try_echo=$ac_try;;
3562esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003564 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003565 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003566 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 rm -f conftest.er1
3568 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003570 (exit $ac_status); } >/dev/null && {
3571 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3572 test ! -s conftest.err
3573 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003574 # Broken: success on invalid input.
3575continue
3576else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003578sed 's/^/| /' conftest.$ac_ext >&5
3579
Martin v. Löwis11437992002-04-12 09:54:03 +00003580 # Passes both tests.
3581ac_preproc_ok=:
3582break
3583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003584
Martin v. Löwis11437992002-04-12 09:54:03 +00003585rm -f conftest.err conftest.$ac_ext
3586
3587done
3588# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3589rm -f conftest.err conftest.$ac_ext
3590if $ac_preproc_ok; then
3591 :
3592else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003593 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003594See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003595echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003596See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003597 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003598fi
3599
3600ac_ext=c
3601ac_cpp='$CPP $CPPFLAGS'
3602ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3603ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3604ac_compiler_gnu=$ac_cv_c_compiler_gnu
3605
3606
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003607{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3608echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003609if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003610 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003611else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003612 # Extract the first word of "grep ggrep" to use in msg output
3613if test -z "$GREP"; then
3614set dummy grep ggrep; ac_prog_name=$2
3615if test "${ac_cv_path_GREP+set}" = set; then
3616 echo $ECHO_N "(cached) $ECHO_C" >&6
3617else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003618 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003619# Loop through the user's path and test for each of PROGNAME-LIST
3620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003621for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3622do
3623 IFS=$as_save_IFS
3624 test -z "$as_dir" && as_dir=.
3625 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003626 for ac_exec_ext in '' $ac_executable_extensions; do
3627 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3628 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3629 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003630 # Check for GNU $ac_path_GREP
3631case `"$ac_path_GREP" --version 2>&1` in
3632*GNU*)
3633 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3634*)
3635 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003636 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003637 while :
3638 do
3639 cat "conftest.in" "conftest.in" >"conftest.tmp"
3640 mv "conftest.tmp" "conftest.in"
3641 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003642 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003643 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3644 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3645 ac_count=`expr $ac_count + 1`
3646 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3647 # Best one so far, save it but keep looking for a better one
3648 ac_cv_path_GREP="$ac_path_GREP"
3649 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003650 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651 # 10*(2^10) chars as input seems more than enough
3652 test $ac_count -gt 10 && break
3653 done
3654 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3655esac
3656
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003657
3658 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659 done
3660done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003661
3662done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003664
3665
3666fi
3667
3668GREP="$ac_cv_path_GREP"
3669if test -z "$GREP"; then
3670 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3671echo "$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 +00003672 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003673fi
3674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003675else
3676 ac_cv_path_GREP=$GREP
3677fi
3678
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003680fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003681{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3682echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003683 GREP="$ac_cv_path_GREP"
3684
3685
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003686{ echo "$as_me:$LINENO: checking for egrep" >&5
3687echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003689 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690else
3691 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3692 then ac_cv_path_EGREP="$GREP -E"
3693 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003694 # Extract the first word of "egrep" to use in msg output
3695if test -z "$EGREP"; then
3696set dummy egrep; ac_prog_name=$2
3697if test "${ac_cv_path_EGREP+set}" = set; then
3698 echo $ECHO_N "(cached) $ECHO_C" >&6
3699else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003700 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003701# Loop through the user's path and test for each of PROGNAME-LIST
3702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003703for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3704do
3705 IFS=$as_save_IFS
3706 test -z "$as_dir" && as_dir=.
3707 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003708 for ac_exec_ext in '' $ac_executable_extensions; do
3709 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3710 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3711 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003712 # Check for GNU $ac_path_EGREP
3713case `"$ac_path_EGREP" --version 2>&1` in
3714*GNU*)
3715 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3716*)
3717 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003718 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003719 while :
3720 do
3721 cat "conftest.in" "conftest.in" >"conftest.tmp"
3722 mv "conftest.tmp" "conftest.in"
3723 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003724 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3726 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3727 ac_count=`expr $ac_count + 1`
3728 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3729 # Best one so far, save it but keep looking for a better one
3730 ac_cv_path_EGREP="$ac_path_EGREP"
3731 ac_path_EGREP_max=$ac_count
3732 fi
3733 # 10*(2^10) chars as input seems more than enough
3734 test $ac_count -gt 10 && break
3735 done
3736 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3737esac
3738
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003739
3740 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741 done
3742done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003743
3744done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003745IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003746
3747
3748fi
3749
3750EGREP="$ac_cv_path_EGREP"
3751if test -z "$EGREP"; then
3752 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3753echo "$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 +00003754 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003755fi
3756
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003757else
3758 ac_cv_path_EGREP=$EGREP
3759fi
3760
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762 fi
3763fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003764{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3765echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003767
3768
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003769
3770{ echo "$as_me:$LINENO: checking for AIX" >&5
3771echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3772cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003773/* confdefs.h. */
3774_ACEOF
3775cat confdefs.h >>conftest.$ac_ext
3776cat >>conftest.$ac_ext <<_ACEOF
3777/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003778#ifdef _AIX
3779 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003780#endif
3781
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003782_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003783if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3784 $EGREP "yes" >/dev/null 2>&1; then
3785 { echo "$as_me:$LINENO: result: yes" >&5
3786echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003787cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003788#define _ALL_SOURCE 1
3789_ACEOF
3790
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003791else
3792 { echo "$as_me:$LINENO: result: no" >&5
3793echo "${ECHO_T}no" >&6; }
3794fi
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003795rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003796
3797
3798
3799# Check for unsupported systems
3800case $ac_sys_system/$ac_sys_release in
3801atheos*|Linux*/1*)
3802 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3803 echo See README for details.
3804 exit 1;;
3805esac
3806
3807
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003808{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3809echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003810
3811# Check whether --with-suffix was given.
3812if test "${with_suffix+set}" = set; then
3813 withval=$with_suffix;
3814 case $withval in
3815 no) EXEEXT=;;
3816 yes) EXEEXT=.exe;;
3817 *) EXEEXT=$withval;;
3818 esac
3819fi
3820
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003821{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3822echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003823
3824# Test whether we're running on a non-case-sensitive system, in which
3825# case we give a warning if no ext is given
3826
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003827{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3828echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003829if test ! -d CaseSensitiveTestDir; then
3830mkdir CaseSensitiveTestDir
3831fi
3832
3833if test -d casesensitivetestdir
3834then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003835 { echo "$as_me:$LINENO: result: yes" >&5
3836echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003837 BUILDEXEEXT=.exe
3838else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003839 { echo "$as_me:$LINENO: result: no" >&5
3840echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003841 BUILDEXEEXT=$EXEEXT
3842fi
3843rmdir CaseSensitiveTestDir
3844
3845case $MACHDEP in
3846bsdos*)
3847 case $CC in
3848 gcc) CC="$CC -D_HAVE_BSDI";;
3849 esac;;
3850esac
3851
3852case $ac_sys_system in
3853hp*|HP*)
3854 case $CC in
3855 cc|*/cc) CC="$CC -Ae";;
3856 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003857SunOS*)
3858 # Some functions have a prototype only with that define, e.g. confstr
3859
3860cat >>confdefs.h <<\_ACEOF
3861#define __EXTENSIONS__ 1
3862_ACEOF
3863
3864 ;;
3865esac
3866
3867
3868
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003869{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3870echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003871if test -z "$LIBRARY"
3872then
3873 LIBRARY='libpython$(VERSION).a'
3874fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003875{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3876echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003877
3878# LDLIBRARY is the name of the library to link against (as opposed to the
3879# name of the library into which to insert object files). BLDLIBRARY is also
3880# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3881# is blank as the main program is not linked directly against LDLIBRARY.
3882# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3883# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3884# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3885# DLLLIBRARY is the shared (i.e., DLL) library.
3886#
3887# RUNSHARED is used to run shared python without installed libraries
3888#
3889# INSTSONAME is the name of the shared library that will be use to install
3890# on the system - some systems like version suffix, others don't
3891
3892
3893
3894
3895
3896
3897LDLIBRARY="$LIBRARY"
3898BLDLIBRARY='$(LDLIBRARY)'
3899INSTSONAME='$(LDLIBRARY)'
3900DLLLIBRARY=''
3901LDLIBRARYDIR=''
3902RUNSHARED=''
3903
3904# LINKCC is the command that links the python executable -- default is $(CC).
3905# If CXX is set, and if it is needed to link a main function that was
3906# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3907# python might then depend on the C++ runtime
3908# This is altered for AIX in order to build the export list before
3909# linking.
3910
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003911{ echo "$as_me:$LINENO: checking LINKCC" >&5
3912echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003913if test -z "$LINKCC"
3914then
3915 LINKCC='$(PURIFY) $(MAINCC)'
3916 case $ac_sys_system in
3917 AIX*)
3918 exp_extra="\"\""
3919 if test $ac_sys_release -ge 5 -o \
3920 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3921 exp_extra="."
3922 fi
3923 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003924 QNX*)
3925 # qcc must be used because the other compilers do not
3926 # support -N.
3927 LINKCC=qcc;;
3928 esac
3929fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003930{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3931echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003932
3933# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3934# make sure we default having it set to "no": this is used by
3935# distutils.unixccompiler to know if it should add --enable-new-dtags
3936# to linker command lines, and failing to detect GNU ld simply results
3937# in the same bahaviour as before.
3938
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003939{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3940echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003941ac_prog=ld
3942if test "$GCC" = yes; then
3943 ac_prog=`$CC -print-prog-name=ld`
3944fi
3945case `"$ac_prog" -V 2>&1 < /dev/null` in
3946 *GNU*)
3947 GNULD=yes;;
3948 *)
3949 GNULD=no;;
3950esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003951{ echo "$as_me:$LINENO: result: $GNULD" >&5
3952echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003953
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003954{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3955echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003956# Check whether --enable-shared was given.
3957if test "${enable_shared+set}" = set; then
3958 enableval=$enable_shared;
3959fi
3960
3961
3962if test -z "$enable_shared"
3963then
3964 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00003965 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003966 enable_shared="yes";;
3967 *)
3968 enable_shared="no";;
3969 esac
3970fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003971{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3972echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003973
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003974{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3975echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003976# Check whether --enable-profiling was given.
3977if test "${enable_profiling+set}" = set; then
3978 enableval=$enable_profiling; ac_save_cc="$CC"
3979 CC="$CC -pg"
3980 if test "$cross_compiling" = yes; then
3981 ac_enable_profiling="no"
3982else
3983 cat >conftest.$ac_ext <<_ACEOF
3984/* confdefs.h. */
3985_ACEOF
3986cat confdefs.h >>conftest.$ac_ext
3987cat >>conftest.$ac_ext <<_ACEOF
3988/* end confdefs.h. */
3989int main() { return 0; }
3990_ACEOF
3991rm -f conftest$ac_exeext
3992if { (ac_try="$ac_link"
3993case "(($ac_try" in
3994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3995 *) ac_try_echo=$ac_try;;
3996esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003998 (eval "$ac_link") 2>&5
3999 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004001 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4002 { (case "(($ac_try" in
4003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4004 *) ac_try_echo=$ac_try;;
4005esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004007 (eval "$ac_try") 2>&5
4008 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004010 (exit $ac_status); }; }; then
4011 ac_enable_profiling="yes"
4012else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004013 echo "$as_me: program exited with status $ac_status" >&5
4014echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004015sed 's/^/| /' conftest.$ac_ext >&5
4016
4017( exit $ac_status )
4018ac_enable_profiling="no"
4019fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004020rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4021fi
4022
4023
4024 CC="$ac_save_cc"
4025fi
4026
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004027{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4028echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004029
4030case "$ac_enable_profiling" in
4031 "yes")
4032 BASECFLAGS="-pg $BASECFLAGS"
4033 LDFLAGS="-pg $LDFLAGS"
4034 ;;
4035esac
4036
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004037{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4038echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004039
4040# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4041# library that we build, but we do not want to link against it (we
4042# will find it with a -framework option). For this reason there is an
4043# extra variable BLDLIBRARY against which Python and the extension
4044# modules are linked, BLDLIBRARY. This is normally the same as
4045# LDLIBRARY, but empty for MacOSX framework builds.
4046if test "$enable_framework"
4047then
4048 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4049 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4050 BLDLIBRARY=''
4051else
4052 BLDLIBRARY='$(LDLIBRARY)'
4053fi
4054
4055# Other platforms follow
4056if test $enable_shared = "yes"; then
4057
4058cat >>confdefs.h <<\_ACEOF
4059#define Py_ENABLE_SHARED 1
4060_ACEOF
4061
4062 case $ac_sys_system in
4063 CYGWIN*)
4064 LDLIBRARY='libpython$(VERSION).dll.a'
4065 DLLLIBRARY='libpython$(VERSION).dll'
4066 ;;
4067 SunOS*)
4068 LDLIBRARY='libpython$(VERSION).so'
4069 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4070 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4071 INSTSONAME="$LDLIBRARY".$SOVERSION
4072 ;;
4073 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4074 LDLIBRARY='libpython$(VERSION).so'
4075 BLDLIBRARY='-L. -lpython$(VERSION)'
4076 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4077 case $ac_sys_system in
4078 FreeBSD*)
4079 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4080 ;;
4081 esac
4082 INSTSONAME="$LDLIBRARY".$SOVERSION
4083 ;;
4084 hp*|HP*)
4085 case `uname -m` in
4086 ia64)
4087 LDLIBRARY='libpython$(VERSION).so'
4088 ;;
4089 *)
4090 LDLIBRARY='libpython$(VERSION).sl'
4091 ;;
4092 esac
4093 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4094 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4095 ;;
4096 OSF*)
4097 LDLIBRARY='libpython$(VERSION).so'
4098 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4099 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4100 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004101 Darwin*)
4102 LDLIBRARY='libpython$(VERSION).dylib'
4103 BLDLIBRARY='-L. -lpython$(VERSION)'
4104 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4105 ;;
4106
4107 esac
4108else # shared is disabled
4109 case $ac_sys_system in
4110 CYGWIN*)
4111 BLDLIBRARY='$(LIBRARY)'
4112 LDLIBRARY='libpython$(VERSION).dll.a'
4113 ;;
4114 esac
4115fi
4116
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004117{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4118echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004119
4120if test -n "$ac_tool_prefix"; then
4121 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4122set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004123{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4124echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004125if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004126 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004127else
4128 if test -n "$RANLIB"; then
4129 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4130else
4131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4132for as_dir in $PATH
4133do
4134 IFS=$as_save_IFS
4135 test -z "$as_dir" && as_dir=.
4136 for ac_exec_ext in '' $ac_executable_extensions; do
4137 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4138 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004139 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004140 break 2
4141 fi
4142done
4143done
4144IFS=$as_save_IFS
4145
4146fi
4147fi
4148RANLIB=$ac_cv_prog_RANLIB
4149if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004150 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4151echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004152else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004153 { echo "$as_me:$LINENO: result: no" >&5
4154echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004155fi
4156
4157
4158fi
4159if test -z "$ac_cv_prog_RANLIB"; then
4160 ac_ct_RANLIB=$RANLIB
4161 # Extract the first word of "ranlib", so it can be a program name with args.
4162set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004163{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4164echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004165if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004166 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004167else
4168 if test -n "$ac_ct_RANLIB"; then
4169 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4170else
4171as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4172for as_dir in $PATH
4173do
4174 IFS=$as_save_IFS
4175 test -z "$as_dir" && as_dir=.
4176 for ac_exec_ext in '' $ac_executable_extensions; do
4177 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4178 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004179 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004180 break 2
4181 fi
4182done
4183done
4184IFS=$as_save_IFS
4185
4186fi
4187fi
4188ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4189if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004190 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4191echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004192else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004193 { echo "$as_me:$LINENO: result: no" >&5
4194echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004195fi
4196
4197 if test "x$ac_ct_RANLIB" = x; then
4198 RANLIB=":"
4199 else
4200 case $cross_compiling:$ac_tool_warned in
4201yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004202{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4203whose name does not start with the host triplet. If you think this
4204configuration is useful to you, please write to autoconf@gnu.org." >&5
4205echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4206whose name does not start with the host triplet. If you think this
4207configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004208ac_tool_warned=yes ;;
4209esac
4210 RANLIB=$ac_ct_RANLIB
4211 fi
4212else
4213 RANLIB="$ac_cv_prog_RANLIB"
4214fi
4215
4216
4217for ac_prog in ar aal
4218do
4219 # Extract the first word of "$ac_prog", so it can be a program name with args.
4220set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004221{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4222echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004223if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004224 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004225else
4226 if test -n "$AR"; then
4227 ac_cv_prog_AR="$AR" # Let the user override the test.
4228else
4229as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4230for as_dir in $PATH
4231do
4232 IFS=$as_save_IFS
4233 test -z "$as_dir" && as_dir=.
4234 for ac_exec_ext in '' $ac_executable_extensions; do
4235 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4236 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004237 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004238 break 2
4239 fi
4240done
4241done
4242IFS=$as_save_IFS
4243
4244fi
4245fi
4246AR=$ac_cv_prog_AR
4247if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004248 { echo "$as_me:$LINENO: result: $AR" >&5
4249echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004250else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004251 { echo "$as_me:$LINENO: result: no" >&5
4252echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004253fi
4254
4255
4256 test -n "$AR" && break
4257done
4258test -n "$AR" || AR="ar"
4259
4260
4261# tweak ARFLAGS only if the user didn't set it on the command line
4262
4263if test -z "$ARFLAGS"
4264then
4265 ARFLAGS="rc"
4266fi
4267
4268
4269# Extract the first word of "svnversion", so it can be a program name with args.
4270set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004271{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4272echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004273if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004274 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004275else
4276 if test -n "$SVNVERSION"; then
4277 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4278else
4279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4280for as_dir in $PATH
4281do
4282 IFS=$as_save_IFS
4283 test -z "$as_dir" && as_dir=.
4284 for ac_exec_ext in '' $ac_executable_extensions; do
4285 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4286 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004287 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004288 break 2
4289 fi
4290done
4291done
4292IFS=$as_save_IFS
4293
4294 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4295fi
4296fi
4297SVNVERSION=$ac_cv_prog_SVNVERSION
4298if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004299 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4300echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004301else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004302 { echo "$as_me:$LINENO: result: no" >&5
4303echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004304fi
4305
4306
4307if test $SVNVERSION = found
4308then
4309 SVNVERSION="svnversion \$(srcdir)"
4310else
4311 SVNVERSION="echo Unversioned directory"
4312fi
4313
4314case $MACHDEP in
4315bsdos*|hp*|HP*)
4316 # install -d does not work on BSDI or HP-UX
4317 if test -z "$INSTALL"
4318 then
4319 INSTALL="${srcdir}/install-sh -c"
4320 fi
4321esac
4322ac_aux_dir=
4323for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4324 if test -f "$ac_dir/install-sh"; then
4325 ac_aux_dir=$ac_dir
4326 ac_install_sh="$ac_aux_dir/install-sh -c"
4327 break
4328 elif test -f "$ac_dir/install.sh"; then
4329 ac_aux_dir=$ac_dir
4330 ac_install_sh="$ac_aux_dir/install.sh -c"
4331 break
4332 elif test -f "$ac_dir/shtool"; then
4333 ac_aux_dir=$ac_dir
4334 ac_install_sh="$ac_aux_dir/shtool install -c"
4335 break
4336 fi
4337done
4338if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004339 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4340echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004341 { (exit 1); exit 1; }; }
4342fi
4343
4344# These three variables are undocumented and unsupported,
4345# and are intended to be withdrawn in a future Autoconf release.
4346# They can cause serious problems if a builder's source tree is in a directory
4347# whose full name contains unusual characters.
4348ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4349ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4350ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4351
4352
4353# Find a good install program. We prefer a C program (faster),
4354# so one script is as good as another. But avoid the broken or
4355# incompatible versions:
4356# SysV /etc/install, /usr/sbin/install
4357# SunOS /usr/etc/install
4358# IRIX /sbin/install
4359# AIX /bin/install
4360# AmigaOS /C/install, which installs bootblocks on floppy discs
4361# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4362# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4363# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4364# OS/2's system install, which has a completely different semantic
4365# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004366{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4367echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004368if test -z "$INSTALL"; then
4369if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004370 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004371else
4372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4373for as_dir in $PATH
4374do
4375 IFS=$as_save_IFS
4376 test -z "$as_dir" && as_dir=.
4377 # Account for people who put trailing slashes in PATH elements.
4378case $as_dir/ in
4379 ./ | .// | /cC/* | \
4380 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4381 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4382 /usr/ucb/* ) ;;
4383 *)
4384 # OSF1 and SCO ODT 3.0 have their own names for install.
4385 # Don't use installbsd from OSF since it installs stuff as root
4386 # by default.
4387 for ac_prog in ginstall scoinst install; do
4388 for ac_exec_ext in '' $ac_executable_extensions; do
4389 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4390 if test $ac_prog = install &&
4391 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4392 # AIX install. It has an incompatible calling convention.
4393 :
4394 elif test $ac_prog = install &&
4395 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4396 # program-specific install script used by HP pwplus--don't use.
4397 :
4398 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004399 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4400 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004401 fi
4402 fi
4403 done
4404 done
4405 ;;
4406esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004407done
4408IFS=$as_save_IFS
4409
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004410
4411fi
4412 if test "${ac_cv_path_install+set}" = set; then
4413 INSTALL=$ac_cv_path_install
4414 else
4415 # As a last resort, use the slow shell script. Don't cache a
4416 # value for INSTALL within a source directory, because that will
4417 # break other packages using the cache if that directory is
4418 # removed, or if the value is a relative name.
4419 INSTALL=$ac_install_sh
4420 fi
4421fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004422{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4423echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004424
4425# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4426# It thinks the first close brace ends the variable substitution.
4427test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4428
4429test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4430
4431test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4432
4433
4434# Not every filesystem supports hard links
4435
4436if test -z "$LN" ; then
4437 case $ac_sys_system in
4438 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004439 *) LN=ln;;
4440 esac
4441fi
4442
4443# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004444{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4445echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004446
4447# Check whether --with-pydebug was given.
4448if test "${with_pydebug+set}" = set; then
4449 withval=$with_pydebug;
4450if test "$withval" != no
4451then
4452
4453cat >>confdefs.h <<\_ACEOF
4454#define Py_DEBUG 1
4455_ACEOF
4456
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004457 { echo "$as_me:$LINENO: result: yes" >&5
4458echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004459 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004460else { echo "$as_me:$LINENO: result: no" >&5
4461echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004462fi
4463else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004464 { echo "$as_me:$LINENO: result: no" >&5
4465echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004466fi
4467
4468
4469# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4470# merged with this chunk of code?
4471
4472# Optimizer/debugger flags
4473# ------------------------
4474# (The following bit of code is complicated enough - please keep things
4475# indented properly. Just pretend you're editing Python code. ;-)
4476
4477# There are two parallel sets of case statements below, one that checks to
4478# see if OPT was set and one that does BASECFLAGS setting based upon
4479# compiler and platform. BASECFLAGS tweaks need to be made even if the
4480# user set OPT.
4481
4482# tweak OPT based on compiler and platform, only if the user didn't set
4483# it on the command line
4484
4485if test -z "$OPT"
4486then
4487 case $GCC in
4488 yes)
4489 if test "$CC" != 'g++' ; then
4490 STRICT_PROTO="-Wstrict-prototypes"
4491 fi
4492 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4493 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4494 WRAP="-fwrapv"
4495 fi
4496 case $ac_cv_prog_cc_g in
4497 yes)
4498 if test "$Py_DEBUG" = 'true' ; then
4499 # Optimization messes up debuggers, so turn it off for
4500 # debug builds.
4501 OPT="-g -Wall $STRICT_PROTO"
4502 else
4503 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4504 fi
4505 ;;
4506 *)
4507 OPT="-O3 -Wall $STRICT_PROTO"
4508 ;;
4509 esac
4510 case $ac_sys_system in
4511 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4512 ;;
4513 esac
4514 ;;
4515
4516 *)
4517 OPT="-O"
4518 ;;
4519 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004520fi
4521
4522
4523
4524# The -arch flags for universal builds on OSX
4525UNIVERSAL_ARCH_FLAGS=
4526
4527
4528# tweak BASECFLAGS based on compiler and platform
4529case $GCC in
4530yes)
4531 # Python violates C99 rules, by casting between incompatible
4532 # pointer types. GCC may generate bad code as a result of that,
4533 # so use -fno-strict-aliasing if supported.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004534 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4535echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004536 ac_save_cc="$CC"
4537 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004538 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004539 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004540else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004541 cat >conftest.$ac_ext <<_ACEOF
4542/* confdefs.h. */
4543_ACEOF
4544cat confdefs.h >>conftest.$ac_ext
4545cat >>conftest.$ac_ext <<_ACEOF
4546/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004547
4548int
4549main ()
4550{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004551int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004552 ;
4553 return 0;
4554}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004555_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004556rm -f conftest.$ac_objext
4557if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004558case "(($ac_try" in
4559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4560 *) ac_try_echo=$ac_try;;
4561esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004563 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004564 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004565 grep -v '^ *+' conftest.er1 >conftest.err
4566 rm -f conftest.er1
4567 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004569 (exit $ac_status); } && {
4570 test -z "$ac_c_werror_flag" ||
4571 test ! -s conftest.err
4572 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004573 ac_cv_no_strict_aliasing_ok=yes
4574else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004575 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004576sed 's/^/| /' conftest.$ac_ext >&5
4577
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004578 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004579fi
4580
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004582fi
4583
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004584 CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004585 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4586echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004587 if test $ac_cv_no_strict_aliasing_ok = yes
4588 then
4589 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4590 fi
4591
4592 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4593 # support. Without this, treatment of subnormals doesn't follow
4594 # the standard.
4595 case $ac_sys_machine in
4596 alpha*)
4597 BASECFLAGS="$BASECFLAGS -mieee"
4598 ;;
4599 esac
4600
4601 case $ac_sys_system in
4602 SCO_SV*)
4603 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4604 ;;
4605 # is there any other compiler on Darwin besides gcc?
4606 Darwin*)
4607 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4608 # used to be here, but non-Apple gcc doesn't accept them.
4609
4610
4611 if test "${enable_universalsdk}"; then
4612 UNIVERSAL_ARCH_FLAGS=""
4613 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4614 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4615 ARCH_RUN_32BIT=""
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004616 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004617
4618 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4619 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004620 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004621 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004622
4623 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4624 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004625 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004626 ARCH_RUN_32BIT="arch -i386 -ppc"
4627
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004628 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4629 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004630 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004631 ARCH_RUN_32BIT="arch -i386"
4632
4633 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4634 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004635 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
4636 ARCH_RUN_32BIT="arch -i386 -ppc7400"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004637
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004638 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004639 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4640echo "$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 +00004641 { (exit 1); exit 1; }; }
4642
4643 fi
4644
4645
4646 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4647 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4648 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4649 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4650 fi
4651 fi
4652
4653 # Calculate the right deployment target for this build.
4654 #
4655 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4656 if test ${cur_target} '>' 10.2; then
4657 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004658 if test ${enable_universalsdk}; then
4659 if test "${UNIVERSAL_ARCHS}" = "all"; then
4660 # Ensure that the default platform for a
4661 # 4-way universal build is OSX 10.5,
4662 # that's the first OS release where
4663 # 4-way builds make sense.
4664 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004665
4666 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4667 cur_target='10.5'
4668
4669 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4670 cur_target='10.5'
4671
4672 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4673 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004674 fi
4675 else
4676 if test `arch` = "i386"; then
4677 # On Intel macs default to a deployment
4678 # target of 10.4, that's the first OSX
4679 # release with Intel support.
4680 cur_target="10.4"
4681 fi
4682 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004683 fi
4684 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4685
4686 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4687 # environment with a value that is the same as what we'll use
4688 # in the Makefile to ensure that we'll get the same compiler
4689 # environment during configure and build time.
4690 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4691 export MACOSX_DEPLOYMENT_TARGET
4692 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4693
4694 ;;
4695 OSF*)
4696 BASECFLAGS="$BASECFLAGS -mieee"
4697 ;;
4698 esac
4699 ;;
4700
4701*)
4702 case $ac_sys_system in
4703 OpenUNIX*|UnixWare*)
4704 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4705 ;;
4706 OSF*)
4707 BASECFLAGS="$BASECFLAGS -ieee -std"
4708 ;;
4709 SCO_SV*)
4710 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4711 ;;
4712 esac
4713 ;;
4714esac
4715
4716if test "$Py_DEBUG" = 'true'; then
4717 :
4718else
4719 OPT="-DNDEBUG $OPT"
4720fi
4721
4722if test "$ac_arch_flags"
4723then
4724 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4725fi
4726
4727# disable check for icc since it seems to pass, but generates a warning
4728if test "$CC" = icc
4729then
4730 ac_cv_opt_olimit_ok=no
4731fi
4732
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004733{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4734echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004735if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004736 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004737else
4738 ac_save_cc="$CC"
4739CC="$CC -OPT:Olimit=0"
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004740cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004741/* confdefs.h. */
4742_ACEOF
4743cat confdefs.h >>conftest.$ac_ext
4744cat >>conftest.$ac_ext <<_ACEOF
4745/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004746
4747int
4748main ()
4749{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004750int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004751 ;
4752 return 0;
4753}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004754_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004755rm -f conftest.$ac_objext
4756if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004757case "(($ac_try" in
4758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4759 *) ac_try_echo=$ac_try;;
4760esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004762 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004763 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004764 grep -v '^ *+' conftest.er1 >conftest.err
4765 rm -f conftest.er1
4766 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004768 (exit $ac_status); } && {
4769 test -z "$ac_c_werror_flag" ||
4770 test ! -s conftest.err
4771 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004772 ac_cv_opt_olimit_ok=yes
4773else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004774 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004775sed 's/^/| /' conftest.$ac_ext >&5
4776
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004777 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004778fi
4779
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004781CC="$ac_save_cc"
4782fi
4783
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004784{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4785echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004786if test $ac_cv_opt_olimit_ok = yes; then
4787 case $ac_sys_system in
4788 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4789 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4790 # environment?
4791 Darwin*)
4792 ;;
4793 *)
4794 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4795 ;;
4796 esac
4797else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004798 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4799echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004800 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004801 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004802else
4803 ac_save_cc="$CC"
4804 CC="$CC -Olimit 1500"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004805 cat >conftest.$ac_ext <<_ACEOF
4806/* confdefs.h. */
4807_ACEOF
4808cat confdefs.h >>conftest.$ac_ext
4809cat >>conftest.$ac_ext <<_ACEOF
4810/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004811
4812int
4813main ()
4814{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004815int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004816 ;
4817 return 0;
4818}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004819_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004820rm -f conftest.$ac_objext
4821if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004822case "(($ac_try" in
4823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4824 *) ac_try_echo=$ac_try;;
4825esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004827 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004828 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004829 grep -v '^ *+' conftest.er1 >conftest.err
4830 rm -f conftest.er1
4831 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004833 (exit $ac_status); } && {
4834 test -z "$ac_c_werror_flag" ||
4835 test ! -s conftest.err
4836 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004837 ac_cv_olimit_ok=yes
4838else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004839 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004840sed 's/^/| /' conftest.$ac_ext >&5
4841
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004842 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843fi
4844
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004846 CC="$ac_save_cc"
4847fi
4848
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004849 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4850echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004851 if test $ac_cv_olimit_ok = yes; then
4852 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4853 fi
4854fi
4855
4856# Check whether GCC supports PyArg_ParseTuple format
4857if test "$GCC" = "yes"
4858then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004859 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4860echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004861 save_CFLAGS=$CFLAGS
4862 CFLAGS="$CFLAGS -Werror"
4863 cat >conftest.$ac_ext <<_ACEOF
4864/* confdefs.h. */
4865_ACEOF
4866cat confdefs.h >>conftest.$ac_ext
4867cat >>conftest.$ac_ext <<_ACEOF
4868/* end confdefs.h. */
4869
4870 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4871
4872int
4873main ()
4874{
4875
4876 ;
4877 return 0;
4878}
4879_ACEOF
4880rm -f conftest.$ac_objext
4881if { (ac_try="$ac_compile"
4882case "(($ac_try" in
4883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4884 *) ac_try_echo=$ac_try;;
4885esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004887 (eval "$ac_compile") 2>conftest.er1
4888 ac_status=$?
4889 grep -v '^ *+' conftest.er1 >conftest.err
4890 rm -f conftest.er1
4891 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004893 (exit $ac_status); } && {
4894 test -z "$ac_c_werror_flag" ||
4895 test ! -s conftest.err
4896 } && test -s conftest.$ac_objext; then
4897
4898cat >>confdefs.h <<\_ACEOF
4899#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4900_ACEOF
4901
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004902 { echo "$as_me:$LINENO: result: yes" >&5
4903echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004904else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004905 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004906sed 's/^/| /' conftest.$ac_ext >&5
4907
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004908 { echo "$as_me:$LINENO: result: no" >&5
4909echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004910
4911fi
4912
4913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4914 CFLAGS=$save_CFLAGS
4915fi
4916
4917# On some compilers, pthreads are available without further options
4918# (e.g. MacOS X). On some of these systems, the compiler will not
4919# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4920# So we have to see first whether pthreads are available without
4921# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004922{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4923echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004924if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004925 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004926else
4927 if test "$cross_compiling" = yes; then
4928 ac_cv_pthread_is_default=no
4929else
4930 cat >conftest.$ac_ext <<_ACEOF
4931/* confdefs.h. */
4932_ACEOF
4933cat confdefs.h >>conftest.$ac_ext
4934cat >>conftest.$ac_ext <<_ACEOF
4935/* end confdefs.h. */
4936
4937#include <pthread.h>
4938
4939void* routine(void* p){return NULL;}
4940
4941int main(){
4942 pthread_t p;
4943 if(pthread_create(&p,NULL,routine,NULL)!=0)
4944 return 1;
4945 (void)pthread_detach(p);
4946 return 0;
4947}
4948
4949_ACEOF
4950rm -f conftest$ac_exeext
4951if { (ac_try="$ac_link"
4952case "(($ac_try" in
4953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4954 *) ac_try_echo=$ac_try;;
4955esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004957 (eval "$ac_link") 2>&5
4958 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004960 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4961 { (case "(($ac_try" in
4962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4963 *) ac_try_echo=$ac_try;;
4964esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004966 (eval "$ac_try") 2>&5
4967 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004969 (exit $ac_status); }; }; then
4970
4971 ac_cv_pthread_is_default=yes
4972 ac_cv_kthread=no
4973 ac_cv_pthread=no
4974
4975else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004976 echo "$as_me: program exited with status $ac_status" >&5
4977echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978sed 's/^/| /' conftest.$ac_ext >&5
4979
4980( exit $ac_status )
4981ac_cv_pthread_is_default=no
4982fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004983rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4984fi
4985
4986
4987
4988fi
4989
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004990{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4991echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004992
4993
4994if test $ac_cv_pthread_is_default = yes
4995then
4996 ac_cv_kpthread=no
4997else
4998# -Kpthread, if available, provides the right #defines
4999# and linker options to make pthread_create available
5000# Some compilers won't report that they do not support -Kpthread,
5001# so we need to run a program to see whether it really made the
5002# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005003{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5004echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005006 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005007else
5008 ac_save_cc="$CC"
5009CC="$CC -Kpthread"
5010if test "$cross_compiling" = yes; then
5011 ac_cv_kpthread=no
5012else
5013 cat >conftest.$ac_ext <<_ACEOF
5014/* confdefs.h. */
5015_ACEOF
5016cat confdefs.h >>conftest.$ac_ext
5017cat >>conftest.$ac_ext <<_ACEOF
5018/* end confdefs.h. */
5019
5020#include <pthread.h>
5021
5022void* routine(void* p){return NULL;}
5023
5024int main(){
5025 pthread_t p;
5026 if(pthread_create(&p,NULL,routine,NULL)!=0)
5027 return 1;
5028 (void)pthread_detach(p);
5029 return 0;
5030}
5031
5032_ACEOF
5033rm -f conftest$ac_exeext
5034if { (ac_try="$ac_link"
5035case "(($ac_try" in
5036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5037 *) ac_try_echo=$ac_try;;
5038esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005040 (eval "$ac_link") 2>&5
5041 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5044 { (case "(($ac_try" in
5045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5046 *) ac_try_echo=$ac_try;;
5047esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005049 (eval "$ac_try") 2>&5
5050 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052 (exit $ac_status); }; }; then
5053 ac_cv_kpthread=yes
5054else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005055 echo "$as_me: program exited with status $ac_status" >&5
5056echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005057sed 's/^/| /' conftest.$ac_ext >&5
5058
5059( exit $ac_status )
5060ac_cv_kpthread=no
5061fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5063fi
5064
5065
5066CC="$ac_save_cc"
5067fi
5068
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005069{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5070echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005071fi
5072
5073if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5074then
5075# -Kthread, if available, provides the right #defines
5076# and linker options to make pthread_create available
5077# Some compilers won't report that they do not support -Kthread,
5078# so we need to run a program to see whether it really made the
5079# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005080{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5081echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005082if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005083 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084else
5085 ac_save_cc="$CC"
5086CC="$CC -Kthread"
5087if test "$cross_compiling" = yes; then
5088 ac_cv_kthread=no
5089else
5090 cat >conftest.$ac_ext <<_ACEOF
5091/* confdefs.h. */
5092_ACEOF
5093cat confdefs.h >>conftest.$ac_ext
5094cat >>conftest.$ac_ext <<_ACEOF
5095/* end confdefs.h. */
5096
5097#include <pthread.h>
5098
5099void* routine(void* p){return NULL;}
5100
5101int main(){
5102 pthread_t p;
5103 if(pthread_create(&p,NULL,routine,NULL)!=0)
5104 return 1;
5105 (void)pthread_detach(p);
5106 return 0;
5107}
5108
5109_ACEOF
5110rm -f conftest$ac_exeext
5111if { (ac_try="$ac_link"
5112case "(($ac_try" in
5113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5114 *) ac_try_echo=$ac_try;;
5115esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005117 (eval "$ac_link") 2>&5
5118 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005120 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5121 { (case "(($ac_try" in
5122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5123 *) ac_try_echo=$ac_try;;
5124esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005126 (eval "$ac_try") 2>&5
5127 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005129 (exit $ac_status); }; }; then
5130 ac_cv_kthread=yes
5131else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005132 echo "$as_me: program exited with status $ac_status" >&5
5133echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005134sed 's/^/| /' conftest.$ac_ext >&5
5135
5136( exit $ac_status )
5137ac_cv_kthread=no
5138fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5140fi
5141
5142
5143CC="$ac_save_cc"
5144fi
5145
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005146{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5147echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005148fi
5149
5150if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5151then
5152# -pthread, if available, provides the right #defines
5153# and linker options to make pthread_create available
5154# Some compilers won't report that they do not support -pthread,
5155# so we need to run a program to see whether it really made the
5156# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005157{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5158echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005159if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005160 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005161else
5162 ac_save_cc="$CC"
5163CC="$CC -pthread"
5164if test "$cross_compiling" = yes; then
5165 ac_cv_pthread=no
5166else
5167 cat >conftest.$ac_ext <<_ACEOF
5168/* confdefs.h. */
5169_ACEOF
5170cat confdefs.h >>conftest.$ac_ext
5171cat >>conftest.$ac_ext <<_ACEOF
5172/* end confdefs.h. */
5173
5174#include <pthread.h>
5175
5176void* routine(void* p){return NULL;}
5177
5178int main(){
5179 pthread_t p;
5180 if(pthread_create(&p,NULL,routine,NULL)!=0)
5181 return 1;
5182 (void)pthread_detach(p);
5183 return 0;
5184}
5185
5186_ACEOF
5187rm -f conftest$ac_exeext
5188if { (ac_try="$ac_link"
5189case "(($ac_try" in
5190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5191 *) ac_try_echo=$ac_try;;
5192esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005194 (eval "$ac_link") 2>&5
5195 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5198 { (case "(($ac_try" in
5199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5200 *) ac_try_echo=$ac_try;;
5201esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005203 (eval "$ac_try") 2>&5
5204 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005206 (exit $ac_status); }; }; then
5207 ac_cv_pthread=yes
5208else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005209 echo "$as_me: program exited with status $ac_status" >&5
5210echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005211sed 's/^/| /' conftest.$ac_ext >&5
5212
5213( exit $ac_status )
5214ac_cv_pthread=no
5215fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005216rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5217fi
5218
5219
5220CC="$ac_save_cc"
5221fi
5222
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005223{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5224echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005225fi
5226
5227# If we have set a CC compiler flag for thread support then
5228# check if it works for CXX, too.
5229ac_cv_cxx_thread=no
5230if test ! -z "$CXX"
5231then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005232{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5233echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005234ac_save_cxx="$CXX"
5235
5236if test "$ac_cv_kpthread" = "yes"
5237then
5238 CXX="$CXX -Kpthread"
5239 ac_cv_cxx_thread=yes
5240elif test "$ac_cv_kthread" = "yes"
5241then
5242 CXX="$CXX -Kthread"
5243 ac_cv_cxx_thread=yes
5244elif test "$ac_cv_pthread" = "yes"
5245then
5246 CXX="$CXX -pthread"
5247 ac_cv_cxx_thread=yes
5248fi
5249
5250if test $ac_cv_cxx_thread = yes
5251then
5252 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5253 $CXX -c conftest.$ac_ext 2>&5
5254 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5255 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5256 then
5257 ac_cv_cxx_thread=yes
5258 else
5259 ac_cv_cxx_thread=no
5260 fi
5261 rm -fr conftest*
5262fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005263{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5264echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005265fi
5266CXX="$ac_save_cxx"
5267
5268
5269# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005270{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5271echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005272if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005273 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005274else
5275 cat >conftest.$ac_ext <<_ACEOF
5276/* confdefs.h. */
5277_ACEOF
5278cat confdefs.h >>conftest.$ac_ext
5279cat >>conftest.$ac_ext <<_ACEOF
5280/* end confdefs.h. */
5281#include <stdlib.h>
5282#include <stdarg.h>
5283#include <string.h>
5284#include <float.h>
5285
5286int
5287main ()
5288{
5289
5290 ;
5291 return 0;
5292}
5293_ACEOF
5294rm -f conftest.$ac_objext
5295if { (ac_try="$ac_compile"
5296case "(($ac_try" in
5297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5298 *) ac_try_echo=$ac_try;;
5299esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005301 (eval "$ac_compile") 2>conftest.er1
5302 ac_status=$?
5303 grep -v '^ *+' conftest.er1 >conftest.err
5304 rm -f conftest.er1
5305 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005307 (exit $ac_status); } && {
5308 test -z "$ac_c_werror_flag" ||
5309 test ! -s conftest.err
5310 } && test -s conftest.$ac_objext; then
5311 ac_cv_header_stdc=yes
5312else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005313 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005314sed 's/^/| /' conftest.$ac_ext >&5
5315
5316 ac_cv_header_stdc=no
5317fi
5318
5319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5320
5321if test $ac_cv_header_stdc = yes; then
5322 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5323 cat >conftest.$ac_ext <<_ACEOF
5324/* confdefs.h. */
5325_ACEOF
5326cat confdefs.h >>conftest.$ac_ext
5327cat >>conftest.$ac_ext <<_ACEOF
5328/* end confdefs.h. */
5329#include <string.h>
5330
5331_ACEOF
5332if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5333 $EGREP "memchr" >/dev/null 2>&1; then
5334 :
5335else
5336 ac_cv_header_stdc=no
5337fi
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005338rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005339
5340fi
5341
5342if test $ac_cv_header_stdc = yes; then
5343 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5344 cat >conftest.$ac_ext <<_ACEOF
5345/* confdefs.h. */
5346_ACEOF
5347cat confdefs.h >>conftest.$ac_ext
5348cat >>conftest.$ac_ext <<_ACEOF
5349/* end confdefs.h. */
5350#include <stdlib.h>
5351
5352_ACEOF
5353if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5354 $EGREP "free" >/dev/null 2>&1; then
5355 :
5356else
5357 ac_cv_header_stdc=no
5358fi
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005359rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360
5361fi
5362
5363if test $ac_cv_header_stdc = yes; then
5364 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5365 if test "$cross_compiling" = yes; then
5366 :
5367else
5368 cat >conftest.$ac_ext <<_ACEOF
5369/* confdefs.h. */
5370_ACEOF
5371cat confdefs.h >>conftest.$ac_ext
5372cat >>conftest.$ac_ext <<_ACEOF
5373/* end confdefs.h. */
5374#include <ctype.h>
5375#include <stdlib.h>
5376#if ((' ' & 0x0FF) == 0x020)
5377# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5378# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5379#else
5380# define ISLOWER(c) \
5381 (('a' <= (c) && (c) <= 'i') \
5382 || ('j' <= (c) && (c) <= 'r') \
5383 || ('s' <= (c) && (c) <= 'z'))
5384# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5385#endif
5386
5387#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5388int
5389main ()
5390{
5391 int i;
5392 for (i = 0; i < 256; i++)
5393 if (XOR (islower (i), ISLOWER (i))
5394 || toupper (i) != TOUPPER (i))
5395 return 2;
5396 return 0;
5397}
5398_ACEOF
5399rm -f conftest$ac_exeext
5400if { (ac_try="$ac_link"
5401case "(($ac_try" in
5402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5403 *) ac_try_echo=$ac_try;;
5404esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406 (eval "$ac_link") 2>&5
5407 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005409 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5410 { (case "(($ac_try" in
5411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5412 *) ac_try_echo=$ac_try;;
5413esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415 (eval "$ac_try") 2>&5
5416 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418 (exit $ac_status); }; }; then
5419 :
5420else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005421 echo "$as_me: program exited with status $ac_status" >&5
5422echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005423sed 's/^/| /' conftest.$ac_ext >&5
5424
5425( exit $ac_status )
5426ac_cv_header_stdc=no
5427fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5429fi
5430
5431
5432fi
5433fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005434{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5435echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436if test $ac_cv_header_stdc = yes; then
5437
5438cat >>confdefs.h <<\_ACEOF
5439#define STDC_HEADERS 1
5440_ACEOF
5441
5442fi
5443
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005444# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5455 inttypes.h stdint.h unistd.h
5456do
5457as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5458{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5459echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5460if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5461 echo $ECHO_N "(cached) $ECHO_C" >&6
5462else
5463 cat >conftest.$ac_ext <<_ACEOF
5464/* confdefs.h. */
5465_ACEOF
5466cat confdefs.h >>conftest.$ac_ext
5467cat >>conftest.$ac_ext <<_ACEOF
5468/* end confdefs.h. */
5469$ac_includes_default
5470
5471#include <$ac_header>
5472_ACEOF
5473rm -f conftest.$ac_objext
5474if { (ac_try="$ac_compile"
5475case "(($ac_try" in
5476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5477 *) ac_try_echo=$ac_try;;
5478esac
5479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5480 (eval "$ac_compile") 2>conftest.er1
5481 ac_status=$?
5482 grep -v '^ *+' conftest.er1 >conftest.err
5483 rm -f conftest.er1
5484 cat conftest.err >&5
5485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5486 (exit $ac_status); } && {
5487 test -z "$ac_c_werror_flag" ||
5488 test ! -s conftest.err
5489 } && test -s conftest.$ac_objext; then
5490 eval "$as_ac_Header=yes"
5491else
5492 echo "$as_me: failed program was:" >&5
5493sed 's/^/| /' conftest.$ac_ext >&5
5494
5495 eval "$as_ac_Header=no"
5496fi
5497
5498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5499fi
5500ac_res=`eval echo '${'$as_ac_Header'}'`
5501 { echo "$as_me:$LINENO: result: $ac_res" >&5
5502echo "${ECHO_T}$ac_res" >&6; }
5503if test `eval echo '${'$as_ac_Header'}'` = yes; then
5504 cat >>confdefs.h <<_ACEOF
5505#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5506_ACEOF
5507
5508fi
5509
5510done
5511
5512
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005513
Martin v. Löwis11437992002-04-12 09:54:03 +00005514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
Anthony Baxter8a560de2004-10-13 15:30:56 +00005549
Martin v. Löwisc3001752005-01-23 09:27:24 +00005550
Martin v. Löwis11017b12006-01-14 18:12:57 +00005551
Thomas Wouters477c8d52006-05-27 19:21:47 +00005552
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005553
5554
5555
5556
5557
5558
5559
5560
Thomas Wouters89f507f2006-12-13 04:49:30 +00005561
Christian Heimes043d6f62008-01-07 17:19:16 +00005562
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005563
5564
Christian Heimesbbe741d2008-03-28 10:53:29 +00005565
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005566
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005567for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5568fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005569ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005570shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005571unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005572sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5573sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005574sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005575sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005576sys/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 +00005577sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005578bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005579do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005580as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005581if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005582 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5583echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005584if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005585 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005586fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005587ac_res=`eval echo '${'$as_ac_Header'}'`
5588 { echo "$as_me:$LINENO: result: $ac_res" >&5
5589echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005590else
Martin v. Löwis11437992002-04-12 09:54:03 +00005591 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005592{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5593echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005594cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005595/* confdefs.h. */
5596_ACEOF
5597cat confdefs.h >>conftest.$ac_ext
5598cat >>conftest.$ac_ext <<_ACEOF
5599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005600$ac_includes_default
5601#include <$ac_header>
5602_ACEOF
5603rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005604if { (ac_try="$ac_compile"
5605case "(($ac_try" in
5606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5607 *) ac_try_echo=$ac_try;;
5608esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005610 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005612 grep -v '^ *+' conftest.er1 >conftest.err
5613 rm -f conftest.er1
5614 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005616 (exit $ac_status); } && {
5617 test -z "$ac_c_werror_flag" ||
5618 test ! -s conftest.err
5619 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005620 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005621else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005623sed 's/^/| /' conftest.$ac_ext >&5
5624
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005625 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005627
5628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005629{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5630echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005631
5632# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005633{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5634echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005635cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005636/* confdefs.h. */
5637_ACEOF
5638cat confdefs.h >>conftest.$ac_ext
5639cat >>conftest.$ac_ext <<_ACEOF
5640/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005641#include <$ac_header>
5642_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005643if { (ac_try="$ac_cpp conftest.$ac_ext"
5644case "(($ac_try" in
5645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5646 *) ac_try_echo=$ac_try;;
5647esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005649 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005650 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005651 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005652 rm -f conftest.er1
5653 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005655 (exit $ac_status); } >/dev/null && {
5656 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5657 test ! -s conftest.err
5658 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005659 ac_header_preproc=yes
5660else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005662sed 's/^/| /' conftest.$ac_ext >&5
5663
Martin v. Löwis11437992002-04-12 09:54:03 +00005664 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005666
Martin v. Löwis11437992002-04-12 09:54:03 +00005667rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005668{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5669echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005670
5671# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005672case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5673 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005674 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5675echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5676 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5677echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005678 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005679 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005680 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005681 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5682echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5683 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5684echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5685 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5686echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5687 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5688echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5689 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5690echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5691 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5692echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005693 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005694## -------------------------------------- ##
5695## Report this to http://bugs.python.org/ ##
5696## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005697_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005698 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005699 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005700esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005701{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5702echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005703if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005704 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005705else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005706 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005707fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005708ac_res=`eval echo '${'$as_ac_Header'}'`
5709 { echo "$as_me:$LINENO: result: $ac_res" >&5
5710echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005711
5712fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005713if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005714 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005715#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005716_ACEOF
5717
5718fi
5719
Guido van Rossum627b2d71993-12-24 10:39:16 +00005720done
5721
Martin v. Löwis11437992002-04-12 09:54:03 +00005722
5723
5724
5725
5726
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005727ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005728for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005729 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5730{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5731echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005732if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005733 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005734else
Martin v. Löwis11437992002-04-12 09:54:03 +00005735 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005736/* confdefs.h. */
5737_ACEOF
5738cat confdefs.h >>conftest.$ac_ext
5739cat >>conftest.$ac_ext <<_ACEOF
5740/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005741#include <sys/types.h>
5742#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005743
Martin v. Löwis11437992002-04-12 09:54:03 +00005744int
5745main ()
5746{
5747if ((DIR *) 0)
5748return 0;
5749 ;
5750 return 0;
5751}
5752_ACEOF
5753rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005754if { (ac_try="$ac_compile"
5755case "(($ac_try" in
5756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5757 *) ac_try_echo=$ac_try;;
5758esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005760 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005762 grep -v '^ *+' conftest.er1 >conftest.err
5763 rm -f conftest.er1
5764 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005766 (exit $ac_status); } && {
5767 test -z "$ac_c_werror_flag" ||
5768 test ! -s conftest.err
5769 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005770 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005771else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005773sed 's/^/| /' conftest.$ac_ext >&5
5774
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005775 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005777
5778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005779fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005780ac_res=`eval echo '${'$as_ac_Header'}'`
5781 { echo "$as_me:$LINENO: result: $ac_res" >&5
5782echo "${ECHO_T}$ac_res" >&6; }
5783if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005784 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005785#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005786_ACEOF
5787
5788ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005789fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005790
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005791done
5792# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5793if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005794 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5795echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005796if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005797 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005798else
Martin v. Löwis11437992002-04-12 09:54:03 +00005799 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005800cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005801/* confdefs.h. */
5802_ACEOF
5803cat confdefs.h >>conftest.$ac_ext
5804cat >>conftest.$ac_ext <<_ACEOF
5805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005806
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005807/* Override any GCC internal prototype to avoid an error.
5808 Use char because int might match the return type of a GCC
5809 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005810#ifdef __cplusplus
5811extern "C"
5812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005813char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005814int
5815main ()
5816{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005817return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005818 ;
5819 return 0;
5820}
5821_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005822for ac_lib in '' dir; do
5823 if test -z "$ac_lib"; then
5824 ac_res="none required"
5825 else
5826 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005827 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005828 fi
5829 rm -f conftest.$ac_objext conftest$ac_exeext
5830if { (ac_try="$ac_link"
5831case "(($ac_try" in
5832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5833 *) ac_try_echo=$ac_try;;
5834esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005836 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005837 ac_status=$?
5838 grep -v '^ *+' conftest.er1 >conftest.err
5839 rm -f conftest.er1
5840 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005842 (exit $ac_status); } && {
5843 test -z "$ac_c_werror_flag" ||
5844 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005845 } && test -s conftest$ac_exeext &&
5846 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005847 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005848else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005849 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005850sed 's/^/| /' conftest.$ac_ext >&5
5851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005852
Thomas Wouters477c8d52006-05-27 19:21:47 +00005853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005854
5855rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5856 conftest$ac_exeext
5857 if test "${ac_cv_search_opendir+set}" = set; then
5858 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005860done
5861if test "${ac_cv_search_opendir+set}" = set; then
5862 :
5863else
5864 ac_cv_search_opendir=no
5865fi
5866rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005867LIBS=$ac_func_search_save_LIBS
5868fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005869{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5870echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005871ac_res=$ac_cv_search_opendir
5872if test "$ac_res" != no; then
5873 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005874
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005875fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005876
Michael W. Hudson54241132001-12-07 15:38:26 +00005877else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005878 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5879echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005880if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005881 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005882else
5883 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005884cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005885/* confdefs.h. */
5886_ACEOF
5887cat confdefs.h >>conftest.$ac_ext
5888cat >>conftest.$ac_ext <<_ACEOF
5889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005891/* Override any GCC internal prototype to avoid an error.
5892 Use char because int might match the return type of a GCC
5893 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005894#ifdef __cplusplus
5895extern "C"
5896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005897char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005898int
5899main ()
5900{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005901return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005902 ;
5903 return 0;
5904}
5905_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005906for ac_lib in '' x; do
5907 if test -z "$ac_lib"; then
5908 ac_res="none required"
5909 else
5910 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005911 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005912 fi
5913 rm -f conftest.$ac_objext conftest$ac_exeext
5914if { (ac_try="$ac_link"
5915case "(($ac_try" in
5916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5917 *) ac_try_echo=$ac_try;;
5918esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005920 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005921 ac_status=$?
5922 grep -v '^ *+' conftest.er1 >conftest.err
5923 rm -f conftest.er1
5924 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005926 (exit $ac_status); } && {
5927 test -z "$ac_c_werror_flag" ||
5928 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005929 } && test -s conftest$ac_exeext &&
5930 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005931 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005932else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005933 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005934sed 's/^/| /' conftest.$ac_ext >&5
5935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005936
Thomas Wouters477c8d52006-05-27 19:21:47 +00005937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005938
5939rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5940 conftest$ac_exeext
5941 if test "${ac_cv_search_opendir+set}" = set; then
5942 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005944done
5945if test "${ac_cv_search_opendir+set}" = set; then
5946 :
5947else
5948 ac_cv_search_opendir=no
5949fi
5950rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005951LIBS=$ac_func_search_save_LIBS
5952fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005953{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5954echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005955ac_res=$ac_cv_search_opendir
5956if test "$ac_res" != no; then
5957 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005958
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005959fi
5960
5961fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005962
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005963{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5964echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005965if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005966 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005967else
5968 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005969/* confdefs.h. */
5970_ACEOF
5971cat confdefs.h >>conftest.$ac_ext
5972cat >>conftest.$ac_ext <<_ACEOF
5973/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005974#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005975int
5976main ()
5977{
5978return makedev(0, 0);
5979 ;
5980 return 0;
5981}
5982_ACEOF
5983rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005984if { (ac_try="$ac_link"
5985case "(($ac_try" in
5986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5987 *) ac_try_echo=$ac_try;;
5988esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005990 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005991 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005992 grep -v '^ *+' conftest.er1 >conftest.err
5993 rm -f conftest.er1
5994 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005996 (exit $ac_status); } && {
5997 test -z "$ac_c_werror_flag" ||
5998 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005999 } && test -s conftest$ac_exeext &&
6000 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006001 ac_cv_header_sys_types_h_makedev=yes
6002else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006004sed 's/^/| /' conftest.$ac_ext >&5
6005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006006 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006008
6009rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006010 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006011
6012fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006013{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6014echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006015
6016if test $ac_cv_header_sys_types_h_makedev = no; then
6017if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006018 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6019echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006020if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006021 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006022fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006023{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6024echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006025else
6026 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006027{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6028echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006029cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006030/* confdefs.h. */
6031_ACEOF
6032cat confdefs.h >>conftest.$ac_ext
6033cat >>conftest.$ac_ext <<_ACEOF
6034/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006035$ac_includes_default
6036#include <sys/mkdev.h>
6037_ACEOF
6038rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006039if { (ac_try="$ac_compile"
6040case "(($ac_try" in
6041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6042 *) ac_try_echo=$ac_try;;
6043esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006045 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006047 grep -v '^ *+' conftest.er1 >conftest.err
6048 rm -f conftest.er1
6049 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006051 (exit $ac_status); } && {
6052 test -z "$ac_c_werror_flag" ||
6053 test ! -s conftest.err
6054 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006055 ac_header_compiler=yes
6056else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006058sed 's/^/| /' conftest.$ac_ext >&5
6059
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006060 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006062
6063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006064{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6065echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006066
6067# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006068{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6069echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006071/* confdefs.h. */
6072_ACEOF
6073cat confdefs.h >>conftest.$ac_ext
6074cat >>conftest.$ac_ext <<_ACEOF
6075/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006076#include <sys/mkdev.h>
6077_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006078if { (ac_try="$ac_cpp conftest.$ac_ext"
6079case "(($ac_try" in
6080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6081 *) ac_try_echo=$ac_try;;
6082esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006084 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006085 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006086 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006087 rm -f conftest.er1
6088 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006090 (exit $ac_status); } >/dev/null && {
6091 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6092 test ! -s conftest.err
6093 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006094 ac_header_preproc=yes
6095else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006097sed 's/^/| /' conftest.$ac_ext >&5
6098
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006099 ac_header_preproc=no
6100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006101
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006103{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6104echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105
6106# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006107case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6108 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006109 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6110echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6111 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6112echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006113 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006114 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006115 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006116 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6117echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6118 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6119echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6120 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6121echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6122 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6123echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6124 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6125echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6126 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6127echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006128 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006129## -------------------------------------- ##
6130## Report this to http://bugs.python.org/ ##
6131## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006132_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006133 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006134 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006135esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006136{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6137echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006138if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006139 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006140else
6141 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6142fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006143{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6144echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006145
6146fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006147if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006148
6149cat >>confdefs.h <<\_ACEOF
6150#define MAJOR_IN_MKDEV 1
6151_ACEOF
6152
6153fi
6154
6155
6156
6157 if test $ac_cv_header_sys_mkdev_h = no; then
6158 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006159 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6160echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006161if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006162 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006164{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6165echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006166else
6167 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006168{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6169echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006170cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006171/* confdefs.h. */
6172_ACEOF
6173cat confdefs.h >>conftest.$ac_ext
6174cat >>conftest.$ac_ext <<_ACEOF
6175/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006176$ac_includes_default
6177#include <sys/sysmacros.h>
6178_ACEOF
6179rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006180if { (ac_try="$ac_compile"
6181case "(($ac_try" in
6182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6183 *) ac_try_echo=$ac_try;;
6184esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006186 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006187 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006188 grep -v '^ *+' conftest.er1 >conftest.err
6189 rm -f conftest.er1
6190 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006192 (exit $ac_status); } && {
6193 test -z "$ac_c_werror_flag" ||
6194 test ! -s conftest.err
6195 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006196 ac_header_compiler=yes
6197else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006199sed 's/^/| /' conftest.$ac_ext >&5
6200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006201 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006203
6204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006205{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6206echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006207
6208# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006209{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6210echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006212/* confdefs.h. */
6213_ACEOF
6214cat confdefs.h >>conftest.$ac_ext
6215cat >>conftest.$ac_ext <<_ACEOF
6216/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217#include <sys/sysmacros.h>
6218_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006219if { (ac_try="$ac_cpp conftest.$ac_ext"
6220case "(($ac_try" in
6221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6222 *) ac_try_echo=$ac_try;;
6223esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006225 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006226 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006227 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006228 rm -f conftest.er1
6229 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006231 (exit $ac_status); } >/dev/null && {
6232 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6233 test ! -s conftest.err
6234 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006235 ac_header_preproc=yes
6236else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006238sed 's/^/| /' conftest.$ac_ext >&5
6239
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006240 ac_header_preproc=no
6241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006242
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006244{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6245echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006246
6247# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006248case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6249 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006250 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6251echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6252 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6253echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006254 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006255 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006256 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006257 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6258echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6259 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6260echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6261 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6262echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6263 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6264echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6265 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6266echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6267 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6268echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006269 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006270## -------------------------------------- ##
6271## Report this to http://bugs.python.org/ ##
6272## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006273_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006274 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006275 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006277{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6278echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006279if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006280 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006281else
6282 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6283fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006284{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6285echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006286
6287fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006288if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006289
6290cat >>confdefs.h <<\_ACEOF
6291#define MAJOR_IN_SYSMACROS 1
6292_ACEOF
6293
6294fi
6295
6296
6297 fi
6298fi
6299
Michael W. Hudson54241132001-12-07 15:38:26 +00006300
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006301# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006302
6303for ac_header in term.h
6304do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006305as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6306{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6307echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006308if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006309 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006310else
6311 cat >conftest.$ac_ext <<_ACEOF
6312/* confdefs.h. */
6313_ACEOF
6314cat confdefs.h >>conftest.$ac_ext
6315cat >>conftest.$ac_ext <<_ACEOF
6316/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006317
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006318#ifdef HAVE_CURSES_H
6319#include <curses.h>
6320#endif
6321
6322
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006323#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006324_ACEOF
6325rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006326if { (ac_try="$ac_compile"
6327case "(($ac_try" in
6328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6329 *) ac_try_echo=$ac_try;;
6330esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006332 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006333 ac_status=$?
6334 grep -v '^ *+' conftest.er1 >conftest.err
6335 rm -f conftest.er1
6336 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006338 (exit $ac_status); } && {
6339 test -z "$ac_c_werror_flag" ||
6340 test ! -s conftest.err
6341 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006342 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006343else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006344 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006345sed 's/^/| /' conftest.$ac_ext >&5
6346
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006347 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006349
6350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006351fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006352ac_res=`eval echo '${'$as_ac_Header'}'`
6353 { echo "$as_me:$LINENO: result: $ac_res" >&5
6354echo "${ECHO_T}$ac_res" >&6; }
6355if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006356 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006357#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006358_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006359
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006360fi
6361
6362done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006363
6364
Martin v. Löwis11017b12006-01-14 18:12:57 +00006365# On Linux, netlink.h requires asm/types.h
6366
6367for ac_header in linux/netlink.h
6368do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006369as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6370{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6371echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006372if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006373 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006374else
6375 cat >conftest.$ac_ext <<_ACEOF
6376/* confdefs.h. */
6377_ACEOF
6378cat confdefs.h >>conftest.$ac_ext
6379cat >>conftest.$ac_ext <<_ACEOF
6380/* end confdefs.h. */
6381
6382#ifdef HAVE_ASM_TYPES_H
6383#include <asm/types.h>
6384#endif
6385#ifdef HAVE_SYS_SOCKET_H
6386#include <sys/socket.h>
6387#endif
6388
6389
6390#include <$ac_header>
6391_ACEOF
6392rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006393if { (ac_try="$ac_compile"
6394case "(($ac_try" in
6395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6396 *) ac_try_echo=$ac_try;;
6397esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006399 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006400 ac_status=$?
6401 grep -v '^ *+' conftest.er1 >conftest.err
6402 rm -f conftest.er1
6403 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006405 (exit $ac_status); } && {
6406 test -z "$ac_c_werror_flag" ||
6407 test ! -s conftest.err
6408 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006409 eval "$as_ac_Header=yes"
6410else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006411 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006412sed 's/^/| /' conftest.$ac_ext >&5
6413
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006414 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006416
6417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006418fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006419ac_res=`eval echo '${'$as_ac_Header'}'`
6420 { echo "$as_me:$LINENO: result: $ac_res" >&5
6421echo "${ECHO_T}$ac_res" >&6; }
6422if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006423 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006424#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006425_ACEOF
6426
6427fi
6428
6429done
6430
6431
Guido van Rossum627b2d71993-12-24 10:39:16 +00006432# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006433was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006434{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6435echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006436cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006437/* confdefs.h. */
6438_ACEOF
6439cat confdefs.h >>conftest.$ac_ext
6440cat >>conftest.$ac_ext <<_ACEOF
6441/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006442#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006443
6444_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006445if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006446 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006447 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006448else
Martin v. Löwis11437992002-04-12 09:54:03 +00006449
6450
6451cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006452#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006453_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006454
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006455
Guido van Rossum627b2d71993-12-24 10:39:16 +00006456fi
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006457rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006458
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006459{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6460echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006461
Neal Norwitz11690112002-07-30 01:08:28 +00006462# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006463{ echo "$as_me:$LINENO: checking for makedev" >&5
6464echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006465cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006466/* confdefs.h. */
6467_ACEOF
6468cat confdefs.h >>conftest.$ac_ext
6469cat >>conftest.$ac_ext <<_ACEOF
6470/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006471#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006472int
6473main ()
6474{
6475 makedev(0, 0)
6476 ;
6477 return 0;
6478}
6479_ACEOF
6480rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006481if { (ac_try="$ac_link"
6482case "(($ac_try" in
6483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6484 *) ac_try_echo=$ac_try;;
6485esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006487 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006488 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006489 grep -v '^ *+' conftest.er1 >conftest.err
6490 rm -f conftest.er1
6491 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006493 (exit $ac_status); } && {
6494 test -z "$ac_c_werror_flag" ||
6495 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006496 } && test -s conftest$ac_exeext &&
6497 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006498 ac_cv_has_makedev=yes
6499else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006501sed 's/^/| /' conftest.$ac_ext >&5
6502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006503 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006505
6506rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006507 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006508if test "$ac_cv_has_makedev" = "no"; then
6509 # we didn't link, try if _OSF_SOURCE will allow us to link
6510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006511/* confdefs.h. */
6512_ACEOF
6513cat confdefs.h >>conftest.$ac_ext
6514cat >>conftest.$ac_ext <<_ACEOF
6515/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006516
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006517#define _OSF_SOURCE 1
6518#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006519
Neal Norwitz11690112002-07-30 01:08:28 +00006520int
6521main ()
6522{
6523 makedev(0, 0)
6524 ;
6525 return 0;
6526}
6527_ACEOF
6528rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006529if { (ac_try="$ac_link"
6530case "(($ac_try" in
6531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6532 *) ac_try_echo=$ac_try;;
6533esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006535 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006537 grep -v '^ *+' conftest.er1 >conftest.err
6538 rm -f conftest.er1
6539 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006541 (exit $ac_status); } && {
6542 test -z "$ac_c_werror_flag" ||
6543 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006544 } && test -s conftest$ac_exeext &&
6545 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006546 ac_cv_has_makedev=yes
6547else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006549sed 's/^/| /' conftest.$ac_ext >&5
6550
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006551 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006553
6554rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006555 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006556 if test "$ac_cv_has_makedev" = "yes"; then
6557
6558cat >>confdefs.h <<\_ACEOF
6559#define _OSF_SOURCE 1
6560_ACEOF
6561
6562 fi
6563fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006564{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6565echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006566if test "$ac_cv_has_makedev" = "yes"; then
6567
6568cat >>confdefs.h <<\_ACEOF
6569#define HAVE_MAKEDEV 1
6570_ACEOF
6571
6572fi
6573
Martin v. Löwis399a6892002-10-04 10:22:02 +00006574# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6575# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6576# defined, but the compiler does not support pragma redefine_extname,
6577# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6578# structures (such as rlimit64) without declaring them. As a
6579# work-around, disable LFS on such configurations
6580
6581use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006582{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6583echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006584cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006585/* confdefs.h. */
6586_ACEOF
6587cat confdefs.h >>conftest.$ac_ext
6588cat >>conftest.$ac_ext <<_ACEOF
6589/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006590
6591#define _LARGEFILE_SOURCE 1
6592#define _FILE_OFFSET_BITS 64
6593#include <sys/resource.h>
6594
Martin v. Löwis399a6892002-10-04 10:22:02 +00006595int
6596main ()
6597{
6598struct rlimit foo;
6599 ;
6600 return 0;
6601}
6602_ACEOF
6603rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006604if { (ac_try="$ac_compile"
6605case "(($ac_try" in
6606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6607 *) ac_try_echo=$ac_try;;
6608esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006610 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006612 grep -v '^ *+' conftest.er1 >conftest.err
6613 rm -f conftest.er1
6614 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006616 (exit $ac_status); } && {
6617 test -z "$ac_c_werror_flag" ||
6618 test ! -s conftest.err
6619 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006620 sol_lfs_bug=no
6621else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006623sed 's/^/| /' conftest.$ac_ext >&5
6624
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006625 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006627
6628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006629{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6630echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006631if test "$sol_lfs_bug" = "yes"; then
6632 use_lfs=no
6633fi
6634
6635if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006636# Two defines needed to enable largefile support on various platforms
6637# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006638
Martin v. Löwis11437992002-04-12 09:54:03 +00006639cat >>confdefs.h <<\_ACEOF
6640#define _LARGEFILE_SOURCE 1
6641_ACEOF
6642
6643
6644cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006645#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006646_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006647
Martin v. Löwis399a6892002-10-04 10:22:02 +00006648fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006649
Guido van Rossum84e7b241996-08-19 21:59:00 +00006650# Add some code to confdefs.h so that the test for off_t works on SCO
6651cat >> confdefs.h <<\EOF
6652#if defined(SCO_DS)
6653#undef _OFF_T
6654#endif
6655EOF
6656
Guido van Rossumef2255b2000-03-10 22:30:29 +00006657# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006658{ echo "$as_me:$LINENO: checking for mode_t" >&5
6659echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006660if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006661 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006662else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006663 cat >conftest.$ac_ext <<_ACEOF
6664/* confdefs.h. */
6665_ACEOF
6666cat confdefs.h >>conftest.$ac_ext
6667cat >>conftest.$ac_ext <<_ACEOF
6668/* end confdefs.h. */
6669$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006670typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006671int
6672main ()
6673{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006674if ((ac__type_new_ *) 0)
6675 return 0;
6676if (sizeof (ac__type_new_))
6677 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006678 ;
6679 return 0;
6680}
6681_ACEOF
6682rm -f conftest.$ac_objext
6683if { (ac_try="$ac_compile"
6684case "(($ac_try" in
6685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6686 *) ac_try_echo=$ac_try;;
6687esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006689 (eval "$ac_compile") 2>conftest.er1
6690 ac_status=$?
6691 grep -v '^ *+' conftest.er1 >conftest.err
6692 rm -f conftest.er1
6693 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006695 (exit $ac_status); } && {
6696 test -z "$ac_c_werror_flag" ||
6697 test ! -s conftest.err
6698 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006699 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006700else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006702sed 's/^/| /' conftest.$ac_ext >&5
6703
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006704 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006705fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006706
6707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006708fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006709{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6710echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6711if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006712 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006713else
Martin v. Löwis11437992002-04-12 09:54:03 +00006714
6715cat >>confdefs.h <<_ACEOF
6716#define mode_t int
6717_ACEOF
6718
6719fi
6720
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006721{ echo "$as_me:$LINENO: checking for off_t" >&5
6722echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006723if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006724 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006725else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006726 cat >conftest.$ac_ext <<_ACEOF
6727/* confdefs.h. */
6728_ACEOF
6729cat confdefs.h >>conftest.$ac_ext
6730cat >>conftest.$ac_ext <<_ACEOF
6731/* end confdefs.h. */
6732$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006733typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006734int
6735main ()
6736{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006737if ((ac__type_new_ *) 0)
6738 return 0;
6739if (sizeof (ac__type_new_))
6740 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006741 ;
6742 return 0;
6743}
6744_ACEOF
6745rm -f conftest.$ac_objext
6746if { (ac_try="$ac_compile"
6747case "(($ac_try" in
6748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6749 *) ac_try_echo=$ac_try;;
6750esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006752 (eval "$ac_compile") 2>conftest.er1
6753 ac_status=$?
6754 grep -v '^ *+' conftest.er1 >conftest.err
6755 rm -f conftest.er1
6756 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006758 (exit $ac_status); } && {
6759 test -z "$ac_c_werror_flag" ||
6760 test ! -s conftest.err
6761 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006762 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006763else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006765sed 's/^/| /' conftest.$ac_ext >&5
6766
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006767 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006769
6770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006771fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006772{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6773echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6774if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006775 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006776else
Martin v. Löwis11437992002-04-12 09:54:03 +00006777
6778cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006779#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006780_ACEOF
6781
6782fi
6783
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006784{ echo "$as_me:$LINENO: checking for pid_t" >&5
6785echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006786if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006787 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006788else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006789 cat >conftest.$ac_ext <<_ACEOF
6790/* confdefs.h. */
6791_ACEOF
6792cat confdefs.h >>conftest.$ac_ext
6793cat >>conftest.$ac_ext <<_ACEOF
6794/* end confdefs.h. */
6795$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006796typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006797int
6798main ()
6799{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006800if ((ac__type_new_ *) 0)
6801 return 0;
6802if (sizeof (ac__type_new_))
6803 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006804 ;
6805 return 0;
6806}
6807_ACEOF
6808rm -f conftest.$ac_objext
6809if { (ac_try="$ac_compile"
6810case "(($ac_try" in
6811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6812 *) ac_try_echo=$ac_try;;
6813esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006815 (eval "$ac_compile") 2>conftest.er1
6816 ac_status=$?
6817 grep -v '^ *+' conftest.er1 >conftest.err
6818 rm -f conftest.er1
6819 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006821 (exit $ac_status); } && {
6822 test -z "$ac_c_werror_flag" ||
6823 test ! -s conftest.err
6824 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006825 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006826else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006828sed 's/^/| /' conftest.$ac_ext >&5
6829
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006830 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006832
6833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006834fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006835{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6836echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6837if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006838 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006839else
Martin v. Löwis11437992002-04-12 09:54:03 +00006840
6841cat >>confdefs.h <<_ACEOF
6842#define pid_t int
6843_ACEOF
6844
6845fi
6846
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006847{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6848echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006849if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006850 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006851else
6852 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006853/* confdefs.h. */
6854_ACEOF
6855cat confdefs.h >>conftest.$ac_ext
6856cat >>conftest.$ac_ext <<_ACEOF
6857/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006858#include <sys/types.h>
6859#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006860
Martin v. Löwis11437992002-04-12 09:54:03 +00006861int
6862main ()
6863{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006864return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006865 ;
6866 return 0;
6867}
6868_ACEOF
6869rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006870if { (ac_try="$ac_compile"
6871case "(($ac_try" in
6872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6873 *) ac_try_echo=$ac_try;;
6874esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006876 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006878 grep -v '^ *+' conftest.er1 >conftest.err
6879 rm -f conftest.er1
6880 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006882 (exit $ac_status); } && {
6883 test -z "$ac_c_werror_flag" ||
6884 test ! -s conftest.err
6885 } && test -s conftest.$ac_objext; then
6886 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006887else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006888 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006889sed 's/^/| /' conftest.$ac_ext >&5
6890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006891 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006893
6894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006895fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006896{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6897echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006898
Martin v. Löwis11437992002-04-12 09:54:03 +00006899cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006900#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006901_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006902
Michael W. Hudson54241132001-12-07 15:38:26 +00006903
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006904{ echo "$as_me:$LINENO: checking for size_t" >&5
6905echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006906if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006907 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006908else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006909 cat >conftest.$ac_ext <<_ACEOF
6910/* confdefs.h. */
6911_ACEOF
6912cat confdefs.h >>conftest.$ac_ext
6913cat >>conftest.$ac_ext <<_ACEOF
6914/* end confdefs.h. */
6915$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006916typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006917int
6918main ()
6919{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006920if ((ac__type_new_ *) 0)
6921 return 0;
6922if (sizeof (ac__type_new_))
6923 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006924 ;
6925 return 0;
6926}
6927_ACEOF
6928rm -f conftest.$ac_objext
6929if { (ac_try="$ac_compile"
6930case "(($ac_try" in
6931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6932 *) ac_try_echo=$ac_try;;
6933esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006935 (eval "$ac_compile") 2>conftest.er1
6936 ac_status=$?
6937 grep -v '^ *+' conftest.er1 >conftest.err
6938 rm -f conftest.er1
6939 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006941 (exit $ac_status); } && {
6942 test -z "$ac_c_werror_flag" ||
6943 test ! -s conftest.err
6944 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006945 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006946else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006948sed 's/^/| /' conftest.$ac_ext >&5
6949
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006950 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006952
6953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006954fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006955{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6956echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6957if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006958 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006959else
Martin v. Löwis11437992002-04-12 09:54:03 +00006960
6961cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006962#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006963_ACEOF
6964
6965fi
6966
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006967{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6968echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006969if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006970 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006971else
6972 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006973/* confdefs.h. */
6974_ACEOF
6975cat confdefs.h >>conftest.$ac_ext
6976cat >>conftest.$ac_ext <<_ACEOF
6977/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006978#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006979
6980_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006981if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006982 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006983 ac_cv_type_uid_t=yes
6984else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006985 ac_cv_type_uid_t=no
6986fi
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006987rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006988
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006989fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006990{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6991echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006992if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006993
Martin v. Löwis11437992002-04-12 09:54:03 +00006994cat >>confdefs.h <<\_ACEOF
6995#define uid_t int
6996_ACEOF
6997
6998
6999cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007000#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007001_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007002
7003fi
7004
Mark Dickinsonbd792642009-03-18 20:06:12 +00007005
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007006 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7007echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007008if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007009 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007010else
7011 ac_cv_c_uint32_t=no
7012 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7013 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7014 cat >conftest.$ac_ext <<_ACEOF
7015/* confdefs.h. */
7016_ACEOF
7017cat confdefs.h >>conftest.$ac_ext
7018cat >>conftest.$ac_ext <<_ACEOF
7019/* end confdefs.h. */
7020$ac_includes_default
7021int
7022main ()
7023{
7024static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7025test_array [0] = 0
7026
7027 ;
7028 return 0;
7029}
7030_ACEOF
7031rm -f conftest.$ac_objext
7032if { (ac_try="$ac_compile"
7033case "(($ac_try" in
7034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7035 *) ac_try_echo=$ac_try;;
7036esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007038 (eval "$ac_compile") 2>conftest.er1
7039 ac_status=$?
7040 grep -v '^ *+' conftest.er1 >conftest.err
7041 rm -f conftest.er1
7042 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007044 (exit $ac_status); } && {
7045 test -z "$ac_c_werror_flag" ||
7046 test ! -s conftest.err
7047 } && test -s conftest.$ac_objext; then
7048 case $ac_type in
7049 uint32_t) ac_cv_c_uint32_t=yes ;;
7050 *) ac_cv_c_uint32_t=$ac_type ;;
7051esac
7052
7053else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007054 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007055sed 's/^/| /' conftest.$ac_ext >&5
7056
7057
7058fi
7059
7060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7061 test "$ac_cv_c_uint32_t" != no && break
7062 done
7063fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007064{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7065echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007066 case $ac_cv_c_uint32_t in #(
7067 no|yes) ;; #(
7068 *)
7069
7070cat >>confdefs.h <<\_ACEOF
7071#define _UINT32_T 1
7072_ACEOF
7073
7074
7075cat >>confdefs.h <<_ACEOF
7076#define uint32_t $ac_cv_c_uint32_t
7077_ACEOF
7078;;
7079 esac
7080
7081
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007082 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7083echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007084if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007085 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007086else
7087 ac_cv_c_uint64_t=no
7088 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7089 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7090 cat >conftest.$ac_ext <<_ACEOF
7091/* confdefs.h. */
7092_ACEOF
7093cat confdefs.h >>conftest.$ac_ext
7094cat >>conftest.$ac_ext <<_ACEOF
7095/* end confdefs.h. */
7096$ac_includes_default
7097int
7098main ()
7099{
7100static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7101test_array [0] = 0
7102
7103 ;
7104 return 0;
7105}
7106_ACEOF
7107rm -f conftest.$ac_objext
7108if { (ac_try="$ac_compile"
7109case "(($ac_try" in
7110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7111 *) ac_try_echo=$ac_try;;
7112esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007114 (eval "$ac_compile") 2>conftest.er1
7115 ac_status=$?
7116 grep -v '^ *+' conftest.er1 >conftest.err
7117 rm -f conftest.er1
7118 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007120 (exit $ac_status); } && {
7121 test -z "$ac_c_werror_flag" ||
7122 test ! -s conftest.err
7123 } && test -s conftest.$ac_objext; then
7124 case $ac_type in
7125 uint64_t) ac_cv_c_uint64_t=yes ;;
7126 *) ac_cv_c_uint64_t=$ac_type ;;
7127esac
7128
7129else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007130 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007131sed 's/^/| /' conftest.$ac_ext >&5
7132
7133
7134fi
7135
7136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7137 test "$ac_cv_c_uint64_t" != no && break
7138 done
7139fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007140{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7141echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007142 case $ac_cv_c_uint64_t in #(
7143 no|yes) ;; #(
7144 *)
7145
7146cat >>confdefs.h <<\_ACEOF
7147#define _UINT64_T 1
7148_ACEOF
7149
7150
7151cat >>confdefs.h <<_ACEOF
7152#define uint64_t $ac_cv_c_uint64_t
7153_ACEOF
7154;;
7155 esac
7156
7157
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007158 { echo "$as_me:$LINENO: checking for int32_t" >&5
7159echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007160if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007161 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007162else
7163 ac_cv_c_int32_t=no
7164 for ac_type in 'int32_t' 'int' 'long int' \
7165 'long long int' 'short int' 'signed char'; do
7166 cat >conftest.$ac_ext <<_ACEOF
7167/* confdefs.h. */
7168_ACEOF
7169cat confdefs.h >>conftest.$ac_ext
7170cat >>conftest.$ac_ext <<_ACEOF
7171/* end confdefs.h. */
7172$ac_includes_default
7173int
7174main ()
7175{
7176static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7177test_array [0] = 0
7178
7179 ;
7180 return 0;
7181}
7182_ACEOF
7183rm -f conftest.$ac_objext
7184if { (ac_try="$ac_compile"
7185case "(($ac_try" in
7186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7187 *) ac_try_echo=$ac_try;;
7188esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007190 (eval "$ac_compile") 2>conftest.er1
7191 ac_status=$?
7192 grep -v '^ *+' conftest.er1 >conftest.err
7193 rm -f conftest.er1
7194 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007196 (exit $ac_status); } && {
7197 test -z "$ac_c_werror_flag" ||
7198 test ! -s conftest.err
7199 } && test -s conftest.$ac_objext; then
7200 cat >conftest.$ac_ext <<_ACEOF
7201/* confdefs.h. */
7202_ACEOF
7203cat confdefs.h >>conftest.$ac_ext
7204cat >>conftest.$ac_ext <<_ACEOF
7205/* end confdefs.h. */
7206$ac_includes_default
7207int
7208main ()
7209{
7210static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007211 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007212test_array [0] = 0
7213
7214 ;
7215 return 0;
7216}
7217_ACEOF
7218rm -f conftest.$ac_objext
7219if { (ac_try="$ac_compile"
7220case "(($ac_try" in
7221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7222 *) ac_try_echo=$ac_try;;
7223esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007225 (eval "$ac_compile") 2>conftest.er1
7226 ac_status=$?
7227 grep -v '^ *+' conftest.er1 >conftest.err
7228 rm -f conftest.er1
7229 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007231 (exit $ac_status); } && {
7232 test -z "$ac_c_werror_flag" ||
7233 test ! -s conftest.err
7234 } && test -s conftest.$ac_objext; then
7235 :
7236else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007237 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007238sed 's/^/| /' conftest.$ac_ext >&5
7239
7240 case $ac_type in
7241 int32_t) ac_cv_c_int32_t=yes ;;
7242 *) ac_cv_c_int32_t=$ac_type ;;
7243esac
7244
7245fi
7246
7247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7248else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007249 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007250sed 's/^/| /' conftest.$ac_ext >&5
7251
7252
7253fi
7254
7255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7256 test "$ac_cv_c_int32_t" != no && break
7257 done
7258fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007259{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7260echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007261 case $ac_cv_c_int32_t in #(
7262 no|yes) ;; #(
7263 *)
7264
7265cat >>confdefs.h <<_ACEOF
7266#define int32_t $ac_cv_c_int32_t
7267_ACEOF
7268;;
7269 esac
7270
7271
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007272 { echo "$as_me:$LINENO: checking for int64_t" >&5
7273echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007274if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007275 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007276else
7277 ac_cv_c_int64_t=no
7278 for ac_type in 'int64_t' 'int' 'long int' \
7279 'long long int' 'short int' 'signed char'; do
7280 cat >conftest.$ac_ext <<_ACEOF
7281/* confdefs.h. */
7282_ACEOF
7283cat confdefs.h >>conftest.$ac_ext
7284cat >>conftest.$ac_ext <<_ACEOF
7285/* end confdefs.h. */
7286$ac_includes_default
7287int
7288main ()
7289{
7290static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7291test_array [0] = 0
7292
7293 ;
7294 return 0;
7295}
7296_ACEOF
7297rm -f conftest.$ac_objext
7298if { (ac_try="$ac_compile"
7299case "(($ac_try" in
7300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7301 *) ac_try_echo=$ac_try;;
7302esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007304 (eval "$ac_compile") 2>conftest.er1
7305 ac_status=$?
7306 grep -v '^ *+' conftest.er1 >conftest.err
7307 rm -f conftest.er1
7308 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007310 (exit $ac_status); } && {
7311 test -z "$ac_c_werror_flag" ||
7312 test ! -s conftest.err
7313 } && test -s conftest.$ac_objext; then
7314 cat >conftest.$ac_ext <<_ACEOF
7315/* confdefs.h. */
7316_ACEOF
7317cat confdefs.h >>conftest.$ac_ext
7318cat >>conftest.$ac_ext <<_ACEOF
7319/* end confdefs.h. */
7320$ac_includes_default
7321int
7322main ()
7323{
7324static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007325 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007326test_array [0] = 0
7327
7328 ;
7329 return 0;
7330}
7331_ACEOF
7332rm -f conftest.$ac_objext
7333if { (ac_try="$ac_compile"
7334case "(($ac_try" in
7335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7336 *) ac_try_echo=$ac_try;;
7337esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007339 (eval "$ac_compile") 2>conftest.er1
7340 ac_status=$?
7341 grep -v '^ *+' conftest.er1 >conftest.err
7342 rm -f conftest.er1
7343 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007345 (exit $ac_status); } && {
7346 test -z "$ac_c_werror_flag" ||
7347 test ! -s conftest.err
7348 } && test -s conftest.$ac_objext; then
7349 :
7350else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007351 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007352sed 's/^/| /' conftest.$ac_ext >&5
7353
7354 case $ac_type in
7355 int64_t) ac_cv_c_int64_t=yes ;;
7356 *) ac_cv_c_int64_t=$ac_type ;;
7357esac
7358
7359fi
7360
7361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7362else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007363 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007364sed 's/^/| /' conftest.$ac_ext >&5
7365
7366
7367fi
7368
7369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7370 test "$ac_cv_c_int64_t" != no && break
7371 done
7372fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007373{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7374echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007375 case $ac_cv_c_int64_t in #(
7376 no|yes) ;; #(
7377 *)
7378
7379cat >>confdefs.h <<_ACEOF
7380#define int64_t $ac_cv_c_int64_t
7381_ACEOF
7382;;
7383 esac
7384
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007385{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7386echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007387if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007388 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007389else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007390 cat >conftest.$ac_ext <<_ACEOF
7391/* confdefs.h. */
7392_ACEOF
7393cat confdefs.h >>conftest.$ac_ext
7394cat >>conftest.$ac_ext <<_ACEOF
7395/* end confdefs.h. */
7396$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007397typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007398int
7399main ()
7400{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007401if ((ac__type_new_ *) 0)
7402 return 0;
7403if (sizeof (ac__type_new_))
7404 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007405 ;
7406 return 0;
7407}
7408_ACEOF
7409rm -f conftest.$ac_objext
7410if { (ac_try="$ac_compile"
7411case "(($ac_try" in
7412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7413 *) ac_try_echo=$ac_try;;
7414esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007416 (eval "$ac_compile") 2>conftest.er1
7417 ac_status=$?
7418 grep -v '^ *+' conftest.er1 >conftest.err
7419 rm -f conftest.er1
7420 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007422 (exit $ac_status); } && {
7423 test -z "$ac_c_werror_flag" ||
7424 test ! -s conftest.err
7425 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007426 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007427else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007428 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007429sed 's/^/| /' conftest.$ac_ext >&5
7430
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007431 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007433
7434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007435fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007436{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7437echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7438if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007439
7440cat >>confdefs.h <<\_ACEOF
7441#define HAVE_SSIZE_T 1
7442_ACEOF
7443
7444fi
7445
Jack Jansendd19cf82001-12-06 22:36:17 +00007446
Michael W. Hudson54241132001-12-07 15:38:26 +00007447# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007448# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007449{ echo "$as_me:$LINENO: checking for int" >&5
7450echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7451if test "${ac_cv_type_int+set}" = set; then
7452 echo $ECHO_N "(cached) $ECHO_C" >&6
7453else
7454 cat >conftest.$ac_ext <<_ACEOF
7455/* confdefs.h. */
7456_ACEOF
7457cat confdefs.h >>conftest.$ac_ext
7458cat >>conftest.$ac_ext <<_ACEOF
7459/* end confdefs.h. */
7460$ac_includes_default
7461typedef int ac__type_new_;
7462int
7463main ()
7464{
7465if ((ac__type_new_ *) 0)
7466 return 0;
7467if (sizeof (ac__type_new_))
7468 return 0;
7469 ;
7470 return 0;
7471}
7472_ACEOF
7473rm -f conftest.$ac_objext
7474if { (ac_try="$ac_compile"
7475case "(($ac_try" in
7476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7477 *) ac_try_echo=$ac_try;;
7478esac
7479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7480 (eval "$ac_compile") 2>conftest.er1
7481 ac_status=$?
7482 grep -v '^ *+' conftest.er1 >conftest.err
7483 rm -f conftest.er1
7484 cat conftest.err >&5
7485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7486 (exit $ac_status); } && {
7487 test -z "$ac_c_werror_flag" ||
7488 test ! -s conftest.err
7489 } && test -s conftest.$ac_objext; then
7490 ac_cv_type_int=yes
7491else
7492 echo "$as_me: failed program was:" >&5
7493sed 's/^/| /' conftest.$ac_ext >&5
7494
7495 ac_cv_type_int=no
7496fi
7497
7498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7499fi
7500{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7501echo "${ECHO_T}$ac_cv_type_int" >&6; }
7502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007503# The cast to long int works around a bug in the HP C Compiler
7504# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7505# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7506# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007507{ echo "$as_me:$LINENO: checking size of int" >&5
7508echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007509if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007510 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007511else
Martin v. Löwis11437992002-04-12 09:54:03 +00007512 if test "$cross_compiling" = yes; then
7513 # Depending upon the size, compute the lo and hi bounds.
7514cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007515/* confdefs.h. */
7516_ACEOF
7517cat confdefs.h >>conftest.$ac_ext
7518cat >>conftest.$ac_ext <<_ACEOF
7519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007520$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007521 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007522int
7523main ()
7524{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007525static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007526test_array [0] = 0
7527
7528 ;
7529 return 0;
7530}
7531_ACEOF
7532rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007533if { (ac_try="$ac_compile"
7534case "(($ac_try" in
7535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7536 *) ac_try_echo=$ac_try;;
7537esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007539 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007540 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007541 grep -v '^ *+' conftest.er1 >conftest.err
7542 rm -f conftest.er1
7543 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007545 (exit $ac_status); } && {
7546 test -z "$ac_c_werror_flag" ||
7547 test ! -s conftest.err
7548 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007549 ac_lo=0 ac_mid=0
7550 while :; do
7551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007552/* confdefs.h. */
7553_ACEOF
7554cat confdefs.h >>conftest.$ac_ext
7555cat >>conftest.$ac_ext <<_ACEOF
7556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007557$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007558 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007559int
7560main ()
7561{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007562static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007563test_array [0] = 0
7564
7565 ;
7566 return 0;
7567}
7568_ACEOF
7569rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007570if { (ac_try="$ac_compile"
7571case "(($ac_try" in
7572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7573 *) ac_try_echo=$ac_try;;
7574esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007576 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007577 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007578 grep -v '^ *+' conftest.er1 >conftest.err
7579 rm -f conftest.er1
7580 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007582 (exit $ac_status); } && {
7583 test -z "$ac_c_werror_flag" ||
7584 test ! -s conftest.err
7585 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007586 ac_hi=$ac_mid; break
7587else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007589sed 's/^/| /' conftest.$ac_ext >&5
7590
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007591 ac_lo=`expr $ac_mid + 1`
7592 if test $ac_lo -le $ac_mid; then
7593 ac_lo= ac_hi=
7594 break
7595 fi
7596 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007598
7599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007600 done
7601else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007603sed 's/^/| /' conftest.$ac_ext >&5
7604
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007605 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007606/* confdefs.h. */
7607_ACEOF
7608cat confdefs.h >>conftest.$ac_ext
7609cat >>conftest.$ac_ext <<_ACEOF
7610/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007611$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007612 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007613int
7614main ()
7615{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007616static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007617test_array [0] = 0
7618
7619 ;
7620 return 0;
7621}
7622_ACEOF
7623rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007624if { (ac_try="$ac_compile"
7625case "(($ac_try" in
7626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7627 *) ac_try_echo=$ac_try;;
7628esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007630 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007632 grep -v '^ *+' conftest.er1 >conftest.err
7633 rm -f conftest.er1
7634 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007636 (exit $ac_status); } && {
7637 test -z "$ac_c_werror_flag" ||
7638 test ! -s conftest.err
7639 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007640 ac_hi=-1 ac_mid=-1
7641 while :; do
7642 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007643/* confdefs.h. */
7644_ACEOF
7645cat confdefs.h >>conftest.$ac_ext
7646cat >>conftest.$ac_ext <<_ACEOF
7647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007648$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007649 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007650int
7651main ()
7652{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007653static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007654test_array [0] = 0
7655
7656 ;
7657 return 0;
7658}
7659_ACEOF
7660rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007661if { (ac_try="$ac_compile"
7662case "(($ac_try" in
7663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7664 *) ac_try_echo=$ac_try;;
7665esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007667 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007669 grep -v '^ *+' conftest.er1 >conftest.err
7670 rm -f conftest.er1
7671 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007673 (exit $ac_status); } && {
7674 test -z "$ac_c_werror_flag" ||
7675 test ! -s conftest.err
7676 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007677 ac_lo=$ac_mid; break
7678else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007680sed 's/^/| /' conftest.$ac_ext >&5
7681
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007682 ac_hi=`expr '(' $ac_mid ')' - 1`
7683 if test $ac_mid -le $ac_hi; then
7684 ac_lo= ac_hi=
7685 break
7686 fi
7687 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007689
7690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007691 done
7692else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007694sed 's/^/| /' conftest.$ac_ext >&5
7695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007696 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007698
7699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007701
7702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007703# Binary search between lo and hi bounds.
7704while test "x$ac_lo" != "x$ac_hi"; do
7705 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007707/* confdefs.h. */
7708_ACEOF
7709cat confdefs.h >>conftest.$ac_ext
7710cat >>conftest.$ac_ext <<_ACEOF
7711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007712$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007713 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007714int
7715main ()
7716{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007717static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007718test_array [0] = 0
7719
7720 ;
7721 return 0;
7722}
7723_ACEOF
7724rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007725if { (ac_try="$ac_compile"
7726case "(($ac_try" in
7727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7728 *) ac_try_echo=$ac_try;;
7729esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007731 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007733 grep -v '^ *+' conftest.er1 >conftest.err
7734 rm -f conftest.er1
7735 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007737 (exit $ac_status); } && {
7738 test -z "$ac_c_werror_flag" ||
7739 test ! -s conftest.err
7740 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007741 ac_hi=$ac_mid
7742else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007744sed 's/^/| /' conftest.$ac_ext >&5
7745
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007746 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007748
7749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007750done
7751case $ac_lo in
7752?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007753'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007754 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007755See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007756echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007757See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007758 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007759 else
7760 ac_cv_sizeof_int=0
7761 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007762esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007763else
Martin v. Löwis11437992002-04-12 09:54:03 +00007764 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007765/* confdefs.h. */
7766_ACEOF
7767cat confdefs.h >>conftest.$ac_ext
7768cat >>conftest.$ac_ext <<_ACEOF
7769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007770$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007771 typedef int ac__type_sizeof_;
7772static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7773static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007774#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007775#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007776int
7777main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007778{
Martin v. Löwis11437992002-04-12 09:54:03 +00007779
7780 FILE *f = fopen ("conftest.val", "w");
7781 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007782 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007783 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007784 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007785 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007786 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007787 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007788 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007789 }
7790 else
7791 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007792 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007793 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007794 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007795 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007796 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007798
7799 ;
7800 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007801}
Martin v. Löwis11437992002-04-12 09:54:03 +00007802_ACEOF
7803rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007804if { (ac_try="$ac_link"
7805case "(($ac_try" in
7806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7807 *) ac_try_echo=$ac_try;;
7808esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007811 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007813 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007814 { (case "(($ac_try" in
7815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7816 *) ac_try_echo=$ac_try;;
7817esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007819 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007820 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007822 (exit $ac_status); }; }; then
7823 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007824else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007825 echo "$as_me: program exited with status $ac_status" >&5
7826echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007827sed 's/^/| /' conftest.$ac_ext >&5
7828
Martin v. Löwis11437992002-04-12 09:54:03 +00007829( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007831 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007832See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007833echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007834See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007835 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007836 else
7837 ac_cv_sizeof_int=0
7838 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007840rm -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 +00007841fi
7842rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007843fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007844{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7845echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007846
7847
7848
Martin v. Löwis11437992002-04-12 09:54:03 +00007849cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007850#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007851_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007852
7853
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007854{ echo "$as_me:$LINENO: checking for long" >&5
7855echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7856if test "${ac_cv_type_long+set}" = set; then
7857 echo $ECHO_N "(cached) $ECHO_C" >&6
7858else
7859 cat >conftest.$ac_ext <<_ACEOF
7860/* confdefs.h. */
7861_ACEOF
7862cat confdefs.h >>conftest.$ac_ext
7863cat >>conftest.$ac_ext <<_ACEOF
7864/* end confdefs.h. */
7865$ac_includes_default
7866typedef long ac__type_new_;
7867int
7868main ()
7869{
7870if ((ac__type_new_ *) 0)
7871 return 0;
7872if (sizeof (ac__type_new_))
7873 return 0;
7874 ;
7875 return 0;
7876}
7877_ACEOF
7878rm -f conftest.$ac_objext
7879if { (ac_try="$ac_compile"
7880case "(($ac_try" in
7881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7882 *) ac_try_echo=$ac_try;;
7883esac
7884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7885 (eval "$ac_compile") 2>conftest.er1
7886 ac_status=$?
7887 grep -v '^ *+' conftest.er1 >conftest.err
7888 rm -f conftest.er1
7889 cat conftest.err >&5
7890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7891 (exit $ac_status); } && {
7892 test -z "$ac_c_werror_flag" ||
7893 test ! -s conftest.err
7894 } && test -s conftest.$ac_objext; then
7895 ac_cv_type_long=yes
7896else
7897 echo "$as_me: failed program was:" >&5
7898sed 's/^/| /' conftest.$ac_ext >&5
7899
7900 ac_cv_type_long=no
7901fi
7902
7903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7904fi
7905{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7906echo "${ECHO_T}$ac_cv_type_long" >&6; }
7907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007908# The cast to long int works around a bug in the HP C Compiler
7909# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7910# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7911# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007912{ echo "$as_me:$LINENO: checking size of long" >&5
7913echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007914if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007915 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007916else
Martin v. Löwis11437992002-04-12 09:54:03 +00007917 if test "$cross_compiling" = yes; then
7918 # Depending upon the size, compute the lo and hi bounds.
7919cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007920/* confdefs.h. */
7921_ACEOF
7922cat confdefs.h >>conftest.$ac_ext
7923cat >>conftest.$ac_ext <<_ACEOF
7924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007925$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007926 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007927int
7928main ()
7929{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007930static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007931test_array [0] = 0
7932
7933 ;
7934 return 0;
7935}
7936_ACEOF
7937rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007938if { (ac_try="$ac_compile"
7939case "(($ac_try" in
7940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7941 *) ac_try_echo=$ac_try;;
7942esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007945 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007946 grep -v '^ *+' conftest.er1 >conftest.err
7947 rm -f conftest.er1
7948 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007950 (exit $ac_status); } && {
7951 test -z "$ac_c_werror_flag" ||
7952 test ! -s conftest.err
7953 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007954 ac_lo=0 ac_mid=0
7955 while :; do
7956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007957/* confdefs.h. */
7958_ACEOF
7959cat confdefs.h >>conftest.$ac_ext
7960cat >>conftest.$ac_ext <<_ACEOF
7961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007962$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007963 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007964int
7965main ()
7966{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007967static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007968test_array [0] = 0
7969
7970 ;
7971 return 0;
7972}
7973_ACEOF
7974rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007975if { (ac_try="$ac_compile"
7976case "(($ac_try" in
7977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7978 *) ac_try_echo=$ac_try;;
7979esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007983 grep -v '^ *+' conftest.er1 >conftest.err
7984 rm -f conftest.er1
7985 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007987 (exit $ac_status); } && {
7988 test -z "$ac_c_werror_flag" ||
7989 test ! -s conftest.err
7990 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007991 ac_hi=$ac_mid; break
7992else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007994sed 's/^/| /' conftest.$ac_ext >&5
7995
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996 ac_lo=`expr $ac_mid + 1`
7997 if test $ac_lo -le $ac_mid; then
7998 ac_lo= ac_hi=
7999 break
8000 fi
8001 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008003
8004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008005 done
8006else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008008sed 's/^/| /' conftest.$ac_ext >&5
8009
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008011/* confdefs.h. */
8012_ACEOF
8013cat confdefs.h >>conftest.$ac_ext
8014cat >>conftest.$ac_ext <<_ACEOF
8015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008016$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008017 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008018int
8019main ()
8020{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008021static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008022test_array [0] = 0
8023
8024 ;
8025 return 0;
8026}
8027_ACEOF
8028rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008029if { (ac_try="$ac_compile"
8030case "(($ac_try" in
8031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8032 *) ac_try_echo=$ac_try;;
8033esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008035 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008036 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008037 grep -v '^ *+' conftest.er1 >conftest.err
8038 rm -f conftest.er1
8039 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008041 (exit $ac_status); } && {
8042 test -z "$ac_c_werror_flag" ||
8043 test ! -s conftest.err
8044 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008045 ac_hi=-1 ac_mid=-1
8046 while :; do
8047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008048/* confdefs.h. */
8049_ACEOF
8050cat confdefs.h >>conftest.$ac_ext
8051cat >>conftest.$ac_ext <<_ACEOF
8052/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008053$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008054 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008055int
8056main ()
8057{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008058static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008059test_array [0] = 0
8060
8061 ;
8062 return 0;
8063}
8064_ACEOF
8065rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066if { (ac_try="$ac_compile"
8067case "(($ac_try" in
8068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8069 *) ac_try_echo=$ac_try;;
8070esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008072 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008073 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008074 grep -v '^ *+' conftest.er1 >conftest.err
8075 rm -f conftest.er1
8076 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008078 (exit $ac_status); } && {
8079 test -z "$ac_c_werror_flag" ||
8080 test ! -s conftest.err
8081 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008082 ac_lo=$ac_mid; break
8083else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008085sed 's/^/| /' conftest.$ac_ext >&5
8086
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008087 ac_hi=`expr '(' $ac_mid ')' - 1`
8088 if test $ac_mid -le $ac_hi; then
8089 ac_lo= ac_hi=
8090 break
8091 fi
8092 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008094
8095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008096 done
8097else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008099sed 's/^/| /' conftest.$ac_ext >&5
8100
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008101 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008103
8104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008106
8107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008108# Binary search between lo and hi bounds.
8109while test "x$ac_lo" != "x$ac_hi"; do
8110 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8111 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008112/* confdefs.h. */
8113_ACEOF
8114cat confdefs.h >>conftest.$ac_ext
8115cat >>conftest.$ac_ext <<_ACEOF
8116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008117$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008118 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008119int
8120main ()
8121{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008122static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008123test_array [0] = 0
8124
8125 ;
8126 return 0;
8127}
8128_ACEOF
8129rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008130if { (ac_try="$ac_compile"
8131case "(($ac_try" in
8132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8133 *) ac_try_echo=$ac_try;;
8134esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008136 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008138 grep -v '^ *+' conftest.er1 >conftest.err
8139 rm -f conftest.er1
8140 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008142 (exit $ac_status); } && {
8143 test -z "$ac_c_werror_flag" ||
8144 test ! -s conftest.err
8145 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008146 ac_hi=$ac_mid
8147else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008149sed 's/^/| /' conftest.$ac_ext >&5
8150
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008151 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008153
8154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008155done
8156case $ac_lo in
8157?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008158'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008159 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008160See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008161echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008162See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008163 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008164 else
8165 ac_cv_sizeof_long=0
8166 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008167esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008168else
Martin v. Löwis11437992002-04-12 09:54:03 +00008169 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008170/* confdefs.h. */
8171_ACEOF
8172cat confdefs.h >>conftest.$ac_ext
8173cat >>conftest.$ac_ext <<_ACEOF
8174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008175$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008176 typedef long ac__type_sizeof_;
8177static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8178static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008179#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008180#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008181int
8182main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008183{
Martin v. Löwis11437992002-04-12 09:54:03 +00008184
8185 FILE *f = fopen ("conftest.val", "w");
8186 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008187 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008188 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008189 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008190 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008191 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008192 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008193 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008194 }
8195 else
8196 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008197 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008198 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008199 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008200 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008201 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008202 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008203
8204 ;
8205 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008206}
Martin v. Löwis11437992002-04-12 09:54:03 +00008207_ACEOF
8208rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008209if { (ac_try="$ac_link"
8210case "(($ac_try" in
8211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8212 *) ac_try_echo=$ac_try;;
8213esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008215 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008216 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008218 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219 { (case "(($ac_try" in
8220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8221 *) ac_try_echo=$ac_try;;
8222esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008224 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008225 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008227 (exit $ac_status); }; }; then
8228 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008229else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008230 echo "$as_me: program exited with status $ac_status" >&5
8231echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008232sed 's/^/| /' conftest.$ac_ext >&5
8233
Martin v. Löwis11437992002-04-12 09:54:03 +00008234( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008236 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008237See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008238echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008239See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008240 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008241 else
8242 ac_cv_sizeof_long=0
8243 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008245rm -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 +00008246fi
8247rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008248fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008249{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8250echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008251
8252
8253
Martin v. Löwis11437992002-04-12 09:54:03 +00008254cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008255#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008256_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008257
8258
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008259{ echo "$as_me:$LINENO: checking for void *" >&5
8260echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8261if test "${ac_cv_type_void_p+set}" = set; then
8262 echo $ECHO_N "(cached) $ECHO_C" >&6
8263else
8264 cat >conftest.$ac_ext <<_ACEOF
8265/* confdefs.h. */
8266_ACEOF
8267cat confdefs.h >>conftest.$ac_ext
8268cat >>conftest.$ac_ext <<_ACEOF
8269/* end confdefs.h. */
8270$ac_includes_default
8271typedef void * ac__type_new_;
8272int
8273main ()
8274{
8275if ((ac__type_new_ *) 0)
8276 return 0;
8277if (sizeof (ac__type_new_))
8278 return 0;
8279 ;
8280 return 0;
8281}
8282_ACEOF
8283rm -f conftest.$ac_objext
8284if { (ac_try="$ac_compile"
8285case "(($ac_try" in
8286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8287 *) ac_try_echo=$ac_try;;
8288esac
8289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8290 (eval "$ac_compile") 2>conftest.er1
8291 ac_status=$?
8292 grep -v '^ *+' conftest.er1 >conftest.err
8293 rm -f conftest.er1
8294 cat conftest.err >&5
8295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8296 (exit $ac_status); } && {
8297 test -z "$ac_c_werror_flag" ||
8298 test ! -s conftest.err
8299 } && test -s conftest.$ac_objext; then
8300 ac_cv_type_void_p=yes
8301else
8302 echo "$as_me: failed program was:" >&5
8303sed 's/^/| /' conftest.$ac_ext >&5
8304
8305 ac_cv_type_void_p=no
8306fi
8307
8308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8309fi
8310{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8311echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8312
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008313# The cast to long int works around a bug in the HP C Compiler
8314# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8315# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8316# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008317{ echo "$as_me:$LINENO: checking size of void *" >&5
8318echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008319if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008320 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008321else
Martin v. Löwis11437992002-04-12 09:54:03 +00008322 if test "$cross_compiling" = yes; then
8323 # Depending upon the size, compute the lo and hi bounds.
8324cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008325/* confdefs.h. */
8326_ACEOF
8327cat confdefs.h >>conftest.$ac_ext
8328cat >>conftest.$ac_ext <<_ACEOF
8329/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008330$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008331 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008332int
8333main ()
8334{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008335static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008336test_array [0] = 0
8337
8338 ;
8339 return 0;
8340}
8341_ACEOF
8342rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008343if { (ac_try="$ac_compile"
8344case "(($ac_try" in
8345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8346 *) ac_try_echo=$ac_try;;
8347esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008349 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008350 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008351 grep -v '^ *+' conftest.er1 >conftest.err
8352 rm -f conftest.er1
8353 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008355 (exit $ac_status); } && {
8356 test -z "$ac_c_werror_flag" ||
8357 test ! -s conftest.err
8358 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008359 ac_lo=0 ac_mid=0
8360 while :; do
8361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008362/* confdefs.h. */
8363_ACEOF
8364cat confdefs.h >>conftest.$ac_ext
8365cat >>conftest.$ac_ext <<_ACEOF
8366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008367$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008368 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008369int
8370main ()
8371{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008372static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008373test_array [0] = 0
8374
8375 ;
8376 return 0;
8377}
8378_ACEOF
8379rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008380if { (ac_try="$ac_compile"
8381case "(($ac_try" in
8382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8383 *) ac_try_echo=$ac_try;;
8384esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008386 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008387 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008388 grep -v '^ *+' conftest.er1 >conftest.err
8389 rm -f conftest.er1
8390 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008392 (exit $ac_status); } && {
8393 test -z "$ac_c_werror_flag" ||
8394 test ! -s conftest.err
8395 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008396 ac_hi=$ac_mid; break
8397else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008399sed 's/^/| /' conftest.$ac_ext >&5
8400
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008401 ac_lo=`expr $ac_mid + 1`
8402 if test $ac_lo -le $ac_mid; then
8403 ac_lo= ac_hi=
8404 break
8405 fi
8406 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008408
8409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008410 done
8411else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008412 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008413sed 's/^/| /' conftest.$ac_ext >&5
8414
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008415 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008416/* confdefs.h. */
8417_ACEOF
8418cat confdefs.h >>conftest.$ac_ext
8419cat >>conftest.$ac_ext <<_ACEOF
8420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008421$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008422 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008423int
8424main ()
8425{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008426static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008427test_array [0] = 0
8428
8429 ;
8430 return 0;
8431}
8432_ACEOF
8433rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008434if { (ac_try="$ac_compile"
8435case "(($ac_try" in
8436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8437 *) ac_try_echo=$ac_try;;
8438esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008440 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008441 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008442 grep -v '^ *+' conftest.er1 >conftest.err
8443 rm -f conftest.er1
8444 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008446 (exit $ac_status); } && {
8447 test -z "$ac_c_werror_flag" ||
8448 test ! -s conftest.err
8449 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008450 ac_hi=-1 ac_mid=-1
8451 while :; do
8452 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008453/* confdefs.h. */
8454_ACEOF
8455cat confdefs.h >>conftest.$ac_ext
8456cat >>conftest.$ac_ext <<_ACEOF
8457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008458$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008459 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008460int
8461main ()
8462{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008463static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008464test_array [0] = 0
8465
8466 ;
8467 return 0;
8468}
8469_ACEOF
8470rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008471if { (ac_try="$ac_compile"
8472case "(($ac_try" in
8473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8474 *) ac_try_echo=$ac_try;;
8475esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008477 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008478 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008479 grep -v '^ *+' conftest.er1 >conftest.err
8480 rm -f conftest.er1
8481 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008483 (exit $ac_status); } && {
8484 test -z "$ac_c_werror_flag" ||
8485 test ! -s conftest.err
8486 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 ac_lo=$ac_mid; break
8488else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008490sed 's/^/| /' conftest.$ac_ext >&5
8491
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008492 ac_hi=`expr '(' $ac_mid ')' - 1`
8493 if test $ac_mid -le $ac_hi; then
8494 ac_lo= ac_hi=
8495 break
8496 fi
8497 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008499
8500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008501 done
8502else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008503 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008504sed 's/^/| /' conftest.$ac_ext >&5
8505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008506 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008508
8509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511
8512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008513# Binary search between lo and hi bounds.
8514while test "x$ac_lo" != "x$ac_hi"; do
8515 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008517/* confdefs.h. */
8518_ACEOF
8519cat confdefs.h >>conftest.$ac_ext
8520cat >>conftest.$ac_ext <<_ACEOF
8521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008522$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008523 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008524int
8525main ()
8526{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008527static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008528test_array [0] = 0
8529
8530 ;
8531 return 0;
8532}
8533_ACEOF
8534rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008535if { (ac_try="$ac_compile"
8536case "(($ac_try" in
8537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8538 *) ac_try_echo=$ac_try;;
8539esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008541 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008542 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008543 grep -v '^ *+' conftest.er1 >conftest.err
8544 rm -f conftest.er1
8545 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008547 (exit $ac_status); } && {
8548 test -z "$ac_c_werror_flag" ||
8549 test ! -s conftest.err
8550 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008551 ac_hi=$ac_mid
8552else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008553 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008554sed 's/^/| /' conftest.$ac_ext >&5
8555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558
8559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008560done
8561case $ac_lo in
8562?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008563'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008564 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008565See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008566echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008567See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008568 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008569 else
8570 ac_cv_sizeof_void_p=0
8571 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008572esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008573else
Martin v. Löwis11437992002-04-12 09:54:03 +00008574 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008575/* confdefs.h. */
8576_ACEOF
8577cat confdefs.h >>conftest.$ac_ext
8578cat >>conftest.$ac_ext <<_ACEOF
8579/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008580$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008581 typedef void * ac__type_sizeof_;
8582static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8583static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008584#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008585#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008586int
8587main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008588{
Martin v. Löwis11437992002-04-12 09:54:03 +00008589
8590 FILE *f = fopen ("conftest.val", "w");
8591 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008592 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008593 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008594 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008595 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008596 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008597 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008598 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008599 }
8600 else
8601 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008602 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008603 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008605 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008606 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008607 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008608
8609 ;
8610 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008611}
Martin v. Löwis11437992002-04-12 09:54:03 +00008612_ACEOF
8613rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008614if { (ac_try="$ac_link"
8615case "(($ac_try" in
8616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8617 *) ac_try_echo=$ac_try;;
8618esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008620 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008621 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008623 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008624 { (case "(($ac_try" in
8625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8626 *) ac_try_echo=$ac_try;;
8627esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008632 (exit $ac_status); }; }; then
8633 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008634else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008635 echo "$as_me: program exited with status $ac_status" >&5
8636echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008637sed 's/^/| /' conftest.$ac_ext >&5
8638
Martin v. Löwis11437992002-04-12 09:54:03 +00008639( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008640if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008641 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008642See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008643echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008644See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008645 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008646 else
8647 ac_cv_sizeof_void_p=0
8648 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650rm -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 +00008651fi
8652rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008653fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008654{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8655echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008656
8657
8658
Martin v. Löwis11437992002-04-12 09:54:03 +00008659cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008660#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008661_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008662
8663
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008664{ echo "$as_me:$LINENO: checking for short" >&5
8665echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8666if test "${ac_cv_type_short+set}" = set; then
8667 echo $ECHO_N "(cached) $ECHO_C" >&6
8668else
8669 cat >conftest.$ac_ext <<_ACEOF
8670/* confdefs.h. */
8671_ACEOF
8672cat confdefs.h >>conftest.$ac_ext
8673cat >>conftest.$ac_ext <<_ACEOF
8674/* end confdefs.h. */
8675$ac_includes_default
8676typedef short ac__type_new_;
8677int
8678main ()
8679{
8680if ((ac__type_new_ *) 0)
8681 return 0;
8682if (sizeof (ac__type_new_))
8683 return 0;
8684 ;
8685 return 0;
8686}
8687_ACEOF
8688rm -f conftest.$ac_objext
8689if { (ac_try="$ac_compile"
8690case "(($ac_try" in
8691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8692 *) ac_try_echo=$ac_try;;
8693esac
8694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8695 (eval "$ac_compile") 2>conftest.er1
8696 ac_status=$?
8697 grep -v '^ *+' conftest.er1 >conftest.err
8698 rm -f conftest.er1
8699 cat conftest.err >&5
8700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8701 (exit $ac_status); } && {
8702 test -z "$ac_c_werror_flag" ||
8703 test ! -s conftest.err
8704 } && test -s conftest.$ac_objext; then
8705 ac_cv_type_short=yes
8706else
8707 echo "$as_me: failed program was:" >&5
8708sed 's/^/| /' conftest.$ac_ext >&5
8709
8710 ac_cv_type_short=no
8711fi
8712
8713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8714fi
8715{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8716echo "${ECHO_T}$ac_cv_type_short" >&6; }
8717
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008718# The cast to long int works around a bug in the HP C Compiler
8719# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8720# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8721# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008722{ echo "$as_me:$LINENO: checking size of short" >&5
8723echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008724if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008725 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008726else
Martin v. Löwis11437992002-04-12 09:54:03 +00008727 if test "$cross_compiling" = yes; then
8728 # Depending upon the size, compute the lo and hi bounds.
8729cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008730/* confdefs.h. */
8731_ACEOF
8732cat confdefs.h >>conftest.$ac_ext
8733cat >>conftest.$ac_ext <<_ACEOF
8734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008735$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008736 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008737int
8738main ()
8739{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008740static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008741test_array [0] = 0
8742
8743 ;
8744 return 0;
8745}
8746_ACEOF
8747rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008748if { (ac_try="$ac_compile"
8749case "(($ac_try" in
8750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8751 *) ac_try_echo=$ac_try;;
8752esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008754 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008755 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008756 grep -v '^ *+' conftest.er1 >conftest.err
8757 rm -f conftest.er1
8758 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008760 (exit $ac_status); } && {
8761 test -z "$ac_c_werror_flag" ||
8762 test ! -s conftest.err
8763 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008764 ac_lo=0 ac_mid=0
8765 while :; do
8766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008767/* confdefs.h. */
8768_ACEOF
8769cat confdefs.h >>conftest.$ac_ext
8770cat >>conftest.$ac_ext <<_ACEOF
8771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008772$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008773 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008774int
8775main ()
8776{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008777static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008778test_array [0] = 0
8779
8780 ;
8781 return 0;
8782}
8783_ACEOF
8784rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008785if { (ac_try="$ac_compile"
8786case "(($ac_try" in
8787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8788 *) ac_try_echo=$ac_try;;
8789esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008791 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008792 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008793 grep -v '^ *+' conftest.er1 >conftest.err
8794 rm -f conftest.er1
8795 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008797 (exit $ac_status); } && {
8798 test -z "$ac_c_werror_flag" ||
8799 test ! -s conftest.err
8800 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008801 ac_hi=$ac_mid; break
8802else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008804sed 's/^/| /' conftest.$ac_ext >&5
8805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008806 ac_lo=`expr $ac_mid + 1`
8807 if test $ac_lo -le $ac_mid; then
8808 ac_lo= ac_hi=
8809 break
8810 fi
8811 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008813
8814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008815 done
8816else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008818sed 's/^/| /' conftest.$ac_ext >&5
8819
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008820 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008821/* confdefs.h. */
8822_ACEOF
8823cat confdefs.h >>conftest.$ac_ext
8824cat >>conftest.$ac_ext <<_ACEOF
8825/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008826$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008827 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008828int
8829main ()
8830{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008831static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008832test_array [0] = 0
8833
8834 ;
8835 return 0;
8836}
8837_ACEOF
8838rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008839if { (ac_try="$ac_compile"
8840case "(($ac_try" in
8841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8842 *) ac_try_echo=$ac_try;;
8843esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008845 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008847 grep -v '^ *+' conftest.er1 >conftest.err
8848 rm -f conftest.er1
8849 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851 (exit $ac_status); } && {
8852 test -z "$ac_c_werror_flag" ||
8853 test ! -s conftest.err
8854 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008855 ac_hi=-1 ac_mid=-1
8856 while :; do
8857 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008858/* confdefs.h. */
8859_ACEOF
8860cat confdefs.h >>conftest.$ac_ext
8861cat >>conftest.$ac_ext <<_ACEOF
8862/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008863$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008864 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008865int
8866main ()
8867{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008868static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008869test_array [0] = 0
8870
8871 ;
8872 return 0;
8873}
8874_ACEOF
8875rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008876if { (ac_try="$ac_compile"
8877case "(($ac_try" in
8878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8879 *) ac_try_echo=$ac_try;;
8880esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008882 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008884 grep -v '^ *+' conftest.er1 >conftest.err
8885 rm -f conftest.er1
8886 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008888 (exit $ac_status); } && {
8889 test -z "$ac_c_werror_flag" ||
8890 test ! -s conftest.err
8891 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 ac_lo=$ac_mid; break
8893else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008895sed 's/^/| /' conftest.$ac_ext >&5
8896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008897 ac_hi=`expr '(' $ac_mid ')' - 1`
8898 if test $ac_mid -le $ac_hi; then
8899 ac_lo= ac_hi=
8900 break
8901 fi
8902 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008904
8905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008906 done
8907else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008909sed 's/^/| /' conftest.$ac_ext >&5
8910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008911 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008913
8914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008916
8917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008918# Binary search between lo and hi bounds.
8919while test "x$ac_lo" != "x$ac_hi"; do
8920 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8921 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008922/* confdefs.h. */
8923_ACEOF
8924cat confdefs.h >>conftest.$ac_ext
8925cat >>conftest.$ac_ext <<_ACEOF
8926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008927$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008928 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008929int
8930main ()
8931{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008932static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008933test_array [0] = 0
8934
8935 ;
8936 return 0;
8937}
8938_ACEOF
8939rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008940if { (ac_try="$ac_compile"
8941case "(($ac_try" in
8942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8943 *) ac_try_echo=$ac_try;;
8944esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008946 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008947 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008948 grep -v '^ *+' conftest.er1 >conftest.err
8949 rm -f conftest.er1
8950 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008952 (exit $ac_status); } && {
8953 test -z "$ac_c_werror_flag" ||
8954 test ! -s conftest.err
8955 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008956 ac_hi=$ac_mid
8957else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008958 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008959sed 's/^/| /' conftest.$ac_ext >&5
8960
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008961 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008963
8964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008965done
8966case $ac_lo in
8967?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008968'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008969 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008970See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008971echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008972See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008973 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008974 else
8975 ac_cv_sizeof_short=0
8976 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008977esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008978else
Martin v. Löwis11437992002-04-12 09:54:03 +00008979 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008980/* confdefs.h. */
8981_ACEOF
8982cat confdefs.h >>conftest.$ac_ext
8983cat >>conftest.$ac_ext <<_ACEOF
8984/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008985$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008986 typedef short ac__type_sizeof_;
8987static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8988static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008989#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008990#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008991int
8992main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008993{
Martin v. Löwis11437992002-04-12 09:54:03 +00008994
8995 FILE *f = fopen ("conftest.val", "w");
8996 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008997 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008998 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008999 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009000 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009001 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009002 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009003 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009004 }
9005 else
9006 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009007 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009008 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009009 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009010 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009011 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009012 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009013
9014 ;
9015 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009016}
Martin v. Löwis11437992002-04-12 09:54:03 +00009017_ACEOF
9018rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009019if { (ac_try="$ac_link"
9020case "(($ac_try" in
9021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9022 *) ac_try_echo=$ac_try;;
9023esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009025 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009026 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009028 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009029 { (case "(($ac_try" in
9030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9031 *) ac_try_echo=$ac_try;;
9032esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009034 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009035 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009037 (exit $ac_status); }; }; then
9038 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009039else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009040 echo "$as_me: program exited with status $ac_status" >&5
9041echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009042sed 's/^/| /' conftest.$ac_ext >&5
9043
Martin v. Löwis11437992002-04-12 09:54:03 +00009044( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009045if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009046 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009047See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009048echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009049See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009050 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009051 else
9052 ac_cv_sizeof_short=0
9053 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009055rm -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 +00009056fi
9057rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009058fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009059{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9060echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009061
9062
9063
Martin v. Löwis11437992002-04-12 09:54:03 +00009064cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009065#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009066_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009067
9068
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009069{ echo "$as_me:$LINENO: checking for float" >&5
9070echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9071if test "${ac_cv_type_float+set}" = set; then
9072 echo $ECHO_N "(cached) $ECHO_C" >&6
9073else
9074 cat >conftest.$ac_ext <<_ACEOF
9075/* confdefs.h. */
9076_ACEOF
9077cat confdefs.h >>conftest.$ac_ext
9078cat >>conftest.$ac_ext <<_ACEOF
9079/* end confdefs.h. */
9080$ac_includes_default
9081typedef float ac__type_new_;
9082int
9083main ()
9084{
9085if ((ac__type_new_ *) 0)
9086 return 0;
9087if (sizeof (ac__type_new_))
9088 return 0;
9089 ;
9090 return 0;
9091}
9092_ACEOF
9093rm -f conftest.$ac_objext
9094if { (ac_try="$ac_compile"
9095case "(($ac_try" in
9096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9097 *) ac_try_echo=$ac_try;;
9098esac
9099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9100 (eval "$ac_compile") 2>conftest.er1
9101 ac_status=$?
9102 grep -v '^ *+' conftest.er1 >conftest.err
9103 rm -f conftest.er1
9104 cat conftest.err >&5
9105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9106 (exit $ac_status); } && {
9107 test -z "$ac_c_werror_flag" ||
9108 test ! -s conftest.err
9109 } && test -s conftest.$ac_objext; then
9110 ac_cv_type_float=yes
9111else
9112 echo "$as_me: failed program was:" >&5
9113sed 's/^/| /' conftest.$ac_ext >&5
9114
9115 ac_cv_type_float=no
9116fi
9117
9118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9119fi
9120{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9121echo "${ECHO_T}$ac_cv_type_float" >&6; }
9122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009123# The cast to long int works around a bug in the HP C Compiler
9124# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9125# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9126# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009127{ echo "$as_me:$LINENO: checking size of float" >&5
9128echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009129if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009130 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009131else
Martin v. Löwis11437992002-04-12 09:54:03 +00009132 if test "$cross_compiling" = yes; then
9133 # Depending upon the size, compute the lo and hi bounds.
9134cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009135/* confdefs.h. */
9136_ACEOF
9137cat confdefs.h >>conftest.$ac_ext
9138cat >>conftest.$ac_ext <<_ACEOF
9139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009140$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009141 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009142int
9143main ()
9144{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009145static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009146test_array [0] = 0
9147
9148 ;
9149 return 0;
9150}
9151_ACEOF
9152rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009153if { (ac_try="$ac_compile"
9154case "(($ac_try" in
9155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9156 *) ac_try_echo=$ac_try;;
9157esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009159 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009161 grep -v '^ *+' conftest.er1 >conftest.err
9162 rm -f conftest.er1
9163 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009165 (exit $ac_status); } && {
9166 test -z "$ac_c_werror_flag" ||
9167 test ! -s conftest.err
9168 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009169 ac_lo=0 ac_mid=0
9170 while :; do
9171 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009172/* confdefs.h. */
9173_ACEOF
9174cat confdefs.h >>conftest.$ac_ext
9175cat >>conftest.$ac_ext <<_ACEOF
9176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009177$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009178 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009179int
9180main ()
9181{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009182static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009183test_array [0] = 0
9184
9185 ;
9186 return 0;
9187}
9188_ACEOF
9189rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009190if { (ac_try="$ac_compile"
9191case "(($ac_try" in
9192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9193 *) ac_try_echo=$ac_try;;
9194esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009196 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009198 grep -v '^ *+' conftest.er1 >conftest.err
9199 rm -f conftest.er1
9200 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009202 (exit $ac_status); } && {
9203 test -z "$ac_c_werror_flag" ||
9204 test ! -s conftest.err
9205 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009206 ac_hi=$ac_mid; break
9207else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009209sed 's/^/| /' conftest.$ac_ext >&5
9210
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009211 ac_lo=`expr $ac_mid + 1`
9212 if test $ac_lo -le $ac_mid; then
9213 ac_lo= ac_hi=
9214 break
9215 fi
9216 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009218
9219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009220 done
9221else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009223sed 's/^/| /' conftest.$ac_ext >&5
9224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009225 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009226/* confdefs.h. */
9227_ACEOF
9228cat confdefs.h >>conftest.$ac_ext
9229cat >>conftest.$ac_ext <<_ACEOF
9230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009231$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009232 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009233int
9234main ()
9235{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009236static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009237test_array [0] = 0
9238
9239 ;
9240 return 0;
9241}
9242_ACEOF
9243rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009244if { (ac_try="$ac_compile"
9245case "(($ac_try" in
9246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9247 *) ac_try_echo=$ac_try;;
9248esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009250 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009251 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009252 grep -v '^ *+' conftest.er1 >conftest.err
9253 rm -f conftest.er1
9254 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009256 (exit $ac_status); } && {
9257 test -z "$ac_c_werror_flag" ||
9258 test ! -s conftest.err
9259 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009260 ac_hi=-1 ac_mid=-1
9261 while :; do
9262 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009263/* confdefs.h. */
9264_ACEOF
9265cat confdefs.h >>conftest.$ac_ext
9266cat >>conftest.$ac_ext <<_ACEOF
9267/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009268$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009269 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009270int
9271main ()
9272{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009273static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009274test_array [0] = 0
9275
9276 ;
9277 return 0;
9278}
9279_ACEOF
9280rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009281if { (ac_try="$ac_compile"
9282case "(($ac_try" in
9283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9284 *) ac_try_echo=$ac_try;;
9285esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009287 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009289 grep -v '^ *+' conftest.er1 >conftest.err
9290 rm -f conftest.er1
9291 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009293 (exit $ac_status); } && {
9294 test -z "$ac_c_werror_flag" ||
9295 test ! -s conftest.err
9296 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009297 ac_lo=$ac_mid; break
9298else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009300sed 's/^/| /' conftest.$ac_ext >&5
9301
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009302 ac_hi=`expr '(' $ac_mid ')' - 1`
9303 if test $ac_mid -le $ac_hi; then
9304 ac_lo= ac_hi=
9305 break
9306 fi
9307 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009309
9310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009311 done
9312else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009313 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009314sed 's/^/| /' conftest.$ac_ext >&5
9315
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009316 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009318
9319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009321
9322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009323# Binary search between lo and hi bounds.
9324while test "x$ac_lo" != "x$ac_hi"; do
9325 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9326 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009327/* confdefs.h. */
9328_ACEOF
9329cat confdefs.h >>conftest.$ac_ext
9330cat >>conftest.$ac_ext <<_ACEOF
9331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009332$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009333 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009334int
9335main ()
9336{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009337static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009338test_array [0] = 0
9339
9340 ;
9341 return 0;
9342}
9343_ACEOF
9344rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009345if { (ac_try="$ac_compile"
9346case "(($ac_try" in
9347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9348 *) ac_try_echo=$ac_try;;
9349esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009353 grep -v '^ *+' conftest.er1 >conftest.err
9354 rm -f conftest.er1
9355 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009357 (exit $ac_status); } && {
9358 test -z "$ac_c_werror_flag" ||
9359 test ! -s conftest.err
9360 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 ac_hi=$ac_mid
9362else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009364sed 's/^/| /' conftest.$ac_ext >&5
9365
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009366 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009368
9369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009370done
9371case $ac_lo in
9372?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009373'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009374 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009375See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009376echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009377See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009378 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009379 else
9380 ac_cv_sizeof_float=0
9381 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009382esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009383else
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009385/* confdefs.h. */
9386_ACEOF
9387cat confdefs.h >>conftest.$ac_ext
9388cat >>conftest.$ac_ext <<_ACEOF
9389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009390$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009391 typedef float ac__type_sizeof_;
9392static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9393static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009394#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009395#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009396int
9397main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009398{
Martin v. Löwis11437992002-04-12 09:54:03 +00009399
9400 FILE *f = fopen ("conftest.val", "w");
9401 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009402 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009403 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009404 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009405 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009406 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009407 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009408 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009409 }
9410 else
9411 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009412 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009413 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009414 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009415 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009416 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009417 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009418
9419 ;
9420 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009421}
Martin v. Löwis11437992002-04-12 09:54:03 +00009422_ACEOF
9423rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009424if { (ac_try="$ac_link"
9425case "(($ac_try" in
9426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9427 *) ac_try_echo=$ac_try;;
9428esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009430 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009434 { (case "(($ac_try" in
9435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9436 *) ac_try_echo=$ac_try;;
9437esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009439 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009440 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 (exit $ac_status); }; }; then
9443 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009444else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009445 echo "$as_me: program exited with status $ac_status" >&5
9446echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009447sed 's/^/| /' conftest.$ac_ext >&5
9448
Martin v. Löwis11437992002-04-12 09:54:03 +00009449( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009450if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009451 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009452See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009453echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009454See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009455 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009456 else
9457 ac_cv_sizeof_float=0
9458 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009460rm -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 +00009461fi
9462rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009463fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009464{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9465echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009466
9467
9468
Martin v. Löwis11437992002-04-12 09:54:03 +00009469cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009470#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009471_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009472
9473
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009474{ echo "$as_me:$LINENO: checking for double" >&5
9475echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9476if test "${ac_cv_type_double+set}" = set; then
9477 echo $ECHO_N "(cached) $ECHO_C" >&6
9478else
9479 cat >conftest.$ac_ext <<_ACEOF
9480/* confdefs.h. */
9481_ACEOF
9482cat confdefs.h >>conftest.$ac_ext
9483cat >>conftest.$ac_ext <<_ACEOF
9484/* end confdefs.h. */
9485$ac_includes_default
9486typedef double ac__type_new_;
9487int
9488main ()
9489{
9490if ((ac__type_new_ *) 0)
9491 return 0;
9492if (sizeof (ac__type_new_))
9493 return 0;
9494 ;
9495 return 0;
9496}
9497_ACEOF
9498rm -f conftest.$ac_objext
9499if { (ac_try="$ac_compile"
9500case "(($ac_try" in
9501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9502 *) ac_try_echo=$ac_try;;
9503esac
9504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9505 (eval "$ac_compile") 2>conftest.er1
9506 ac_status=$?
9507 grep -v '^ *+' conftest.er1 >conftest.err
9508 rm -f conftest.er1
9509 cat conftest.err >&5
9510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9511 (exit $ac_status); } && {
9512 test -z "$ac_c_werror_flag" ||
9513 test ! -s conftest.err
9514 } && test -s conftest.$ac_objext; then
9515 ac_cv_type_double=yes
9516else
9517 echo "$as_me: failed program was:" >&5
9518sed 's/^/| /' conftest.$ac_ext >&5
9519
9520 ac_cv_type_double=no
9521fi
9522
9523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9524fi
9525{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9526echo "${ECHO_T}$ac_cv_type_double" >&6; }
9527
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009528# The cast to long int works around a bug in the HP C Compiler
9529# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9530# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9531# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009532{ echo "$as_me:$LINENO: checking size of double" >&5
9533echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009534if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009535 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009536else
Martin v. Löwis11437992002-04-12 09:54:03 +00009537 if test "$cross_compiling" = yes; then
9538 # Depending upon the size, compute the lo and hi bounds.
9539cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009540/* confdefs.h. */
9541_ACEOF
9542cat confdefs.h >>conftest.$ac_ext
9543cat >>conftest.$ac_ext <<_ACEOF
9544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009545$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009546 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009547int
9548main ()
9549{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009550static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009551test_array [0] = 0
9552
9553 ;
9554 return 0;
9555}
9556_ACEOF
9557rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009558if { (ac_try="$ac_compile"
9559case "(($ac_try" in
9560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9561 *) ac_try_echo=$ac_try;;
9562esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009564 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009566 grep -v '^ *+' conftest.er1 >conftest.err
9567 rm -f conftest.er1
9568 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009570 (exit $ac_status); } && {
9571 test -z "$ac_c_werror_flag" ||
9572 test ! -s conftest.err
9573 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009574 ac_lo=0 ac_mid=0
9575 while :; do
9576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009577/* confdefs.h. */
9578_ACEOF
9579cat confdefs.h >>conftest.$ac_ext
9580cat >>conftest.$ac_ext <<_ACEOF
9581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009582$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009583 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009584int
9585main ()
9586{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009587static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009588test_array [0] = 0
9589
9590 ;
9591 return 0;
9592}
9593_ACEOF
9594rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009595if { (ac_try="$ac_compile"
9596case "(($ac_try" in
9597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9598 *) ac_try_echo=$ac_try;;
9599esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009601 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009603 grep -v '^ *+' conftest.er1 >conftest.err
9604 rm -f conftest.er1
9605 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009607 (exit $ac_status); } && {
9608 test -z "$ac_c_werror_flag" ||
9609 test ! -s conftest.err
9610 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009611 ac_hi=$ac_mid; break
9612else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009614sed 's/^/| /' conftest.$ac_ext >&5
9615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009616 ac_lo=`expr $ac_mid + 1`
9617 if test $ac_lo -le $ac_mid; then
9618 ac_lo= ac_hi=
9619 break
9620 fi
9621 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009623
9624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009625 done
9626else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009628sed 's/^/| /' conftest.$ac_ext >&5
9629
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009630 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009631/* confdefs.h. */
9632_ACEOF
9633cat confdefs.h >>conftest.$ac_ext
9634cat >>conftest.$ac_ext <<_ACEOF
9635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009636$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009637 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009638int
9639main ()
9640{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009641static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009642test_array [0] = 0
9643
9644 ;
9645 return 0;
9646}
9647_ACEOF
9648rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009649if { (ac_try="$ac_compile"
9650case "(($ac_try" in
9651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9652 *) ac_try_echo=$ac_try;;
9653esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009655 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009657 grep -v '^ *+' conftest.er1 >conftest.err
9658 rm -f conftest.er1
9659 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009661 (exit $ac_status); } && {
9662 test -z "$ac_c_werror_flag" ||
9663 test ! -s conftest.err
9664 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009665 ac_hi=-1 ac_mid=-1
9666 while :; do
9667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009668/* confdefs.h. */
9669_ACEOF
9670cat confdefs.h >>conftest.$ac_ext
9671cat >>conftest.$ac_ext <<_ACEOF
9672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009673$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009674 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009675int
9676main ()
9677{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009678static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009679test_array [0] = 0
9680
9681 ;
9682 return 0;
9683}
9684_ACEOF
9685rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009686if { (ac_try="$ac_compile"
9687case "(($ac_try" in
9688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9689 *) ac_try_echo=$ac_try;;
9690esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009692 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009694 grep -v '^ *+' conftest.er1 >conftest.err
9695 rm -f conftest.er1
9696 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009698 (exit $ac_status); } && {
9699 test -z "$ac_c_werror_flag" ||
9700 test ! -s conftest.err
9701 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009702 ac_lo=$ac_mid; break
9703else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009705sed 's/^/| /' conftest.$ac_ext >&5
9706
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009707 ac_hi=`expr '(' $ac_mid ')' - 1`
9708 if test $ac_mid -le $ac_hi; then
9709 ac_lo= ac_hi=
9710 break
9711 fi
9712 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009714
9715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009716 done
9717else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009719sed 's/^/| /' conftest.$ac_ext >&5
9720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009721 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009723
9724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726
9727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009728# Binary search between lo and hi bounds.
9729while test "x$ac_lo" != "x$ac_hi"; do
9730 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9731 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009732/* confdefs.h. */
9733_ACEOF
9734cat confdefs.h >>conftest.$ac_ext
9735cat >>conftest.$ac_ext <<_ACEOF
9736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009737$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009738 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009739int
9740main ()
9741{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009742static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009743test_array [0] = 0
9744
9745 ;
9746 return 0;
9747}
9748_ACEOF
9749rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009750if { (ac_try="$ac_compile"
9751case "(($ac_try" in
9752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9753 *) ac_try_echo=$ac_try;;
9754esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009758 grep -v '^ *+' conftest.er1 >conftest.err
9759 rm -f conftest.er1
9760 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009762 (exit $ac_status); } && {
9763 test -z "$ac_c_werror_flag" ||
9764 test ! -s conftest.err
9765 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009766 ac_hi=$ac_mid
9767else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009769sed 's/^/| /' conftest.$ac_ext >&5
9770
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009771 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009773
9774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009775done
9776case $ac_lo in
9777?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009778'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009779 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009780See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009781echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009782See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009783 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009784 else
9785 ac_cv_sizeof_double=0
9786 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009787esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009788else
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009790/* confdefs.h. */
9791_ACEOF
9792cat confdefs.h >>conftest.$ac_ext
9793cat >>conftest.$ac_ext <<_ACEOF
9794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009795$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009796 typedef double ac__type_sizeof_;
9797static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9798static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009799#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009800#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009801int
9802main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009803{
Martin v. Löwis11437992002-04-12 09:54:03 +00009804
9805 FILE *f = fopen ("conftest.val", "w");
9806 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009807 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009808 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009810 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009811 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009812 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009813 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009814 }
9815 else
9816 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009817 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009818 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009819 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009820 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009822 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009823
9824 ;
9825 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009826}
Martin v. Löwis11437992002-04-12 09:54:03 +00009827_ACEOF
9828rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009829if { (ac_try="$ac_link"
9830case "(($ac_try" in
9831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9832 *) ac_try_echo=$ac_try;;
9833esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009835 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009839 { (case "(($ac_try" in
9840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9841 *) ac_try_echo=$ac_try;;
9842esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009844 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009847 (exit $ac_status); }; }; then
9848 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009849else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009850 echo "$as_me: program exited with status $ac_status" >&5
9851echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009852sed 's/^/| /' conftest.$ac_ext >&5
9853
Martin v. Löwis11437992002-04-12 09:54:03 +00009854( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009855if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009856 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009857See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009858echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009859See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009860 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009861 else
9862 ac_cv_sizeof_double=0
9863 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865rm -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 +00009866fi
9867rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009868fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009869{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9870echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009871
9872
9873
Martin v. Löwis11437992002-04-12 09:54:03 +00009874cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009875#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009876_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009877
9878
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009879{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9880echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9881if test "${ac_cv_type_fpos_t+set}" = set; then
9882 echo $ECHO_N "(cached) $ECHO_C" >&6
9883else
9884 cat >conftest.$ac_ext <<_ACEOF
9885/* confdefs.h. */
9886_ACEOF
9887cat confdefs.h >>conftest.$ac_ext
9888cat >>conftest.$ac_ext <<_ACEOF
9889/* end confdefs.h. */
9890$ac_includes_default
9891typedef fpos_t ac__type_new_;
9892int
9893main ()
9894{
9895if ((ac__type_new_ *) 0)
9896 return 0;
9897if (sizeof (ac__type_new_))
9898 return 0;
9899 ;
9900 return 0;
9901}
9902_ACEOF
9903rm -f conftest.$ac_objext
9904if { (ac_try="$ac_compile"
9905case "(($ac_try" in
9906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9907 *) ac_try_echo=$ac_try;;
9908esac
9909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9910 (eval "$ac_compile") 2>conftest.er1
9911 ac_status=$?
9912 grep -v '^ *+' conftest.er1 >conftest.err
9913 rm -f conftest.er1
9914 cat conftest.err >&5
9915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9916 (exit $ac_status); } && {
9917 test -z "$ac_c_werror_flag" ||
9918 test ! -s conftest.err
9919 } && test -s conftest.$ac_objext; then
9920 ac_cv_type_fpos_t=yes
9921else
9922 echo "$as_me: failed program was:" >&5
9923sed 's/^/| /' conftest.$ac_ext >&5
9924
9925 ac_cv_type_fpos_t=no
9926fi
9927
9928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9929fi
9930{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9931echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9932
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009933# The cast to long int works around a bug in the HP C Compiler
9934# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9935# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9936# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009937{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9938echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009939if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009940 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009941else
Martin v. Löwis11437992002-04-12 09:54:03 +00009942 if test "$cross_compiling" = yes; then
9943 # Depending upon the size, compute the lo and hi bounds.
9944cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009945/* confdefs.h. */
9946_ACEOF
9947cat confdefs.h >>conftest.$ac_ext
9948cat >>conftest.$ac_ext <<_ACEOF
9949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009950$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009951 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009952int
9953main ()
9954{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009955static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009956test_array [0] = 0
9957
9958 ;
9959 return 0;
9960}
9961_ACEOF
9962rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009963if { (ac_try="$ac_compile"
9964case "(($ac_try" in
9965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9966 *) ac_try_echo=$ac_try;;
9967esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009969 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009971 grep -v '^ *+' conftest.er1 >conftest.err
9972 rm -f conftest.er1
9973 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009975 (exit $ac_status); } && {
9976 test -z "$ac_c_werror_flag" ||
9977 test ! -s conftest.err
9978 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009979 ac_lo=0 ac_mid=0
9980 while :; do
9981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009982/* confdefs.h. */
9983_ACEOF
9984cat confdefs.h >>conftest.$ac_ext
9985cat >>conftest.$ac_ext <<_ACEOF
9986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009987$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009988 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009989int
9990main ()
9991{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009992static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009993test_array [0] = 0
9994
9995 ;
9996 return 0;
9997}
9998_ACEOF
9999rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010000if { (ac_try="$ac_compile"
10001case "(($ac_try" in
10002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10003 *) ac_try_echo=$ac_try;;
10004esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010006 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010008 grep -v '^ *+' conftest.er1 >conftest.err
10009 rm -f conftest.er1
10010 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010012 (exit $ac_status); } && {
10013 test -z "$ac_c_werror_flag" ||
10014 test ! -s conftest.err
10015 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010016 ac_hi=$ac_mid; break
10017else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010019sed 's/^/| /' conftest.$ac_ext >&5
10020
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010021 ac_lo=`expr $ac_mid + 1`
10022 if test $ac_lo -le $ac_mid; then
10023 ac_lo= ac_hi=
10024 break
10025 fi
10026 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010028
10029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010030 done
10031else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010033sed 's/^/| /' conftest.$ac_ext >&5
10034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010036/* confdefs.h. */
10037_ACEOF
10038cat confdefs.h >>conftest.$ac_ext
10039cat >>conftest.$ac_ext <<_ACEOF
10040/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010041$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010042 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010043int
10044main ()
10045{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010046static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010047test_array [0] = 0
10048
10049 ;
10050 return 0;
10051}
10052_ACEOF
10053rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010054if { (ac_try="$ac_compile"
10055case "(($ac_try" in
10056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10057 *) ac_try_echo=$ac_try;;
10058esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010060 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010061 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010062 grep -v '^ *+' conftest.er1 >conftest.err
10063 rm -f conftest.er1
10064 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010066 (exit $ac_status); } && {
10067 test -z "$ac_c_werror_flag" ||
10068 test ! -s conftest.err
10069 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010070 ac_hi=-1 ac_mid=-1
10071 while :; do
10072 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010073/* confdefs.h. */
10074_ACEOF
10075cat confdefs.h >>conftest.$ac_ext
10076cat >>conftest.$ac_ext <<_ACEOF
10077/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010078$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010079 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010080int
10081main ()
10082{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010083static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010084test_array [0] = 0
10085
10086 ;
10087 return 0;
10088}
10089_ACEOF
10090rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010091if { (ac_try="$ac_compile"
10092case "(($ac_try" in
10093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10094 *) ac_try_echo=$ac_try;;
10095esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010097 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010098 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010099 grep -v '^ *+' conftest.er1 >conftest.err
10100 rm -f conftest.er1
10101 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010103 (exit $ac_status); } && {
10104 test -z "$ac_c_werror_flag" ||
10105 test ! -s conftest.err
10106 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010107 ac_lo=$ac_mid; break
10108else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010110sed 's/^/| /' conftest.$ac_ext >&5
10111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010112 ac_hi=`expr '(' $ac_mid ')' - 1`
10113 if test $ac_mid -le $ac_hi; then
10114 ac_lo= ac_hi=
10115 break
10116 fi
10117 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010119
10120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010121 done
10122else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010123 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010124sed 's/^/| /' conftest.$ac_ext >&5
10125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010126 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010128
10129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010131
10132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010133# Binary search between lo and hi bounds.
10134while test "x$ac_lo" != "x$ac_hi"; do
10135 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10136 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010137/* confdefs.h. */
10138_ACEOF
10139cat confdefs.h >>conftest.$ac_ext
10140cat >>conftest.$ac_ext <<_ACEOF
10141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010142$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010143 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010144int
10145main ()
10146{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010147static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010148test_array [0] = 0
10149
10150 ;
10151 return 0;
10152}
10153_ACEOF
10154rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010155if { (ac_try="$ac_compile"
10156case "(($ac_try" in
10157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10158 *) ac_try_echo=$ac_try;;
10159esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010161 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010163 grep -v '^ *+' conftest.er1 >conftest.err
10164 rm -f conftest.er1
10165 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167 (exit $ac_status); } && {
10168 test -z "$ac_c_werror_flag" ||
10169 test ! -s conftest.err
10170 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010171 ac_hi=$ac_mid
10172else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010174sed 's/^/| /' conftest.$ac_ext >&5
10175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178
10179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010180done
10181case $ac_lo in
10182?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010183'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010184 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010185See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010186echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010187See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010188 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010189 else
10190 ac_cv_sizeof_fpos_t=0
10191 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010192esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010193else
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010195/* confdefs.h. */
10196_ACEOF
10197cat confdefs.h >>conftest.$ac_ext
10198cat >>conftest.$ac_ext <<_ACEOF
10199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010200$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010201 typedef fpos_t ac__type_sizeof_;
10202static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10203static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010204#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010205#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010206int
10207main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010208{
Martin v. Löwis11437992002-04-12 09:54:03 +000010209
10210 FILE *f = fopen ("conftest.val", "w");
10211 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010212 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010213 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010214 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010215 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010216 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010217 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010218 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010219 }
10220 else
10221 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010222 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010223 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010224 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010225 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010226 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010228
10229 ;
10230 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010231}
Martin v. Löwis11437992002-04-12 09:54:03 +000010232_ACEOF
10233rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010234if { (ac_try="$ac_link"
10235case "(($ac_try" in
10236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10237 *) ac_try_echo=$ac_try;;
10238esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010240 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010241 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010243 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010244 { (case "(($ac_try" in
10245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10246 *) ac_try_echo=$ac_try;;
10247esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010249 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010250 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 (exit $ac_status); }; }; then
10253 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010254else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010255 echo "$as_me: program exited with status $ac_status" >&5
10256echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010257sed 's/^/| /' conftest.$ac_ext >&5
10258
Martin v. Löwis11437992002-04-12 09:54:03 +000010259( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010260if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010261 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010262See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010263echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010264See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010265 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010266 else
10267 ac_cv_sizeof_fpos_t=0
10268 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010270rm -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 +000010271fi
10272rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010273fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010274{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10275echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010276
10277
10278
Martin v. Löwis11437992002-04-12 09:54:03 +000010279cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010280#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010281_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010282
Michael W. Hudson54241132001-12-07 15:38:26 +000010283
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010284{ echo "$as_me:$LINENO: checking for size_t" >&5
10285echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10286if test "${ac_cv_type_size_t+set}" = set; then
10287 echo $ECHO_N "(cached) $ECHO_C" >&6
10288else
10289 cat >conftest.$ac_ext <<_ACEOF
10290/* confdefs.h. */
10291_ACEOF
10292cat confdefs.h >>conftest.$ac_ext
10293cat >>conftest.$ac_ext <<_ACEOF
10294/* end confdefs.h. */
10295$ac_includes_default
10296typedef size_t ac__type_new_;
10297int
10298main ()
10299{
10300if ((ac__type_new_ *) 0)
10301 return 0;
10302if (sizeof (ac__type_new_))
10303 return 0;
10304 ;
10305 return 0;
10306}
10307_ACEOF
10308rm -f conftest.$ac_objext
10309if { (ac_try="$ac_compile"
10310case "(($ac_try" in
10311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10312 *) ac_try_echo=$ac_try;;
10313esac
10314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10315 (eval "$ac_compile") 2>conftest.er1
10316 ac_status=$?
10317 grep -v '^ *+' conftest.er1 >conftest.err
10318 rm -f conftest.er1
10319 cat conftest.err >&5
10320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10321 (exit $ac_status); } && {
10322 test -z "$ac_c_werror_flag" ||
10323 test ! -s conftest.err
10324 } && test -s conftest.$ac_objext; then
10325 ac_cv_type_size_t=yes
10326else
10327 echo "$as_me: failed program was:" >&5
10328sed 's/^/| /' conftest.$ac_ext >&5
10329
10330 ac_cv_type_size_t=no
10331fi
10332
10333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10334fi
10335{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10336echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010338# The cast to long int works around a bug in the HP C Compiler
10339# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10340# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10341# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010342{ echo "$as_me:$LINENO: checking size of size_t" >&5
10343echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010344if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010345 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010346else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010347 if test "$cross_compiling" = yes; then
10348 # Depending upon the size, compute the lo and hi bounds.
10349cat >conftest.$ac_ext <<_ACEOF
10350/* confdefs.h. */
10351_ACEOF
10352cat confdefs.h >>conftest.$ac_ext
10353cat >>conftest.$ac_ext <<_ACEOF
10354/* end confdefs.h. */
10355$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010356 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010357int
10358main ()
10359{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010360static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010361test_array [0] = 0
10362
10363 ;
10364 return 0;
10365}
10366_ACEOF
10367rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010368if { (ac_try="$ac_compile"
10369case "(($ac_try" in
10370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10371 *) ac_try_echo=$ac_try;;
10372esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010374 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010375 ac_status=$?
10376 grep -v '^ *+' conftest.er1 >conftest.err
10377 rm -f conftest.er1
10378 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010380 (exit $ac_status); } && {
10381 test -z "$ac_c_werror_flag" ||
10382 test ! -s conftest.err
10383 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010384 ac_lo=0 ac_mid=0
10385 while :; do
10386 cat >conftest.$ac_ext <<_ACEOF
10387/* confdefs.h. */
10388_ACEOF
10389cat confdefs.h >>conftest.$ac_ext
10390cat >>conftest.$ac_ext <<_ACEOF
10391/* end confdefs.h. */
10392$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010393 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010394int
10395main ()
10396{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010397static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010398test_array [0] = 0
10399
10400 ;
10401 return 0;
10402}
10403_ACEOF
10404rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010405if { (ac_try="$ac_compile"
10406case "(($ac_try" in
10407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10408 *) ac_try_echo=$ac_try;;
10409esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010411 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010412 ac_status=$?
10413 grep -v '^ *+' conftest.er1 >conftest.err
10414 rm -f conftest.er1
10415 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010417 (exit $ac_status); } && {
10418 test -z "$ac_c_werror_flag" ||
10419 test ! -s conftest.err
10420 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010421 ac_hi=$ac_mid; break
10422else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010423 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010424sed 's/^/| /' conftest.$ac_ext >&5
10425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010426 ac_lo=`expr $ac_mid + 1`
10427 if test $ac_lo -le $ac_mid; then
10428 ac_lo= ac_hi=
10429 break
10430 fi
10431 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010433
10434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010435 done
10436else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010437 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010438sed 's/^/| /' conftest.$ac_ext >&5
10439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010440 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010441/* confdefs.h. */
10442_ACEOF
10443cat confdefs.h >>conftest.$ac_ext
10444cat >>conftest.$ac_ext <<_ACEOF
10445/* end confdefs.h. */
10446$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010447 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010448int
10449main ()
10450{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010451static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010452test_array [0] = 0
10453
10454 ;
10455 return 0;
10456}
10457_ACEOF
10458rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010459if { (ac_try="$ac_compile"
10460case "(($ac_try" in
10461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10462 *) ac_try_echo=$ac_try;;
10463esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010465 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010466 ac_status=$?
10467 grep -v '^ *+' conftest.er1 >conftest.err
10468 rm -f conftest.er1
10469 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010471 (exit $ac_status); } && {
10472 test -z "$ac_c_werror_flag" ||
10473 test ! -s conftest.err
10474 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010475 ac_hi=-1 ac_mid=-1
10476 while :; do
10477 cat >conftest.$ac_ext <<_ACEOF
10478/* confdefs.h. */
10479_ACEOF
10480cat confdefs.h >>conftest.$ac_ext
10481cat >>conftest.$ac_ext <<_ACEOF
10482/* end confdefs.h. */
10483$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010484 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010485int
10486main ()
10487{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010488static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010489test_array [0] = 0
10490
10491 ;
10492 return 0;
10493}
10494_ACEOF
10495rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010496if { (ac_try="$ac_compile"
10497case "(($ac_try" in
10498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10499 *) ac_try_echo=$ac_try;;
10500esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010502 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010503 ac_status=$?
10504 grep -v '^ *+' conftest.er1 >conftest.err
10505 rm -f conftest.er1
10506 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010508 (exit $ac_status); } && {
10509 test -z "$ac_c_werror_flag" ||
10510 test ! -s conftest.err
10511 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010512 ac_lo=$ac_mid; break
10513else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010514 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010515sed 's/^/| /' conftest.$ac_ext >&5
10516
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010517 ac_hi=`expr '(' $ac_mid ')' - 1`
10518 if test $ac_mid -le $ac_hi; then
10519 ac_lo= ac_hi=
10520 break
10521 fi
10522 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010524
10525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010526 done
10527else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010528 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010529sed 's/^/| /' conftest.$ac_ext >&5
10530
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010531 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010533
10534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010536
10537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010538# Binary search between lo and hi bounds.
10539while test "x$ac_lo" != "x$ac_hi"; do
10540 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10541 cat >conftest.$ac_ext <<_ACEOF
10542/* confdefs.h. */
10543_ACEOF
10544cat confdefs.h >>conftest.$ac_ext
10545cat >>conftest.$ac_ext <<_ACEOF
10546/* end confdefs.h. */
10547$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010548 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010549int
10550main ()
10551{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010552static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010553test_array [0] = 0
10554
10555 ;
10556 return 0;
10557}
10558_ACEOF
10559rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010560if { (ac_try="$ac_compile"
10561case "(($ac_try" in
10562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10563 *) ac_try_echo=$ac_try;;
10564esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010566 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010567 ac_status=$?
10568 grep -v '^ *+' conftest.er1 >conftest.err
10569 rm -f conftest.er1
10570 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010572 (exit $ac_status); } && {
10573 test -z "$ac_c_werror_flag" ||
10574 test ! -s conftest.err
10575 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010576 ac_hi=$ac_mid
10577else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010578 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010579sed 's/^/| /' conftest.$ac_ext >&5
10580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010583
10584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010585done
10586case $ac_lo in
10587?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010588'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010589 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010590See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010591echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010592See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010593 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010594 else
10595 ac_cv_sizeof_size_t=0
10596 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010597esac
10598else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010599 cat >conftest.$ac_ext <<_ACEOF
10600/* confdefs.h. */
10601_ACEOF
10602cat confdefs.h >>conftest.$ac_ext
10603cat >>conftest.$ac_ext <<_ACEOF
10604/* end confdefs.h. */
10605$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010606 typedef size_t ac__type_sizeof_;
10607static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10608static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010609#include <stdio.h>
10610#include <stdlib.h>
10611int
10612main ()
10613{
10614
10615 FILE *f = fopen ("conftest.val", "w");
10616 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010617 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010618 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010619 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010620 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010621 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010622 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010623 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010624 }
10625 else
10626 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010627 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010628 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010629 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010630 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010631 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010632 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010633
10634 ;
10635 return 0;
10636}
10637_ACEOF
10638rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010639if { (ac_try="$ac_link"
10640case "(($ac_try" in
10641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10642 *) ac_try_echo=$ac_try;;
10643esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010645 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010646 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010648 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010649 { (case "(($ac_try" in
10650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10651 *) ac_try_echo=$ac_try;;
10652esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010654 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010655 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010657 (exit $ac_status); }; }; then
10658 ac_cv_sizeof_size_t=`cat conftest.val`
10659else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010660 echo "$as_me: program exited with status $ac_status" >&5
10661echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010662sed 's/^/| /' conftest.$ac_ext >&5
10663
10664( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010665if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010666 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010667See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010668echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010669See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010670 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010671 else
10672 ac_cv_sizeof_size_t=0
10673 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010675rm -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 +000010676fi
10677rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010678fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010679{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10680echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010681
10682
10683
Martin v. Löwis18e16552006-02-15 17:27:45 +000010684cat >>confdefs.h <<_ACEOF
10685#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10686_ACEOF
10687
10688
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010689{ echo "$as_me:$LINENO: checking for pid_t" >&5
10690echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10691if test "${ac_cv_type_pid_t+set}" = set; then
10692 echo $ECHO_N "(cached) $ECHO_C" >&6
10693else
10694 cat >conftest.$ac_ext <<_ACEOF
10695/* confdefs.h. */
10696_ACEOF
10697cat confdefs.h >>conftest.$ac_ext
10698cat >>conftest.$ac_ext <<_ACEOF
10699/* end confdefs.h. */
10700$ac_includes_default
10701typedef pid_t ac__type_new_;
10702int
10703main ()
10704{
10705if ((ac__type_new_ *) 0)
10706 return 0;
10707if (sizeof (ac__type_new_))
10708 return 0;
10709 ;
10710 return 0;
10711}
10712_ACEOF
10713rm -f conftest.$ac_objext
10714if { (ac_try="$ac_compile"
10715case "(($ac_try" in
10716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10717 *) ac_try_echo=$ac_try;;
10718esac
10719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10720 (eval "$ac_compile") 2>conftest.er1
10721 ac_status=$?
10722 grep -v '^ *+' conftest.er1 >conftest.err
10723 rm -f conftest.er1
10724 cat conftest.err >&5
10725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10726 (exit $ac_status); } && {
10727 test -z "$ac_c_werror_flag" ||
10728 test ! -s conftest.err
10729 } && test -s conftest.$ac_objext; then
10730 ac_cv_type_pid_t=yes
10731else
10732 echo "$as_me: failed program was:" >&5
10733sed 's/^/| /' conftest.$ac_ext >&5
10734
10735 ac_cv_type_pid_t=no
10736fi
10737
10738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10739fi
10740{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10741echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10742
Christian Heimes400adb02008-02-01 08:12:03 +000010743# The cast to long int works around a bug in the HP C Compiler
10744# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10745# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10746# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010747{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10748echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010749if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010750 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010751else
10752 if test "$cross_compiling" = yes; then
10753 # Depending upon the size, compute the lo and hi bounds.
10754cat >conftest.$ac_ext <<_ACEOF
10755/* confdefs.h. */
10756_ACEOF
10757cat confdefs.h >>conftest.$ac_ext
10758cat >>conftest.$ac_ext <<_ACEOF
10759/* end confdefs.h. */
10760$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010761 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010762int
10763main ()
10764{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010765static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010766test_array [0] = 0
10767
10768 ;
10769 return 0;
10770}
10771_ACEOF
10772rm -f conftest.$ac_objext
10773if { (ac_try="$ac_compile"
10774case "(($ac_try" in
10775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10776 *) ac_try_echo=$ac_try;;
10777esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010779 (eval "$ac_compile") 2>conftest.er1
10780 ac_status=$?
10781 grep -v '^ *+' conftest.er1 >conftest.err
10782 rm -f conftest.er1
10783 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010785 (exit $ac_status); } && {
10786 test -z "$ac_c_werror_flag" ||
10787 test ! -s conftest.err
10788 } && test -s conftest.$ac_objext; then
10789 ac_lo=0 ac_mid=0
10790 while :; do
10791 cat >conftest.$ac_ext <<_ACEOF
10792/* confdefs.h. */
10793_ACEOF
10794cat confdefs.h >>conftest.$ac_ext
10795cat >>conftest.$ac_ext <<_ACEOF
10796/* end confdefs.h. */
10797$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010798 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010799int
10800main ()
10801{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010802static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010803test_array [0] = 0
10804
10805 ;
10806 return 0;
10807}
10808_ACEOF
10809rm -f conftest.$ac_objext
10810if { (ac_try="$ac_compile"
10811case "(($ac_try" in
10812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10813 *) ac_try_echo=$ac_try;;
10814esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010816 (eval "$ac_compile") 2>conftest.er1
10817 ac_status=$?
10818 grep -v '^ *+' conftest.er1 >conftest.err
10819 rm -f conftest.er1
10820 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010822 (exit $ac_status); } && {
10823 test -z "$ac_c_werror_flag" ||
10824 test ! -s conftest.err
10825 } && test -s conftest.$ac_objext; then
10826 ac_hi=$ac_mid; break
10827else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010828 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010829sed 's/^/| /' conftest.$ac_ext >&5
10830
10831 ac_lo=`expr $ac_mid + 1`
10832 if test $ac_lo -le $ac_mid; then
10833 ac_lo= ac_hi=
10834 break
10835 fi
10836 ac_mid=`expr 2 '*' $ac_mid + 1`
10837fi
10838
10839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10840 done
10841else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010842 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010843sed 's/^/| /' conftest.$ac_ext >&5
10844
10845 cat >conftest.$ac_ext <<_ACEOF
10846/* confdefs.h. */
10847_ACEOF
10848cat confdefs.h >>conftest.$ac_ext
10849cat >>conftest.$ac_ext <<_ACEOF
10850/* end confdefs.h. */
10851$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010852 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010853int
10854main ()
10855{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010856static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010857test_array [0] = 0
10858
10859 ;
10860 return 0;
10861}
10862_ACEOF
10863rm -f conftest.$ac_objext
10864if { (ac_try="$ac_compile"
10865case "(($ac_try" in
10866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10867 *) ac_try_echo=$ac_try;;
10868esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010870 (eval "$ac_compile") 2>conftest.er1
10871 ac_status=$?
10872 grep -v '^ *+' conftest.er1 >conftest.err
10873 rm -f conftest.er1
10874 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010876 (exit $ac_status); } && {
10877 test -z "$ac_c_werror_flag" ||
10878 test ! -s conftest.err
10879 } && test -s conftest.$ac_objext; then
10880 ac_hi=-1 ac_mid=-1
10881 while :; do
10882 cat >conftest.$ac_ext <<_ACEOF
10883/* confdefs.h. */
10884_ACEOF
10885cat confdefs.h >>conftest.$ac_ext
10886cat >>conftest.$ac_ext <<_ACEOF
10887/* end confdefs.h. */
10888$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010889 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010890int
10891main ()
10892{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010893static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010894test_array [0] = 0
10895
10896 ;
10897 return 0;
10898}
10899_ACEOF
10900rm -f conftest.$ac_objext
10901if { (ac_try="$ac_compile"
10902case "(($ac_try" in
10903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10904 *) ac_try_echo=$ac_try;;
10905esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010907 (eval "$ac_compile") 2>conftest.er1
10908 ac_status=$?
10909 grep -v '^ *+' conftest.er1 >conftest.err
10910 rm -f conftest.er1
10911 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010913 (exit $ac_status); } && {
10914 test -z "$ac_c_werror_flag" ||
10915 test ! -s conftest.err
10916 } && test -s conftest.$ac_objext; then
10917 ac_lo=$ac_mid; break
10918else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010919 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010920sed 's/^/| /' conftest.$ac_ext >&5
10921
10922 ac_hi=`expr '(' $ac_mid ')' - 1`
10923 if test $ac_mid -le $ac_hi; then
10924 ac_lo= ac_hi=
10925 break
10926 fi
10927 ac_mid=`expr 2 '*' $ac_mid`
10928fi
10929
10930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10931 done
10932else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010933 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010934sed 's/^/| /' conftest.$ac_ext >&5
10935
10936 ac_lo= ac_hi=
10937fi
10938
10939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10940fi
10941
10942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10943# Binary search between lo and hi bounds.
10944while test "x$ac_lo" != "x$ac_hi"; do
10945 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10946 cat >conftest.$ac_ext <<_ACEOF
10947/* confdefs.h. */
10948_ACEOF
10949cat confdefs.h >>conftest.$ac_ext
10950cat >>conftest.$ac_ext <<_ACEOF
10951/* end confdefs.h. */
10952$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010953 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010954int
10955main ()
10956{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010957static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010958test_array [0] = 0
10959
10960 ;
10961 return 0;
10962}
10963_ACEOF
10964rm -f conftest.$ac_objext
10965if { (ac_try="$ac_compile"
10966case "(($ac_try" in
10967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10968 *) ac_try_echo=$ac_try;;
10969esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010971 (eval "$ac_compile") 2>conftest.er1
10972 ac_status=$?
10973 grep -v '^ *+' conftest.er1 >conftest.err
10974 rm -f conftest.er1
10975 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010977 (exit $ac_status); } && {
10978 test -z "$ac_c_werror_flag" ||
10979 test ! -s conftest.err
10980 } && test -s conftest.$ac_objext; then
10981 ac_hi=$ac_mid
10982else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010983 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010984sed 's/^/| /' conftest.$ac_ext >&5
10985
10986 ac_lo=`expr '(' $ac_mid ')' + 1`
10987fi
10988
10989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10990done
10991case $ac_lo in
10992?*) ac_cv_sizeof_pid_t=$ac_lo;;
10993'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010994 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000010995See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010996echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000010997See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010998 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000010999 else
11000 ac_cv_sizeof_pid_t=0
11001 fi ;;
11002esac
11003else
11004 cat >conftest.$ac_ext <<_ACEOF
11005/* confdefs.h. */
11006_ACEOF
11007cat confdefs.h >>conftest.$ac_ext
11008cat >>conftest.$ac_ext <<_ACEOF
11009/* end confdefs.h. */
11010$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011011 typedef pid_t ac__type_sizeof_;
11012static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11013static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011014#include <stdio.h>
11015#include <stdlib.h>
11016int
11017main ()
11018{
11019
11020 FILE *f = fopen ("conftest.val", "w");
11021 if (! f)
11022 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011023 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011024 {
11025 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011026 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011027 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011028 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011029 }
11030 else
11031 {
11032 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011033 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011034 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011035 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011036 }
11037 return ferror (f) || fclose (f) != 0;
11038
11039 ;
11040 return 0;
11041}
11042_ACEOF
11043rm -f conftest$ac_exeext
11044if { (ac_try="$ac_link"
11045case "(($ac_try" in
11046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11047 *) ac_try_echo=$ac_try;;
11048esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011050 (eval "$ac_link") 2>&5
11051 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011053 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11054 { (case "(($ac_try" in
11055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11056 *) ac_try_echo=$ac_try;;
11057esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011059 (eval "$ac_try") 2>&5
11060 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011062 (exit $ac_status); }; }; then
11063 ac_cv_sizeof_pid_t=`cat conftest.val`
11064else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011065 echo "$as_me: program exited with status $ac_status" >&5
11066echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011067sed 's/^/| /' conftest.$ac_ext >&5
11068
11069( exit $ac_status )
11070if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011071 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011072See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011073echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011074See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011075 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011076 else
11077 ac_cv_sizeof_pid_t=0
11078 fi
11079fi
11080rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11081fi
11082rm -f conftest.val
11083fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011084{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11085echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011086
11087
11088
11089cat >>confdefs.h <<_ACEOF
11090#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11091_ACEOF
11092
11093
Michael W. Hudson54241132001-12-07 15:38:26 +000011094
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011095{ echo "$as_me:$LINENO: checking for long long support" >&5
11096echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011097have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011098cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011099/* confdefs.h. */
11100_ACEOF
11101cat confdefs.h >>conftest.$ac_ext
11102cat >>conftest.$ac_ext <<_ACEOF
11103/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011104
Martin v. Löwis11437992002-04-12 09:54:03 +000011105int
11106main ()
11107{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011108long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011109 ;
11110 return 0;
11111}
11112_ACEOF
11113rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011114if { (ac_try="$ac_compile"
11115case "(($ac_try" in
11116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11117 *) ac_try_echo=$ac_try;;
11118esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011120 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011121 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011122 grep -v '^ *+' conftest.er1 >conftest.err
11123 rm -f conftest.er1
11124 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011126 (exit $ac_status); } && {
11127 test -z "$ac_c_werror_flag" ||
11128 test ! -s conftest.err
11129 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011130
11131
11132cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011133#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011134_ACEOF
11135
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011136 have_long_long=yes
11137
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011138else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011140sed 's/^/| /' conftest.$ac_ext >&5
11141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011142
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011144
11145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011146{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11147echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011148if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011149{ echo "$as_me:$LINENO: checking for long long" >&5
11150echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11151if test "${ac_cv_type_long_long+set}" = set; then
11152 echo $ECHO_N "(cached) $ECHO_C" >&6
11153else
11154 cat >conftest.$ac_ext <<_ACEOF
11155/* confdefs.h. */
11156_ACEOF
11157cat confdefs.h >>conftest.$ac_ext
11158cat >>conftest.$ac_ext <<_ACEOF
11159/* end confdefs.h. */
11160$ac_includes_default
11161typedef long long ac__type_new_;
11162int
11163main ()
11164{
11165if ((ac__type_new_ *) 0)
11166 return 0;
11167if (sizeof (ac__type_new_))
11168 return 0;
11169 ;
11170 return 0;
11171}
11172_ACEOF
11173rm -f conftest.$ac_objext
11174if { (ac_try="$ac_compile"
11175case "(($ac_try" in
11176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11177 *) ac_try_echo=$ac_try;;
11178esac
11179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11180 (eval "$ac_compile") 2>conftest.er1
11181 ac_status=$?
11182 grep -v '^ *+' conftest.er1 >conftest.err
11183 rm -f conftest.er1
11184 cat conftest.err >&5
11185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11186 (exit $ac_status); } && {
11187 test -z "$ac_c_werror_flag" ||
11188 test ! -s conftest.err
11189 } && test -s conftest.$ac_objext; then
11190 ac_cv_type_long_long=yes
11191else
11192 echo "$as_me: failed program was:" >&5
11193sed 's/^/| /' conftest.$ac_ext >&5
11194
11195 ac_cv_type_long_long=no
11196fi
11197
11198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11199fi
11200{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11201echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11202
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011203# The cast to long int works around a bug in the HP C Compiler
11204# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11205# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11206# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011207{ echo "$as_me:$LINENO: checking size of long long" >&5
11208echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011209if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011210 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011211else
Martin v. Löwis11437992002-04-12 09:54:03 +000011212 if test "$cross_compiling" = yes; then
11213 # Depending upon the size, compute the lo and hi bounds.
11214cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011215/* confdefs.h. */
11216_ACEOF
11217cat confdefs.h >>conftest.$ac_ext
11218cat >>conftest.$ac_ext <<_ACEOF
11219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011220$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011221 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011222int
11223main ()
11224{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011225static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011226test_array [0] = 0
11227
11228 ;
11229 return 0;
11230}
11231_ACEOF
11232rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011233if { (ac_try="$ac_compile"
11234case "(($ac_try" in
11235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11236 *) ac_try_echo=$ac_try;;
11237esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011239 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011240 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011241 grep -v '^ *+' conftest.er1 >conftest.err
11242 rm -f conftest.er1
11243 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011245 (exit $ac_status); } && {
11246 test -z "$ac_c_werror_flag" ||
11247 test ! -s conftest.err
11248 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011249 ac_lo=0 ac_mid=0
11250 while :; do
11251 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011252/* confdefs.h. */
11253_ACEOF
11254cat confdefs.h >>conftest.$ac_ext
11255cat >>conftest.$ac_ext <<_ACEOF
11256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011257$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011258 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011259int
11260main ()
11261{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011262static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011263test_array [0] = 0
11264
11265 ;
11266 return 0;
11267}
11268_ACEOF
11269rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011270if { (ac_try="$ac_compile"
11271case "(($ac_try" in
11272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11273 *) ac_try_echo=$ac_try;;
11274esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011276 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011277 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011278 grep -v '^ *+' conftest.er1 >conftest.err
11279 rm -f conftest.er1
11280 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011282 (exit $ac_status); } && {
11283 test -z "$ac_c_werror_flag" ||
11284 test ! -s conftest.err
11285 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011286 ac_hi=$ac_mid; break
11287else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011289sed 's/^/| /' conftest.$ac_ext >&5
11290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011291 ac_lo=`expr $ac_mid + 1`
11292 if test $ac_lo -le $ac_mid; then
11293 ac_lo= ac_hi=
11294 break
11295 fi
11296 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011298
11299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011300 done
11301else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011302 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011303sed 's/^/| /' conftest.$ac_ext >&5
11304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011305 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011306/* confdefs.h. */
11307_ACEOF
11308cat confdefs.h >>conftest.$ac_ext
11309cat >>conftest.$ac_ext <<_ACEOF
11310/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011311$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011312 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011313int
11314main ()
11315{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011316static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011317test_array [0] = 0
11318
11319 ;
11320 return 0;
11321}
11322_ACEOF
11323rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011324if { (ac_try="$ac_compile"
11325case "(($ac_try" in
11326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11327 *) ac_try_echo=$ac_try;;
11328esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011330 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011331 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011332 grep -v '^ *+' conftest.er1 >conftest.err
11333 rm -f conftest.er1
11334 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011336 (exit $ac_status); } && {
11337 test -z "$ac_c_werror_flag" ||
11338 test ! -s conftest.err
11339 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011340 ac_hi=-1 ac_mid=-1
11341 while :; do
11342 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011343/* confdefs.h. */
11344_ACEOF
11345cat confdefs.h >>conftest.$ac_ext
11346cat >>conftest.$ac_ext <<_ACEOF
11347/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011348$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011349 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011350int
11351main ()
11352{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011353static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011354test_array [0] = 0
11355
11356 ;
11357 return 0;
11358}
11359_ACEOF
11360rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011361if { (ac_try="$ac_compile"
11362case "(($ac_try" in
11363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11364 *) ac_try_echo=$ac_try;;
11365esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011367 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011368 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011369 grep -v '^ *+' conftest.er1 >conftest.err
11370 rm -f conftest.er1
11371 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011373 (exit $ac_status); } && {
11374 test -z "$ac_c_werror_flag" ||
11375 test ! -s conftest.err
11376 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011377 ac_lo=$ac_mid; break
11378else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011380sed 's/^/| /' conftest.$ac_ext >&5
11381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011382 ac_hi=`expr '(' $ac_mid ')' - 1`
11383 if test $ac_mid -le $ac_hi; then
11384 ac_lo= ac_hi=
11385 break
11386 fi
11387 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011389
11390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011391 done
11392else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011394sed 's/^/| /' conftest.$ac_ext >&5
11395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011396 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011398
11399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011401
11402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011403# Binary search between lo and hi bounds.
11404while test "x$ac_lo" != "x$ac_hi"; do
11405 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11406 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011407/* confdefs.h. */
11408_ACEOF
11409cat confdefs.h >>conftest.$ac_ext
11410cat >>conftest.$ac_ext <<_ACEOF
11411/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011412$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011413 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011414int
11415main ()
11416{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011417static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011418test_array [0] = 0
11419
11420 ;
11421 return 0;
11422}
11423_ACEOF
11424rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011425if { (ac_try="$ac_compile"
11426case "(($ac_try" in
11427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11428 *) ac_try_echo=$ac_try;;
11429esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011431 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011433 grep -v '^ *+' conftest.er1 >conftest.err
11434 rm -f conftest.er1
11435 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011437 (exit $ac_status); } && {
11438 test -z "$ac_c_werror_flag" ||
11439 test ! -s conftest.err
11440 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011441 ac_hi=$ac_mid
11442else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011444sed 's/^/| /' conftest.$ac_ext >&5
11445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011446 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011448
11449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011450done
11451case $ac_lo in
11452?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011453'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011454 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011455See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011456echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011457See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011458 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011459 else
11460 ac_cv_sizeof_long_long=0
11461 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011462esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011463else
Martin v. Löwis11437992002-04-12 09:54:03 +000011464 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011465/* confdefs.h. */
11466_ACEOF
11467cat confdefs.h >>conftest.$ac_ext
11468cat >>conftest.$ac_ext <<_ACEOF
11469/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011470$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011471 typedef long long ac__type_sizeof_;
11472static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11473static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011474#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011475#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011476int
11477main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011478{
Martin v. Löwis11437992002-04-12 09:54:03 +000011479
11480 FILE *f = fopen ("conftest.val", "w");
11481 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011482 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011483 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011484 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011486 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011487 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011488 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011489 }
11490 else
11491 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011492 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011493 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011494 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011495 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011496 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011497 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011498
11499 ;
11500 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011501}
Martin v. Löwis11437992002-04-12 09:54:03 +000011502_ACEOF
11503rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011504if { (ac_try="$ac_link"
11505case "(($ac_try" in
11506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11507 *) ac_try_echo=$ac_try;;
11508esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011510 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011511 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011513 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011514 { (case "(($ac_try" in
11515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11516 *) ac_try_echo=$ac_try;;
11517esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011519 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011520 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011522 (exit $ac_status); }; }; then
11523 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011524else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011525 echo "$as_me: program exited with status $ac_status" >&5
11526echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011527sed 's/^/| /' conftest.$ac_ext >&5
11528
Martin v. Löwis11437992002-04-12 09:54:03 +000011529( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011530if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011531 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011532See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011533echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011534See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011535 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011536 else
11537 ac_cv_sizeof_long_long=0
11538 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011540rm -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 +000011541fi
11542rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011543fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011544{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11545echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011546
11547
11548
Martin v. Löwis11437992002-04-12 09:54:03 +000011549cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011550#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011551_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011552
Michael W. Hudson54241132001-12-07 15:38:26 +000011553
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011554fi
11555
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011556{ echo "$as_me:$LINENO: checking for long double support" >&5
11557echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011558have_long_double=no
11559cat >conftest.$ac_ext <<_ACEOF
11560/* confdefs.h. */
11561_ACEOF
11562cat confdefs.h >>conftest.$ac_ext
11563cat >>conftest.$ac_ext <<_ACEOF
11564/* end confdefs.h. */
11565
11566int
11567main ()
11568{
11569long double x; x = (long double)0;
11570 ;
11571 return 0;
11572}
11573_ACEOF
11574rm -f conftest.$ac_objext
11575if { (ac_try="$ac_compile"
11576case "(($ac_try" in
11577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11578 *) ac_try_echo=$ac_try;;
11579esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011581 (eval "$ac_compile") 2>conftest.er1
11582 ac_status=$?
11583 grep -v '^ *+' conftest.er1 >conftest.err
11584 rm -f conftest.er1
11585 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011587 (exit $ac_status); } && {
11588 test -z "$ac_c_werror_flag" ||
11589 test ! -s conftest.err
11590 } && test -s conftest.$ac_objext; then
11591
11592
11593cat >>confdefs.h <<\_ACEOF
11594#define HAVE_LONG_DOUBLE 1
11595_ACEOF
11596
11597 have_long_double=yes
11598
11599else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011600 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011601sed 's/^/| /' conftest.$ac_ext >&5
11602
11603
11604fi
11605
11606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011607{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11608echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011609if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011610{ echo "$as_me:$LINENO: checking for long double" >&5
11611echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11612if test "${ac_cv_type_long_double+set}" = set; then
11613 echo $ECHO_N "(cached) $ECHO_C" >&6
11614else
11615 cat >conftest.$ac_ext <<_ACEOF
11616/* confdefs.h. */
11617_ACEOF
11618cat confdefs.h >>conftest.$ac_ext
11619cat >>conftest.$ac_ext <<_ACEOF
11620/* end confdefs.h. */
11621$ac_includes_default
11622typedef long double ac__type_new_;
11623int
11624main ()
11625{
11626if ((ac__type_new_ *) 0)
11627 return 0;
11628if (sizeof (ac__type_new_))
11629 return 0;
11630 ;
11631 return 0;
11632}
11633_ACEOF
11634rm -f conftest.$ac_objext
11635if { (ac_try="$ac_compile"
11636case "(($ac_try" in
11637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11638 *) ac_try_echo=$ac_try;;
11639esac
11640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11641 (eval "$ac_compile") 2>conftest.er1
11642 ac_status=$?
11643 grep -v '^ *+' conftest.er1 >conftest.err
11644 rm -f conftest.er1
11645 cat conftest.err >&5
11646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11647 (exit $ac_status); } && {
11648 test -z "$ac_c_werror_flag" ||
11649 test ! -s conftest.err
11650 } && test -s conftest.$ac_objext; then
11651 ac_cv_type_long_double=yes
11652else
11653 echo "$as_me: failed program was:" >&5
11654sed 's/^/| /' conftest.$ac_ext >&5
11655
11656 ac_cv_type_long_double=no
11657fi
11658
11659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11660fi
11661{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11662echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11663
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011664# The cast to long int works around a bug in the HP C Compiler
11665# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11666# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11667# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011668{ echo "$as_me:$LINENO: checking size of long double" >&5
11669echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011670if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011671 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011672else
11673 if test "$cross_compiling" = yes; then
11674 # Depending upon the size, compute the lo and hi bounds.
11675cat >conftest.$ac_ext <<_ACEOF
11676/* confdefs.h. */
11677_ACEOF
11678cat confdefs.h >>conftest.$ac_ext
11679cat >>conftest.$ac_ext <<_ACEOF
11680/* end confdefs.h. */
11681$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011682 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011683int
11684main ()
11685{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011686static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011687test_array [0] = 0
11688
11689 ;
11690 return 0;
11691}
11692_ACEOF
11693rm -f conftest.$ac_objext
11694if { (ac_try="$ac_compile"
11695case "(($ac_try" in
11696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11697 *) ac_try_echo=$ac_try;;
11698esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011700 (eval "$ac_compile") 2>conftest.er1
11701 ac_status=$?
11702 grep -v '^ *+' conftest.er1 >conftest.err
11703 rm -f conftest.er1
11704 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011706 (exit $ac_status); } && {
11707 test -z "$ac_c_werror_flag" ||
11708 test ! -s conftest.err
11709 } && test -s conftest.$ac_objext; then
11710 ac_lo=0 ac_mid=0
11711 while :; do
11712 cat >conftest.$ac_ext <<_ACEOF
11713/* confdefs.h. */
11714_ACEOF
11715cat confdefs.h >>conftest.$ac_ext
11716cat >>conftest.$ac_ext <<_ACEOF
11717/* end confdefs.h. */
11718$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011719 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011720int
11721main ()
11722{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011723static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011724test_array [0] = 0
11725
11726 ;
11727 return 0;
11728}
11729_ACEOF
11730rm -f conftest.$ac_objext
11731if { (ac_try="$ac_compile"
11732case "(($ac_try" in
11733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11734 *) ac_try_echo=$ac_try;;
11735esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011737 (eval "$ac_compile") 2>conftest.er1
11738 ac_status=$?
11739 grep -v '^ *+' conftest.er1 >conftest.err
11740 rm -f conftest.er1
11741 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011743 (exit $ac_status); } && {
11744 test -z "$ac_c_werror_flag" ||
11745 test ! -s conftest.err
11746 } && test -s conftest.$ac_objext; then
11747 ac_hi=$ac_mid; break
11748else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011749 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011750sed 's/^/| /' conftest.$ac_ext >&5
11751
11752 ac_lo=`expr $ac_mid + 1`
11753 if test $ac_lo -le $ac_mid; then
11754 ac_lo= ac_hi=
11755 break
11756 fi
11757 ac_mid=`expr 2 '*' $ac_mid + 1`
11758fi
11759
11760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11761 done
11762else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011763 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011764sed 's/^/| /' conftest.$ac_ext >&5
11765
11766 cat >conftest.$ac_ext <<_ACEOF
11767/* confdefs.h. */
11768_ACEOF
11769cat confdefs.h >>conftest.$ac_ext
11770cat >>conftest.$ac_ext <<_ACEOF
11771/* end confdefs.h. */
11772$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011773 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011774int
11775main ()
11776{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011777static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011778test_array [0] = 0
11779
11780 ;
11781 return 0;
11782}
11783_ACEOF
11784rm -f conftest.$ac_objext
11785if { (ac_try="$ac_compile"
11786case "(($ac_try" in
11787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11788 *) ac_try_echo=$ac_try;;
11789esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011791 (eval "$ac_compile") 2>conftest.er1
11792 ac_status=$?
11793 grep -v '^ *+' conftest.er1 >conftest.err
11794 rm -f conftest.er1
11795 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011797 (exit $ac_status); } && {
11798 test -z "$ac_c_werror_flag" ||
11799 test ! -s conftest.err
11800 } && test -s conftest.$ac_objext; then
11801 ac_hi=-1 ac_mid=-1
11802 while :; do
11803 cat >conftest.$ac_ext <<_ACEOF
11804/* confdefs.h. */
11805_ACEOF
11806cat confdefs.h >>conftest.$ac_ext
11807cat >>conftest.$ac_ext <<_ACEOF
11808/* end confdefs.h. */
11809$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011810 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011811int
11812main ()
11813{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011814static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011815test_array [0] = 0
11816
11817 ;
11818 return 0;
11819}
11820_ACEOF
11821rm -f conftest.$ac_objext
11822if { (ac_try="$ac_compile"
11823case "(($ac_try" in
11824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11825 *) ac_try_echo=$ac_try;;
11826esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011828 (eval "$ac_compile") 2>conftest.er1
11829 ac_status=$?
11830 grep -v '^ *+' conftest.er1 >conftest.err
11831 rm -f conftest.er1
11832 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011834 (exit $ac_status); } && {
11835 test -z "$ac_c_werror_flag" ||
11836 test ! -s conftest.err
11837 } && test -s conftest.$ac_objext; then
11838 ac_lo=$ac_mid; break
11839else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011840 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011841sed 's/^/| /' conftest.$ac_ext >&5
11842
11843 ac_hi=`expr '(' $ac_mid ')' - 1`
11844 if test $ac_mid -le $ac_hi; then
11845 ac_lo= ac_hi=
11846 break
11847 fi
11848 ac_mid=`expr 2 '*' $ac_mid`
11849fi
11850
11851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11852 done
11853else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011854 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011855sed 's/^/| /' conftest.$ac_ext >&5
11856
11857 ac_lo= ac_hi=
11858fi
11859
11860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11861fi
11862
11863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11864# Binary search between lo and hi bounds.
11865while test "x$ac_lo" != "x$ac_hi"; do
11866 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11867 cat >conftest.$ac_ext <<_ACEOF
11868/* confdefs.h. */
11869_ACEOF
11870cat confdefs.h >>conftest.$ac_ext
11871cat >>conftest.$ac_ext <<_ACEOF
11872/* end confdefs.h. */
11873$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011874 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011875int
11876main ()
11877{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011878static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011879test_array [0] = 0
11880
11881 ;
11882 return 0;
11883}
11884_ACEOF
11885rm -f conftest.$ac_objext
11886if { (ac_try="$ac_compile"
11887case "(($ac_try" in
11888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11889 *) ac_try_echo=$ac_try;;
11890esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011892 (eval "$ac_compile") 2>conftest.er1
11893 ac_status=$?
11894 grep -v '^ *+' conftest.er1 >conftest.err
11895 rm -f conftest.er1
11896 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011898 (exit $ac_status); } && {
11899 test -z "$ac_c_werror_flag" ||
11900 test ! -s conftest.err
11901 } && test -s conftest.$ac_objext; then
11902 ac_hi=$ac_mid
11903else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011904 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011905sed 's/^/| /' conftest.$ac_ext >&5
11906
11907 ac_lo=`expr '(' $ac_mid ')' + 1`
11908fi
11909
11910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11911done
11912case $ac_lo in
11913?*) ac_cv_sizeof_long_double=$ac_lo;;
11914'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011915 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011916See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011917echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011918See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011919 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011920 else
11921 ac_cv_sizeof_long_double=0
11922 fi ;;
11923esac
11924else
11925 cat >conftest.$ac_ext <<_ACEOF
11926/* confdefs.h. */
11927_ACEOF
11928cat confdefs.h >>conftest.$ac_ext
11929cat >>conftest.$ac_ext <<_ACEOF
11930/* end confdefs.h. */
11931$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011932 typedef long double ac__type_sizeof_;
11933static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11934static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011935#include <stdio.h>
11936#include <stdlib.h>
11937int
11938main ()
11939{
11940
11941 FILE *f = fopen ("conftest.val", "w");
11942 if (! f)
11943 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011944 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011945 {
11946 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011947 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011948 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011949 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011950 }
11951 else
11952 {
11953 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011954 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011955 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011956 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011957 }
11958 return ferror (f) || fclose (f) != 0;
11959
11960 ;
11961 return 0;
11962}
11963_ACEOF
11964rm -f conftest$ac_exeext
11965if { (ac_try="$ac_link"
11966case "(($ac_try" in
11967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11968 *) ac_try_echo=$ac_try;;
11969esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011971 (eval "$ac_link") 2>&5
11972 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011974 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11975 { (case "(($ac_try" in
11976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11977 *) ac_try_echo=$ac_try;;
11978esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011980 (eval "$ac_try") 2>&5
11981 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011983 (exit $ac_status); }; }; then
11984 ac_cv_sizeof_long_double=`cat conftest.val`
11985else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011986 echo "$as_me: program exited with status $ac_status" >&5
11987echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011988sed 's/^/| /' conftest.$ac_ext >&5
11989
11990( exit $ac_status )
11991if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011992 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011993See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011994echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011995See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011996 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011997 else
11998 ac_cv_sizeof_long_double=0
11999 fi
12000fi
12001rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12002fi
12003rm -f conftest.val
12004fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012005{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12006echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012007
12008
12009
12010cat >>confdefs.h <<_ACEOF
12011#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12012_ACEOF
12013
12014
12015fi
12016
12017
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012018{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12019echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012020have_c99_bool=no
12021cat >conftest.$ac_ext <<_ACEOF
12022/* confdefs.h. */
12023_ACEOF
12024cat confdefs.h >>conftest.$ac_ext
12025cat >>conftest.$ac_ext <<_ACEOF
12026/* end confdefs.h. */
12027
12028int
12029main ()
12030{
12031_Bool x; x = (_Bool)0;
12032 ;
12033 return 0;
12034}
12035_ACEOF
12036rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012037if { (ac_try="$ac_compile"
12038case "(($ac_try" in
12039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12040 *) ac_try_echo=$ac_try;;
12041esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012043 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012044 ac_status=$?
12045 grep -v '^ *+' conftest.er1 >conftest.err
12046 rm -f conftest.er1
12047 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012049 (exit $ac_status); } && {
12050 test -z "$ac_c_werror_flag" ||
12051 test ! -s conftest.err
12052 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012053
12054
12055cat >>confdefs.h <<\_ACEOF
12056#define HAVE_C99_BOOL 1
12057_ACEOF
12058
12059 have_c99_bool=yes
12060
12061else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012062 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012063sed 's/^/| /' conftest.$ac_ext >&5
12064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012065
Thomas Woutersb2137042007-02-01 18:02:27 +000012066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012067
12068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012069{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12070echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012071if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012072{ echo "$as_me:$LINENO: checking for _Bool" >&5
12073echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12074if test "${ac_cv_type__Bool+set}" = set; then
12075 echo $ECHO_N "(cached) $ECHO_C" >&6
12076else
12077 cat >conftest.$ac_ext <<_ACEOF
12078/* confdefs.h. */
12079_ACEOF
12080cat confdefs.h >>conftest.$ac_ext
12081cat >>conftest.$ac_ext <<_ACEOF
12082/* end confdefs.h. */
12083$ac_includes_default
12084typedef _Bool ac__type_new_;
12085int
12086main ()
12087{
12088if ((ac__type_new_ *) 0)
12089 return 0;
12090if (sizeof (ac__type_new_))
12091 return 0;
12092 ;
12093 return 0;
12094}
12095_ACEOF
12096rm -f conftest.$ac_objext
12097if { (ac_try="$ac_compile"
12098case "(($ac_try" in
12099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12100 *) ac_try_echo=$ac_try;;
12101esac
12102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12103 (eval "$ac_compile") 2>conftest.er1
12104 ac_status=$?
12105 grep -v '^ *+' conftest.er1 >conftest.err
12106 rm -f conftest.er1
12107 cat conftest.err >&5
12108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12109 (exit $ac_status); } && {
12110 test -z "$ac_c_werror_flag" ||
12111 test ! -s conftest.err
12112 } && test -s conftest.$ac_objext; then
12113 ac_cv_type__Bool=yes
12114else
12115 echo "$as_me: failed program was:" >&5
12116sed 's/^/| /' conftest.$ac_ext >&5
12117
12118 ac_cv_type__Bool=no
12119fi
12120
12121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12122fi
12123{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12124echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012126# The cast to long int works around a bug in the HP C Compiler
12127# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12128# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12129# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012130{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12131echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012132if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012133 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012134else
12135 if test "$cross_compiling" = yes; then
12136 # Depending upon the size, compute the lo and hi bounds.
12137cat >conftest.$ac_ext <<_ACEOF
12138/* confdefs.h. */
12139_ACEOF
12140cat confdefs.h >>conftest.$ac_ext
12141cat >>conftest.$ac_ext <<_ACEOF
12142/* end confdefs.h. */
12143$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012144 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012145int
12146main ()
12147{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012148static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012149test_array [0] = 0
12150
12151 ;
12152 return 0;
12153}
12154_ACEOF
12155rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012156if { (ac_try="$ac_compile"
12157case "(($ac_try" in
12158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12159 *) ac_try_echo=$ac_try;;
12160esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012162 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012163 ac_status=$?
12164 grep -v '^ *+' conftest.er1 >conftest.err
12165 rm -f conftest.er1
12166 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012168 (exit $ac_status); } && {
12169 test -z "$ac_c_werror_flag" ||
12170 test ! -s conftest.err
12171 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012172 ac_lo=0 ac_mid=0
12173 while :; do
12174 cat >conftest.$ac_ext <<_ACEOF
12175/* confdefs.h. */
12176_ACEOF
12177cat confdefs.h >>conftest.$ac_ext
12178cat >>conftest.$ac_ext <<_ACEOF
12179/* end confdefs.h. */
12180$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012181 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012182int
12183main ()
12184{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012185static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012186test_array [0] = 0
12187
12188 ;
12189 return 0;
12190}
12191_ACEOF
12192rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012193if { (ac_try="$ac_compile"
12194case "(($ac_try" in
12195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12196 *) ac_try_echo=$ac_try;;
12197esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012199 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012200 ac_status=$?
12201 grep -v '^ *+' conftest.er1 >conftest.err
12202 rm -f conftest.er1
12203 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012205 (exit $ac_status); } && {
12206 test -z "$ac_c_werror_flag" ||
12207 test ! -s conftest.err
12208 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012209 ac_hi=$ac_mid; break
12210else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012211 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012212sed 's/^/| /' conftest.$ac_ext >&5
12213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012214 ac_lo=`expr $ac_mid + 1`
12215 if test $ac_lo -le $ac_mid; then
12216 ac_lo= ac_hi=
12217 break
12218 fi
12219 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012221
12222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012223 done
12224else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012225 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012226sed 's/^/| /' conftest.$ac_ext >&5
12227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012228 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012229/* confdefs.h. */
12230_ACEOF
12231cat confdefs.h >>conftest.$ac_ext
12232cat >>conftest.$ac_ext <<_ACEOF
12233/* end confdefs.h. */
12234$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012235 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012236int
12237main ()
12238{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012239static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012240test_array [0] = 0
12241
12242 ;
12243 return 0;
12244}
12245_ACEOF
12246rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012247if { (ac_try="$ac_compile"
12248case "(($ac_try" in
12249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12250 *) ac_try_echo=$ac_try;;
12251esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012253 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012254 ac_status=$?
12255 grep -v '^ *+' conftest.er1 >conftest.err
12256 rm -f conftest.er1
12257 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012259 (exit $ac_status); } && {
12260 test -z "$ac_c_werror_flag" ||
12261 test ! -s conftest.err
12262 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012263 ac_hi=-1 ac_mid=-1
12264 while :; do
12265 cat >conftest.$ac_ext <<_ACEOF
12266/* confdefs.h. */
12267_ACEOF
12268cat confdefs.h >>conftest.$ac_ext
12269cat >>conftest.$ac_ext <<_ACEOF
12270/* end confdefs.h. */
12271$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012272 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012273int
12274main ()
12275{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012276static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012277test_array [0] = 0
12278
12279 ;
12280 return 0;
12281}
12282_ACEOF
12283rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012284if { (ac_try="$ac_compile"
12285case "(($ac_try" in
12286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12287 *) ac_try_echo=$ac_try;;
12288esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012290 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012291 ac_status=$?
12292 grep -v '^ *+' conftest.er1 >conftest.err
12293 rm -f conftest.er1
12294 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012296 (exit $ac_status); } && {
12297 test -z "$ac_c_werror_flag" ||
12298 test ! -s conftest.err
12299 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012300 ac_lo=$ac_mid; break
12301else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012302 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012303sed 's/^/| /' conftest.$ac_ext >&5
12304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012305 ac_hi=`expr '(' $ac_mid ')' - 1`
12306 if test $ac_mid -le $ac_hi; then
12307 ac_lo= ac_hi=
12308 break
12309 fi
12310 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012312
12313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012314 done
12315else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012316 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012317sed 's/^/| /' conftest.$ac_ext >&5
12318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012319 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012321
12322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012324
12325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012326# Binary search between lo and hi bounds.
12327while test "x$ac_lo" != "x$ac_hi"; do
12328 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12329 cat >conftest.$ac_ext <<_ACEOF
12330/* confdefs.h. */
12331_ACEOF
12332cat confdefs.h >>conftest.$ac_ext
12333cat >>conftest.$ac_ext <<_ACEOF
12334/* end confdefs.h. */
12335$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012336 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012337int
12338main ()
12339{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012340static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012341test_array [0] = 0
12342
12343 ;
12344 return 0;
12345}
12346_ACEOF
12347rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012348if { (ac_try="$ac_compile"
12349case "(($ac_try" in
12350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12351 *) ac_try_echo=$ac_try;;
12352esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012354 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012355 ac_status=$?
12356 grep -v '^ *+' conftest.er1 >conftest.err
12357 rm -f conftest.er1
12358 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012360 (exit $ac_status); } && {
12361 test -z "$ac_c_werror_flag" ||
12362 test ! -s conftest.err
12363 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012364 ac_hi=$ac_mid
12365else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012366 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012367sed 's/^/| /' conftest.$ac_ext >&5
12368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012371
12372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012373done
12374case $ac_lo in
12375?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012376'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012377 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012378See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012379echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012380See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012381 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012382 else
12383 ac_cv_sizeof__Bool=0
12384 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012385esac
12386else
12387 cat >conftest.$ac_ext <<_ACEOF
12388/* confdefs.h. */
12389_ACEOF
12390cat confdefs.h >>conftest.$ac_ext
12391cat >>conftest.$ac_ext <<_ACEOF
12392/* end confdefs.h. */
12393$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012394 typedef _Bool ac__type_sizeof_;
12395static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12396static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012397#include <stdio.h>
12398#include <stdlib.h>
12399int
12400main ()
12401{
12402
12403 FILE *f = fopen ("conftest.val", "w");
12404 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012405 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012406 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012407 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012408 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012409 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012410 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012411 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012412 }
12413 else
12414 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012415 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012416 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012417 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012418 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012419 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012420 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012421
12422 ;
12423 return 0;
12424}
12425_ACEOF
12426rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012427if { (ac_try="$ac_link"
12428case "(($ac_try" in
12429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12430 *) ac_try_echo=$ac_try;;
12431esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012433 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012434 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012436 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012437 { (case "(($ac_try" in
12438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12439 *) ac_try_echo=$ac_try;;
12440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012442 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012443 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012445 (exit $ac_status); }; }; then
12446 ac_cv_sizeof__Bool=`cat conftest.val`
12447else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012448 echo "$as_me: program exited with status $ac_status" >&5
12449echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012450sed 's/^/| /' conftest.$ac_ext >&5
12451
12452( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012453if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012454 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012455See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012456echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012457See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012458 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012459 else
12460 ac_cv_sizeof__Bool=0
12461 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012463rm -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 +000012464fi
12465rm -f conftest.val
12466fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012467{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12468echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012469
12470
12471
Thomas Woutersb2137042007-02-01 18:02:27 +000012472cat >>confdefs.h <<_ACEOF
12473#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12474_ACEOF
12475
12476
12477fi
12478
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012479{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12480echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012481if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012482 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012483else
12484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012485/* confdefs.h. */
12486_ACEOF
12487cat confdefs.h >>conftest.$ac_ext
12488cat >>conftest.$ac_ext <<_ACEOF
12489/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012490#ifdef HAVE_STDINT_H
12491 #include <stdint.h>
12492 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012493
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012494typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012495int
12496main ()
12497{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012498if ((ac__type_new_ *) 0)
12499 return 0;
12500if (sizeof (ac__type_new_))
12501 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012502 ;
12503 return 0;
12504}
12505_ACEOF
12506rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012507if { (ac_try="$ac_compile"
12508case "(($ac_try" in
12509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12510 *) ac_try_echo=$ac_try;;
12511esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012515 grep -v '^ *+' conftest.er1 >conftest.err
12516 rm -f conftest.er1
12517 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012519 (exit $ac_status); } && {
12520 test -z "$ac_c_werror_flag" ||
12521 test ! -s conftest.err
12522 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012523 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012524else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012526sed 's/^/| /' conftest.$ac_ext >&5
12527
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012528 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012530
12531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012532fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012533{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12534echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12535if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012536
12537cat >>confdefs.h <<_ACEOF
12538#define HAVE_UINTPTR_T 1
12539_ACEOF
12540
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012541{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12542echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12543if test "${ac_cv_type_uintptr_t+set}" = set; then
12544 echo $ECHO_N "(cached) $ECHO_C" >&6
12545else
12546 cat >conftest.$ac_ext <<_ACEOF
12547/* confdefs.h. */
12548_ACEOF
12549cat confdefs.h >>conftest.$ac_ext
12550cat >>conftest.$ac_ext <<_ACEOF
12551/* end confdefs.h. */
12552$ac_includes_default
12553typedef uintptr_t ac__type_new_;
12554int
12555main ()
12556{
12557if ((ac__type_new_ *) 0)
12558 return 0;
12559if (sizeof (ac__type_new_))
12560 return 0;
12561 ;
12562 return 0;
12563}
12564_ACEOF
12565rm -f conftest.$ac_objext
12566if { (ac_try="$ac_compile"
12567case "(($ac_try" in
12568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12569 *) ac_try_echo=$ac_try;;
12570esac
12571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12572 (eval "$ac_compile") 2>conftest.er1
12573 ac_status=$?
12574 grep -v '^ *+' conftest.er1 >conftest.err
12575 rm -f conftest.er1
12576 cat conftest.err >&5
12577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12578 (exit $ac_status); } && {
12579 test -z "$ac_c_werror_flag" ||
12580 test ! -s conftest.err
12581 } && test -s conftest.$ac_objext; then
12582 ac_cv_type_uintptr_t=yes
12583else
12584 echo "$as_me: failed program was:" >&5
12585sed 's/^/| /' conftest.$ac_ext >&5
12586
12587 ac_cv_type_uintptr_t=no
12588fi
12589
12590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12591fi
12592{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12593echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012595# The cast to long int works around a bug in the HP C Compiler
12596# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12597# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12598# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012599{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12600echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012601if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012602 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012603else
Martin v. Löwis11437992002-04-12 09:54:03 +000012604 if test "$cross_compiling" = yes; then
12605 # Depending upon the size, compute the lo and hi bounds.
12606cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012607/* confdefs.h. */
12608_ACEOF
12609cat confdefs.h >>conftest.$ac_ext
12610cat >>conftest.$ac_ext <<_ACEOF
12611/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012612$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012613 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012614int
12615main ()
12616{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012617static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012618test_array [0] = 0
12619
12620 ;
12621 return 0;
12622}
12623_ACEOF
12624rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012625if { (ac_try="$ac_compile"
12626case "(($ac_try" in
12627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12628 *) ac_try_echo=$ac_try;;
12629esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012631 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012633 grep -v '^ *+' conftest.er1 >conftest.err
12634 rm -f conftest.er1
12635 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012637 (exit $ac_status); } && {
12638 test -z "$ac_c_werror_flag" ||
12639 test ! -s conftest.err
12640 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012641 ac_lo=0 ac_mid=0
12642 while :; do
12643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012644/* confdefs.h. */
12645_ACEOF
12646cat confdefs.h >>conftest.$ac_ext
12647cat >>conftest.$ac_ext <<_ACEOF
12648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012649$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012650 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012651int
12652main ()
12653{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012654static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012655test_array [0] = 0
12656
12657 ;
12658 return 0;
12659}
12660_ACEOF
12661rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012662if { (ac_try="$ac_compile"
12663case "(($ac_try" in
12664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12665 *) ac_try_echo=$ac_try;;
12666esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012668 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012669 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012670 grep -v '^ *+' conftest.er1 >conftest.err
12671 rm -f conftest.er1
12672 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012674 (exit $ac_status); } && {
12675 test -z "$ac_c_werror_flag" ||
12676 test ! -s conftest.err
12677 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012678 ac_hi=$ac_mid; break
12679else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012681sed 's/^/| /' conftest.$ac_ext >&5
12682
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012683 ac_lo=`expr $ac_mid + 1`
12684 if test $ac_lo -le $ac_mid; then
12685 ac_lo= ac_hi=
12686 break
12687 fi
12688 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012690
12691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012692 done
12693else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012695sed 's/^/| /' conftest.$ac_ext >&5
12696
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012697 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012698/* confdefs.h. */
12699_ACEOF
12700cat confdefs.h >>conftest.$ac_ext
12701cat >>conftest.$ac_ext <<_ACEOF
12702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012703$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012704 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012705int
12706main ()
12707{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012708static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012709test_array [0] = 0
12710
12711 ;
12712 return 0;
12713}
12714_ACEOF
12715rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012716if { (ac_try="$ac_compile"
12717case "(($ac_try" in
12718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12719 *) ac_try_echo=$ac_try;;
12720esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012722 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012723 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012724 grep -v '^ *+' conftest.er1 >conftest.err
12725 rm -f conftest.er1
12726 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012728 (exit $ac_status); } && {
12729 test -z "$ac_c_werror_flag" ||
12730 test ! -s conftest.err
12731 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012732 ac_hi=-1 ac_mid=-1
12733 while :; do
12734 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012735/* confdefs.h. */
12736_ACEOF
12737cat confdefs.h >>conftest.$ac_ext
12738cat >>conftest.$ac_ext <<_ACEOF
12739/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012740$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012741 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012742int
12743main ()
12744{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012745static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012746test_array [0] = 0
12747
12748 ;
12749 return 0;
12750}
12751_ACEOF
12752rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012753if { (ac_try="$ac_compile"
12754case "(($ac_try" in
12755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12756 *) ac_try_echo=$ac_try;;
12757esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012759 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012760 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012761 grep -v '^ *+' conftest.er1 >conftest.err
12762 rm -f conftest.er1
12763 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012765 (exit $ac_status); } && {
12766 test -z "$ac_c_werror_flag" ||
12767 test ! -s conftest.err
12768 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012769 ac_lo=$ac_mid; break
12770else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012772sed 's/^/| /' conftest.$ac_ext >&5
12773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012774 ac_hi=`expr '(' $ac_mid ')' - 1`
12775 if test $ac_mid -le $ac_hi; then
12776 ac_lo= ac_hi=
12777 break
12778 fi
12779 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012781
12782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012783 done
12784else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012786sed 's/^/| /' conftest.$ac_ext >&5
12787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012788 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012790
12791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012793
12794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012795# Binary search between lo and hi bounds.
12796while test "x$ac_lo" != "x$ac_hi"; do
12797 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12798 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012799/* confdefs.h. */
12800_ACEOF
12801cat confdefs.h >>conftest.$ac_ext
12802cat >>conftest.$ac_ext <<_ACEOF
12803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012804$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012805 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012806int
12807main ()
12808{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012809static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012810test_array [0] = 0
12811
12812 ;
12813 return 0;
12814}
12815_ACEOF
12816rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012817if { (ac_try="$ac_compile"
12818case "(($ac_try" in
12819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12820 *) ac_try_echo=$ac_try;;
12821esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012823 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012824 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012825 grep -v '^ *+' conftest.er1 >conftest.err
12826 rm -f conftest.er1
12827 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012829 (exit $ac_status); } && {
12830 test -z "$ac_c_werror_flag" ||
12831 test ! -s conftest.err
12832 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012833 ac_hi=$ac_mid
12834else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012836sed 's/^/| /' conftest.$ac_ext >&5
12837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012838 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012840
12841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012842done
12843case $ac_lo in
12844?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012845'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012846 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012847See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012848echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012849See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012850 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012851 else
12852 ac_cv_sizeof_uintptr_t=0
12853 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012854esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012855else
Martin v. Löwis11437992002-04-12 09:54:03 +000012856 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012857/* confdefs.h. */
12858_ACEOF
12859cat confdefs.h >>conftest.$ac_ext
12860cat >>conftest.$ac_ext <<_ACEOF
12861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012862$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012863 typedef uintptr_t ac__type_sizeof_;
12864static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12865static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012866#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012867#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012868int
12869main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012870{
Martin v. Löwis11437992002-04-12 09:54:03 +000012871
12872 FILE *f = fopen ("conftest.val", "w");
12873 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012874 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012875 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012876 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012877 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012878 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012879 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012880 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012881 }
12882 else
12883 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012884 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012885 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012886 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012887 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012888 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012889 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012890
12891 ;
12892 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012893}
Martin v. Löwis11437992002-04-12 09:54:03 +000012894_ACEOF
12895rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012896if { (ac_try="$ac_link"
12897case "(($ac_try" in
12898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12899 *) ac_try_echo=$ac_try;;
12900esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012902 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012903 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012905 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012906 { (case "(($ac_try" in
12907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12908 *) ac_try_echo=$ac_try;;
12909esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012912 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012914 (exit $ac_status); }; }; then
12915 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012916else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012917 echo "$as_me: program exited with status $ac_status" >&5
12918echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012919sed 's/^/| /' conftest.$ac_ext >&5
12920
Martin v. Löwis11437992002-04-12 09:54:03 +000012921( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012922if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012923 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012924See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012925echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012926See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012927 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012928 else
12929 ac_cv_sizeof_uintptr_t=0
12930 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932rm -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 +000012933fi
12934rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012935fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012936{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12937echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012938
12939
12940
Martin v. Löwis11437992002-04-12 09:54:03 +000012941cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012942#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012943_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012944
Michael W. Hudson54241132001-12-07 15:38:26 +000012945
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012946fi
12947
Thomas Wouters89f507f2006-12-13 04:49:30 +000012948
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012949{ echo "$as_me:$LINENO: checking for off_t" >&5
12950echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
12951if test "${ac_cv_type_off_t+set}" = set; then
12952 echo $ECHO_N "(cached) $ECHO_C" >&6
12953else
12954 cat >conftest.$ac_ext <<_ACEOF
12955/* confdefs.h. */
12956_ACEOF
12957cat confdefs.h >>conftest.$ac_ext
12958cat >>conftest.$ac_ext <<_ACEOF
12959/* end confdefs.h. */
12960
12961#ifdef HAVE_SYS_TYPES_H
12962#include <sys/types.h>
12963#endif
12964
12965
12966typedef off_t ac__type_new_;
12967int
12968main ()
12969{
12970if ((ac__type_new_ *) 0)
12971 return 0;
12972if (sizeof (ac__type_new_))
12973 return 0;
12974 ;
12975 return 0;
12976}
12977_ACEOF
12978rm -f conftest.$ac_objext
12979if { (ac_try="$ac_compile"
12980case "(($ac_try" in
12981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12982 *) ac_try_echo=$ac_try;;
12983esac
12984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12985 (eval "$ac_compile") 2>conftest.er1
12986 ac_status=$?
12987 grep -v '^ *+' conftest.er1 >conftest.err
12988 rm -f conftest.er1
12989 cat conftest.err >&5
12990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12991 (exit $ac_status); } && {
12992 test -z "$ac_c_werror_flag" ||
12993 test ! -s conftest.err
12994 } && test -s conftest.$ac_objext; then
12995 ac_cv_type_off_t=yes
12996else
12997 echo "$as_me: failed program was:" >&5
12998sed 's/^/| /' conftest.$ac_ext >&5
12999
13000 ac_cv_type_off_t=no
13001fi
13002
13003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13004fi
13005{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13006echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13007
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013008# The cast to long int works around a bug in the HP C Compiler
13009# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13010# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13011# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013012{ echo "$as_me:$LINENO: checking size of off_t" >&5
13013echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013014if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013015 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013016else
13017 if test "$cross_compiling" = yes; then
13018 # Depending upon the size, compute the lo and hi bounds.
13019cat >conftest.$ac_ext <<_ACEOF
13020/* confdefs.h. */
13021_ACEOF
13022cat confdefs.h >>conftest.$ac_ext
13023cat >>conftest.$ac_ext <<_ACEOF
13024/* end confdefs.h. */
13025
13026#ifdef HAVE_SYS_TYPES_H
13027#include <sys/types.h>
13028#endif
13029
13030
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013031 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013032int
13033main ()
13034{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013035static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013036test_array [0] = 0
13037
13038 ;
13039 return 0;
13040}
13041_ACEOF
13042rm -f conftest.$ac_objext
13043if { (ac_try="$ac_compile"
13044case "(($ac_try" in
13045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13046 *) ac_try_echo=$ac_try;;
13047esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013049 (eval "$ac_compile") 2>conftest.er1
13050 ac_status=$?
13051 grep -v '^ *+' conftest.er1 >conftest.err
13052 rm -f conftest.er1
13053 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013055 (exit $ac_status); } && {
13056 test -z "$ac_c_werror_flag" ||
13057 test ! -s conftest.err
13058 } && test -s conftest.$ac_objext; then
13059 ac_lo=0 ac_mid=0
13060 while :; do
13061 cat >conftest.$ac_ext <<_ACEOF
13062/* confdefs.h. */
13063_ACEOF
13064cat confdefs.h >>conftest.$ac_ext
13065cat >>conftest.$ac_ext <<_ACEOF
13066/* end confdefs.h. */
13067
13068#ifdef HAVE_SYS_TYPES_H
13069#include <sys/types.h>
13070#endif
13071
13072
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013073 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013074int
13075main ()
13076{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013077static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013078test_array [0] = 0
13079
13080 ;
13081 return 0;
13082}
13083_ACEOF
13084rm -f conftest.$ac_objext
13085if { (ac_try="$ac_compile"
13086case "(($ac_try" in
13087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13088 *) ac_try_echo=$ac_try;;
13089esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013091 (eval "$ac_compile") 2>conftest.er1
13092 ac_status=$?
13093 grep -v '^ *+' conftest.er1 >conftest.err
13094 rm -f conftest.er1
13095 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013097 (exit $ac_status); } && {
13098 test -z "$ac_c_werror_flag" ||
13099 test ! -s conftest.err
13100 } && test -s conftest.$ac_objext; then
13101 ac_hi=$ac_mid; break
13102else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013103 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013104sed 's/^/| /' conftest.$ac_ext >&5
13105
13106 ac_lo=`expr $ac_mid + 1`
13107 if test $ac_lo -le $ac_mid; then
13108 ac_lo= ac_hi=
13109 break
13110 fi
13111 ac_mid=`expr 2 '*' $ac_mid + 1`
13112fi
13113
13114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13115 done
13116else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013117 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013118sed 's/^/| /' conftest.$ac_ext >&5
13119
13120 cat >conftest.$ac_ext <<_ACEOF
13121/* confdefs.h. */
13122_ACEOF
13123cat confdefs.h >>conftest.$ac_ext
13124cat >>conftest.$ac_ext <<_ACEOF
13125/* end confdefs.h. */
13126
13127#ifdef HAVE_SYS_TYPES_H
13128#include <sys/types.h>
13129#endif
13130
13131
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013132 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013133int
13134main ()
13135{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013136static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013137test_array [0] = 0
13138
13139 ;
13140 return 0;
13141}
13142_ACEOF
13143rm -f conftest.$ac_objext
13144if { (ac_try="$ac_compile"
13145case "(($ac_try" in
13146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13147 *) ac_try_echo=$ac_try;;
13148esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013150 (eval "$ac_compile") 2>conftest.er1
13151 ac_status=$?
13152 grep -v '^ *+' conftest.er1 >conftest.err
13153 rm -f conftest.er1
13154 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013156 (exit $ac_status); } && {
13157 test -z "$ac_c_werror_flag" ||
13158 test ! -s conftest.err
13159 } && test -s conftest.$ac_objext; then
13160 ac_hi=-1 ac_mid=-1
13161 while :; do
13162 cat >conftest.$ac_ext <<_ACEOF
13163/* confdefs.h. */
13164_ACEOF
13165cat confdefs.h >>conftest.$ac_ext
13166cat >>conftest.$ac_ext <<_ACEOF
13167/* end confdefs.h. */
13168
13169#ifdef HAVE_SYS_TYPES_H
13170#include <sys/types.h>
13171#endif
13172
13173
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013174 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013175int
13176main ()
13177{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013178static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013179test_array [0] = 0
13180
13181 ;
13182 return 0;
13183}
13184_ACEOF
13185rm -f conftest.$ac_objext
13186if { (ac_try="$ac_compile"
13187case "(($ac_try" in
13188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13189 *) ac_try_echo=$ac_try;;
13190esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013192 (eval "$ac_compile") 2>conftest.er1
13193 ac_status=$?
13194 grep -v '^ *+' conftest.er1 >conftest.err
13195 rm -f conftest.er1
13196 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013198 (exit $ac_status); } && {
13199 test -z "$ac_c_werror_flag" ||
13200 test ! -s conftest.err
13201 } && test -s conftest.$ac_objext; then
13202 ac_lo=$ac_mid; break
13203else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013204 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013205sed 's/^/| /' conftest.$ac_ext >&5
13206
13207 ac_hi=`expr '(' $ac_mid ')' - 1`
13208 if test $ac_mid -le $ac_hi; then
13209 ac_lo= ac_hi=
13210 break
13211 fi
13212 ac_mid=`expr 2 '*' $ac_mid`
13213fi
13214
13215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13216 done
13217else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013218 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013219sed 's/^/| /' conftest.$ac_ext >&5
13220
13221 ac_lo= ac_hi=
13222fi
13223
13224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13225fi
13226
13227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13228# Binary search between lo and hi bounds.
13229while test "x$ac_lo" != "x$ac_hi"; do
13230 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13231 cat >conftest.$ac_ext <<_ACEOF
13232/* confdefs.h. */
13233_ACEOF
13234cat confdefs.h >>conftest.$ac_ext
13235cat >>conftest.$ac_ext <<_ACEOF
13236/* end confdefs.h. */
13237
13238#ifdef HAVE_SYS_TYPES_H
13239#include <sys/types.h>
13240#endif
13241
13242
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013243 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013244int
13245main ()
13246{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013247static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013248test_array [0] = 0
13249
13250 ;
13251 return 0;
13252}
13253_ACEOF
13254rm -f conftest.$ac_objext
13255if { (ac_try="$ac_compile"
13256case "(($ac_try" in
13257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13258 *) ac_try_echo=$ac_try;;
13259esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013261 (eval "$ac_compile") 2>conftest.er1
13262 ac_status=$?
13263 grep -v '^ *+' conftest.er1 >conftest.err
13264 rm -f conftest.er1
13265 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013267 (exit $ac_status); } && {
13268 test -z "$ac_c_werror_flag" ||
13269 test ! -s conftest.err
13270 } && test -s conftest.$ac_objext; then
13271 ac_hi=$ac_mid
13272else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013273 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013274sed 's/^/| /' conftest.$ac_ext >&5
13275
13276 ac_lo=`expr '(' $ac_mid ')' + 1`
13277fi
13278
13279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13280done
13281case $ac_lo in
13282?*) ac_cv_sizeof_off_t=$ac_lo;;
13283'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013284 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013285See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013286echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013287See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013288 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013289 else
13290 ac_cv_sizeof_off_t=0
13291 fi ;;
13292esac
13293else
13294 cat >conftest.$ac_ext <<_ACEOF
13295/* confdefs.h. */
13296_ACEOF
13297cat confdefs.h >>conftest.$ac_ext
13298cat >>conftest.$ac_ext <<_ACEOF
13299/* end confdefs.h. */
13300
13301#ifdef HAVE_SYS_TYPES_H
13302#include <sys/types.h>
13303#endif
13304
13305
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013306 typedef off_t ac__type_sizeof_;
13307static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13308static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013309#include <stdio.h>
13310#include <stdlib.h>
13311int
13312main ()
13313{
13314
13315 FILE *f = fopen ("conftest.val", "w");
13316 if (! f)
13317 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013318 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013319 {
13320 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013321 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013322 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013323 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013324 }
13325 else
13326 {
13327 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013328 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013329 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013330 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013331 }
13332 return ferror (f) || fclose (f) != 0;
13333
13334 ;
13335 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013336}
Martin v. Löwis11437992002-04-12 09:54:03 +000013337_ACEOF
13338rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013339if { (ac_try="$ac_link"
13340case "(($ac_try" in
13341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13342 *) ac_try_echo=$ac_try;;
13343esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013345 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013346 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013348 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013349 { (case "(($ac_try" in
13350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13351 *) ac_try_echo=$ac_try;;
13352esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013354 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013355 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013357 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013358 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013359else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013360 echo "$as_me: program exited with status $ac_status" >&5
13361echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013362sed 's/^/| /' conftest.$ac_ext >&5
13363
Martin v. Löwis11437992002-04-12 09:54:03 +000013364( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013365if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013366 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013367See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013368echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013369See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013370 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013371 else
13372 ac_cv_sizeof_off_t=0
13373 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013375rm -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 +000013376fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013377rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013378fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013379{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13380echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013381
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013382
13383
Martin v. Löwis11437992002-04-12 09:54:03 +000013384cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013385#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013386_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013387
Michael W. Hudson54241132001-12-07 15:38:26 +000013388
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013389
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013390{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13391echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013392if test "$have_long_long" = yes -a \
13393 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13394 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013395
Martin v. Löwis11437992002-04-12 09:54:03 +000013396cat >>confdefs.h <<\_ACEOF
13397#define HAVE_LARGEFILE_SUPPORT 1
13398_ACEOF
13399
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013400 { echo "$as_me:$LINENO: result: yes" >&5
13401echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013402else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013403 { echo "$as_me:$LINENO: result: no" >&5
13404echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013405fi
13406
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013407{ echo "$as_me:$LINENO: checking for time_t" >&5
13408echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13409if test "${ac_cv_type_time_t+set}" = set; then
13410 echo $ECHO_N "(cached) $ECHO_C" >&6
13411else
13412 cat >conftest.$ac_ext <<_ACEOF
13413/* confdefs.h. */
13414_ACEOF
13415cat confdefs.h >>conftest.$ac_ext
13416cat >>conftest.$ac_ext <<_ACEOF
13417/* end confdefs.h. */
13418
13419#ifdef HAVE_SYS_TYPES_H
13420#include <sys/types.h>
13421#endif
13422#ifdef HAVE_TIME_H
13423#include <time.h>
13424#endif
13425
13426
13427typedef time_t ac__type_new_;
13428int
13429main ()
13430{
13431if ((ac__type_new_ *) 0)
13432 return 0;
13433if (sizeof (ac__type_new_))
13434 return 0;
13435 ;
13436 return 0;
13437}
13438_ACEOF
13439rm -f conftest.$ac_objext
13440if { (ac_try="$ac_compile"
13441case "(($ac_try" in
13442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13443 *) ac_try_echo=$ac_try;;
13444esac
13445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13446 (eval "$ac_compile") 2>conftest.er1
13447 ac_status=$?
13448 grep -v '^ *+' conftest.er1 >conftest.err
13449 rm -f conftest.er1
13450 cat conftest.err >&5
13451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13452 (exit $ac_status); } && {
13453 test -z "$ac_c_werror_flag" ||
13454 test ! -s conftest.err
13455 } && test -s conftest.$ac_objext; then
13456 ac_cv_type_time_t=yes
13457else
13458 echo "$as_me: failed program was:" >&5
13459sed 's/^/| /' conftest.$ac_ext >&5
13460
13461 ac_cv_type_time_t=no
13462fi
13463
13464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13465fi
13466{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13467echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13468
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013469# The cast to long int works around a bug in the HP C Compiler
13470# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13471# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13472# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013473{ echo "$as_me:$LINENO: checking size of time_t" >&5
13474echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013475if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013476 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013477else
13478 if test "$cross_compiling" = yes; then
13479 # Depending upon the size, compute the lo and hi bounds.
13480cat >conftest.$ac_ext <<_ACEOF
13481/* confdefs.h. */
13482_ACEOF
13483cat confdefs.h >>conftest.$ac_ext
13484cat >>conftest.$ac_ext <<_ACEOF
13485/* end confdefs.h. */
13486
13487#ifdef HAVE_SYS_TYPES_H
13488#include <sys/types.h>
13489#endif
13490#ifdef HAVE_TIME_H
13491#include <time.h>
13492#endif
13493
13494
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013495 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013496int
13497main ()
13498{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013499static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013500test_array [0] = 0
13501
13502 ;
13503 return 0;
13504}
13505_ACEOF
13506rm -f conftest.$ac_objext
13507if { (ac_try="$ac_compile"
13508case "(($ac_try" in
13509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13510 *) ac_try_echo=$ac_try;;
13511esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013513 (eval "$ac_compile") 2>conftest.er1
13514 ac_status=$?
13515 grep -v '^ *+' conftest.er1 >conftest.err
13516 rm -f conftest.er1
13517 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013519 (exit $ac_status); } && {
13520 test -z "$ac_c_werror_flag" ||
13521 test ! -s conftest.err
13522 } && test -s conftest.$ac_objext; then
13523 ac_lo=0 ac_mid=0
13524 while :; do
13525 cat >conftest.$ac_ext <<_ACEOF
13526/* confdefs.h. */
13527_ACEOF
13528cat confdefs.h >>conftest.$ac_ext
13529cat >>conftest.$ac_ext <<_ACEOF
13530/* end confdefs.h. */
13531
13532#ifdef HAVE_SYS_TYPES_H
13533#include <sys/types.h>
13534#endif
13535#ifdef HAVE_TIME_H
13536#include <time.h>
13537#endif
13538
13539
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013540 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013541int
13542main ()
13543{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013544static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013545test_array [0] = 0
13546
13547 ;
13548 return 0;
13549}
13550_ACEOF
13551rm -f conftest.$ac_objext
13552if { (ac_try="$ac_compile"
13553case "(($ac_try" in
13554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13555 *) ac_try_echo=$ac_try;;
13556esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013558 (eval "$ac_compile") 2>conftest.er1
13559 ac_status=$?
13560 grep -v '^ *+' conftest.er1 >conftest.err
13561 rm -f conftest.er1
13562 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013564 (exit $ac_status); } && {
13565 test -z "$ac_c_werror_flag" ||
13566 test ! -s conftest.err
13567 } && test -s conftest.$ac_objext; then
13568 ac_hi=$ac_mid; break
13569else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013570 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013571sed 's/^/| /' conftest.$ac_ext >&5
13572
13573 ac_lo=`expr $ac_mid + 1`
13574 if test $ac_lo -le $ac_mid; then
13575 ac_lo= ac_hi=
13576 break
13577 fi
13578 ac_mid=`expr 2 '*' $ac_mid + 1`
13579fi
13580
13581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13582 done
13583else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013584 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013585sed 's/^/| /' conftest.$ac_ext >&5
13586
13587 cat >conftest.$ac_ext <<_ACEOF
13588/* confdefs.h. */
13589_ACEOF
13590cat confdefs.h >>conftest.$ac_ext
13591cat >>conftest.$ac_ext <<_ACEOF
13592/* end confdefs.h. */
13593
13594#ifdef HAVE_SYS_TYPES_H
13595#include <sys/types.h>
13596#endif
13597#ifdef HAVE_TIME_H
13598#include <time.h>
13599#endif
13600
13601
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013602 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013603int
13604main ()
13605{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013606static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013607test_array [0] = 0
13608
13609 ;
13610 return 0;
13611}
13612_ACEOF
13613rm -f conftest.$ac_objext
13614if { (ac_try="$ac_compile"
13615case "(($ac_try" in
13616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13617 *) ac_try_echo=$ac_try;;
13618esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013620 (eval "$ac_compile") 2>conftest.er1
13621 ac_status=$?
13622 grep -v '^ *+' conftest.er1 >conftest.err
13623 rm -f conftest.er1
13624 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013626 (exit $ac_status); } && {
13627 test -z "$ac_c_werror_flag" ||
13628 test ! -s conftest.err
13629 } && test -s conftest.$ac_objext; then
13630 ac_hi=-1 ac_mid=-1
13631 while :; do
13632 cat >conftest.$ac_ext <<_ACEOF
13633/* confdefs.h. */
13634_ACEOF
13635cat confdefs.h >>conftest.$ac_ext
13636cat >>conftest.$ac_ext <<_ACEOF
13637/* end confdefs.h. */
13638
13639#ifdef HAVE_SYS_TYPES_H
13640#include <sys/types.h>
13641#endif
13642#ifdef HAVE_TIME_H
13643#include <time.h>
13644#endif
13645
13646
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013647 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013648int
13649main ()
13650{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013651static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013652test_array [0] = 0
13653
13654 ;
13655 return 0;
13656}
13657_ACEOF
13658rm -f conftest.$ac_objext
13659if { (ac_try="$ac_compile"
13660case "(($ac_try" in
13661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13662 *) ac_try_echo=$ac_try;;
13663esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013665 (eval "$ac_compile") 2>conftest.er1
13666 ac_status=$?
13667 grep -v '^ *+' conftest.er1 >conftest.err
13668 rm -f conftest.er1
13669 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013671 (exit $ac_status); } && {
13672 test -z "$ac_c_werror_flag" ||
13673 test ! -s conftest.err
13674 } && test -s conftest.$ac_objext; then
13675 ac_lo=$ac_mid; break
13676else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013677 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013678sed 's/^/| /' conftest.$ac_ext >&5
13679
13680 ac_hi=`expr '(' $ac_mid ')' - 1`
13681 if test $ac_mid -le $ac_hi; then
13682 ac_lo= ac_hi=
13683 break
13684 fi
13685 ac_mid=`expr 2 '*' $ac_mid`
13686fi
13687
13688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13689 done
13690else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013691 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013692sed 's/^/| /' conftest.$ac_ext >&5
13693
13694 ac_lo= ac_hi=
13695fi
13696
13697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13698fi
13699
13700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13701# Binary search between lo and hi bounds.
13702while test "x$ac_lo" != "x$ac_hi"; do
13703 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13704 cat >conftest.$ac_ext <<_ACEOF
13705/* confdefs.h. */
13706_ACEOF
13707cat confdefs.h >>conftest.$ac_ext
13708cat >>conftest.$ac_ext <<_ACEOF
13709/* end confdefs.h. */
13710
13711#ifdef HAVE_SYS_TYPES_H
13712#include <sys/types.h>
13713#endif
13714#ifdef HAVE_TIME_H
13715#include <time.h>
13716#endif
13717
13718
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013719 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013720int
13721main ()
13722{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013723static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013724test_array [0] = 0
13725
13726 ;
13727 return 0;
13728}
13729_ACEOF
13730rm -f conftest.$ac_objext
13731if { (ac_try="$ac_compile"
13732case "(($ac_try" in
13733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13734 *) ac_try_echo=$ac_try;;
13735esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013737 (eval "$ac_compile") 2>conftest.er1
13738 ac_status=$?
13739 grep -v '^ *+' conftest.er1 >conftest.err
13740 rm -f conftest.er1
13741 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013743 (exit $ac_status); } && {
13744 test -z "$ac_c_werror_flag" ||
13745 test ! -s conftest.err
13746 } && test -s conftest.$ac_objext; then
13747 ac_hi=$ac_mid
13748else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013749 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013750sed 's/^/| /' conftest.$ac_ext >&5
13751
13752 ac_lo=`expr '(' $ac_mid ')' + 1`
13753fi
13754
13755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13756done
13757case $ac_lo in
13758?*) ac_cv_sizeof_time_t=$ac_lo;;
13759'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013760 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013761See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013762echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013763See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013764 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013765 else
13766 ac_cv_sizeof_time_t=0
13767 fi ;;
13768esac
13769else
13770 cat >conftest.$ac_ext <<_ACEOF
13771/* confdefs.h. */
13772_ACEOF
13773cat confdefs.h >>conftest.$ac_ext
13774cat >>conftest.$ac_ext <<_ACEOF
13775/* end confdefs.h. */
13776
13777#ifdef HAVE_SYS_TYPES_H
13778#include <sys/types.h>
13779#endif
13780#ifdef HAVE_TIME_H
13781#include <time.h>
13782#endif
13783
13784
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013785 typedef time_t ac__type_sizeof_;
13786static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13787static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013788#include <stdio.h>
13789#include <stdlib.h>
13790int
13791main ()
13792{
13793
13794 FILE *f = fopen ("conftest.val", "w");
13795 if (! f)
13796 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013797 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013798 {
13799 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013800 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013801 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013802 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013803 }
13804 else
13805 {
13806 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013807 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013808 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013809 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013810 }
13811 return ferror (f) || fclose (f) != 0;
13812
13813 ;
13814 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013815}
Martin v. Löwis11437992002-04-12 09:54:03 +000013816_ACEOF
13817rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013818if { (ac_try="$ac_link"
13819case "(($ac_try" in
13820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13821 *) ac_try_echo=$ac_try;;
13822esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013824 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013825 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013827 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013828 { (case "(($ac_try" in
13829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13830 *) ac_try_echo=$ac_try;;
13831esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013833 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013836 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013837 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013838else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013839 echo "$as_me: program exited with status $ac_status" >&5
13840echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013841sed 's/^/| /' conftest.$ac_ext >&5
13842
Martin v. Löwis11437992002-04-12 09:54:03 +000013843( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013844if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013845 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013846See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013847echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013848See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013849 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013850 else
13851 ac_cv_sizeof_time_t=0
13852 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013854rm -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 +000013855fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013856rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013857fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013858{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13859echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013860
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013861
13862
Martin v. Löwis11437992002-04-12 09:54:03 +000013863cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013864#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013865_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013866
Michael W. Hudson54241132001-12-07 15:38:26 +000013867
13868
Trent Mick635f6fb2000-08-23 21:33:05 +000013869# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013870ac_save_cc="$CC"
13871if test "$ac_cv_kpthread" = "yes"
13872then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013873elif test "$ac_cv_kthread" = "yes"
13874then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013875elif test "$ac_cv_pthread" = "yes"
13876then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013877fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013878
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013879{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13880echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013881have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013882cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013883/* confdefs.h. */
13884_ACEOF
13885cat confdefs.h >>conftest.$ac_ext
13886cat >>conftest.$ac_ext <<_ACEOF
13887/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013888#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013889int
13890main ()
13891{
Guido van Rossum12580492000-09-24 16:47:19 +000013892pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013893 ;
13894 return 0;
13895}
13896_ACEOF
13897rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013898if { (ac_try="$ac_compile"
13899case "(($ac_try" in
13900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13901 *) ac_try_echo=$ac_try;;
13902esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013904 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013905 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013906 grep -v '^ *+' conftest.er1 >conftest.err
13907 rm -f conftest.er1
13908 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013910 (exit $ac_status); } && {
13911 test -z "$ac_c_werror_flag" ||
13912 test ! -s conftest.err
13913 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013914 have_pthread_t=yes
13915else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013917sed 's/^/| /' conftest.$ac_ext >&5
13918
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013919
Trent Mick635f6fb2000-08-23 21:33:05 +000013920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013921
13922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013923{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13924echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013925if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013926 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13927echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13928if test "${ac_cv_type_pthread_t+set}" = set; then
13929 echo $ECHO_N "(cached) $ECHO_C" >&6
13930else
13931 cat >conftest.$ac_ext <<_ACEOF
13932/* confdefs.h. */
13933_ACEOF
13934cat confdefs.h >>conftest.$ac_ext
13935cat >>conftest.$ac_ext <<_ACEOF
13936/* end confdefs.h. */
13937
13938#ifdef HAVE_PTHREAD_H
13939#include <pthread.h>
13940#endif
13941
13942
13943typedef pthread_t ac__type_new_;
13944int
13945main ()
13946{
13947if ((ac__type_new_ *) 0)
13948 return 0;
13949if (sizeof (ac__type_new_))
13950 return 0;
13951 ;
13952 return 0;
13953}
13954_ACEOF
13955rm -f conftest.$ac_objext
13956if { (ac_try="$ac_compile"
13957case "(($ac_try" in
13958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13959 *) ac_try_echo=$ac_try;;
13960esac
13961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13962 (eval "$ac_compile") 2>conftest.er1
13963 ac_status=$?
13964 grep -v '^ *+' conftest.er1 >conftest.err
13965 rm -f conftest.er1
13966 cat conftest.err >&5
13967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13968 (exit $ac_status); } && {
13969 test -z "$ac_c_werror_flag" ||
13970 test ! -s conftest.err
13971 } && test -s conftest.$ac_objext; then
13972 ac_cv_type_pthread_t=yes
13973else
13974 echo "$as_me: failed program was:" >&5
13975sed 's/^/| /' conftest.$ac_ext >&5
13976
13977 ac_cv_type_pthread_t=no
13978fi
13979
13980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13981fi
13982{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
13983echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
13984
13985# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013986# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13987# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13988# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013989{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
13990echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013991if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013992 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013993else
13994 if test "$cross_compiling" = yes; then
13995 # Depending upon the size, compute the lo and hi bounds.
13996cat >conftest.$ac_ext <<_ACEOF
13997/* confdefs.h. */
13998_ACEOF
13999cat confdefs.h >>conftest.$ac_ext
14000cat >>conftest.$ac_ext <<_ACEOF
14001/* end confdefs.h. */
14002
14003#ifdef HAVE_PTHREAD_H
14004#include <pthread.h>
14005#endif
14006
14007
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014008 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014009int
14010main ()
14011{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014012static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014013test_array [0] = 0
14014
14015 ;
14016 return 0;
14017}
14018_ACEOF
14019rm -f conftest.$ac_objext
14020if { (ac_try="$ac_compile"
14021case "(($ac_try" in
14022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14023 *) ac_try_echo=$ac_try;;
14024esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014026 (eval "$ac_compile") 2>conftest.er1
14027 ac_status=$?
14028 grep -v '^ *+' conftest.er1 >conftest.err
14029 rm -f conftest.er1
14030 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014032 (exit $ac_status); } && {
14033 test -z "$ac_c_werror_flag" ||
14034 test ! -s conftest.err
14035 } && test -s conftest.$ac_objext; then
14036 ac_lo=0 ac_mid=0
14037 while :; do
14038 cat >conftest.$ac_ext <<_ACEOF
14039/* confdefs.h. */
14040_ACEOF
14041cat confdefs.h >>conftest.$ac_ext
14042cat >>conftest.$ac_ext <<_ACEOF
14043/* end confdefs.h. */
14044
14045#ifdef HAVE_PTHREAD_H
14046#include <pthread.h>
14047#endif
14048
14049
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014050 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014051int
14052main ()
14053{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014054static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014055test_array [0] = 0
14056
14057 ;
14058 return 0;
14059}
14060_ACEOF
14061rm -f conftest.$ac_objext
14062if { (ac_try="$ac_compile"
14063case "(($ac_try" in
14064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14065 *) ac_try_echo=$ac_try;;
14066esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014068 (eval "$ac_compile") 2>conftest.er1
14069 ac_status=$?
14070 grep -v '^ *+' conftest.er1 >conftest.err
14071 rm -f conftest.er1
14072 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014074 (exit $ac_status); } && {
14075 test -z "$ac_c_werror_flag" ||
14076 test ! -s conftest.err
14077 } && test -s conftest.$ac_objext; then
14078 ac_hi=$ac_mid; break
14079else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014080 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014081sed 's/^/| /' conftest.$ac_ext >&5
14082
14083 ac_lo=`expr $ac_mid + 1`
14084 if test $ac_lo -le $ac_mid; then
14085 ac_lo= ac_hi=
14086 break
14087 fi
14088 ac_mid=`expr 2 '*' $ac_mid + 1`
14089fi
14090
14091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14092 done
14093else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014094 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014095sed 's/^/| /' conftest.$ac_ext >&5
14096
14097 cat >conftest.$ac_ext <<_ACEOF
14098/* confdefs.h. */
14099_ACEOF
14100cat confdefs.h >>conftest.$ac_ext
14101cat >>conftest.$ac_ext <<_ACEOF
14102/* end confdefs.h. */
14103
14104#ifdef HAVE_PTHREAD_H
14105#include <pthread.h>
14106#endif
14107
14108
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014109 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014110int
14111main ()
14112{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014113static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014114test_array [0] = 0
14115
14116 ;
14117 return 0;
14118}
14119_ACEOF
14120rm -f conftest.$ac_objext
14121if { (ac_try="$ac_compile"
14122case "(($ac_try" in
14123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14124 *) ac_try_echo=$ac_try;;
14125esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014127 (eval "$ac_compile") 2>conftest.er1
14128 ac_status=$?
14129 grep -v '^ *+' conftest.er1 >conftest.err
14130 rm -f conftest.er1
14131 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014133 (exit $ac_status); } && {
14134 test -z "$ac_c_werror_flag" ||
14135 test ! -s conftest.err
14136 } && test -s conftest.$ac_objext; then
14137 ac_hi=-1 ac_mid=-1
14138 while :; do
14139 cat >conftest.$ac_ext <<_ACEOF
14140/* confdefs.h. */
14141_ACEOF
14142cat confdefs.h >>conftest.$ac_ext
14143cat >>conftest.$ac_ext <<_ACEOF
14144/* end confdefs.h. */
14145
14146#ifdef HAVE_PTHREAD_H
14147#include <pthread.h>
14148#endif
14149
14150
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014151 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014152int
14153main ()
14154{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014155static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014156test_array [0] = 0
14157
14158 ;
14159 return 0;
14160}
14161_ACEOF
14162rm -f conftest.$ac_objext
14163if { (ac_try="$ac_compile"
14164case "(($ac_try" in
14165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14166 *) ac_try_echo=$ac_try;;
14167esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014169 (eval "$ac_compile") 2>conftest.er1
14170 ac_status=$?
14171 grep -v '^ *+' conftest.er1 >conftest.err
14172 rm -f conftest.er1
14173 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014175 (exit $ac_status); } && {
14176 test -z "$ac_c_werror_flag" ||
14177 test ! -s conftest.err
14178 } && test -s conftest.$ac_objext; then
14179 ac_lo=$ac_mid; break
14180else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014181 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014182sed 's/^/| /' conftest.$ac_ext >&5
14183
14184 ac_hi=`expr '(' $ac_mid ')' - 1`
14185 if test $ac_mid -le $ac_hi; then
14186 ac_lo= ac_hi=
14187 break
14188 fi
14189 ac_mid=`expr 2 '*' $ac_mid`
14190fi
14191
14192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14193 done
14194else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014195 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014196sed 's/^/| /' conftest.$ac_ext >&5
14197
14198 ac_lo= ac_hi=
14199fi
14200
14201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14202fi
14203
14204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14205# Binary search between lo and hi bounds.
14206while test "x$ac_lo" != "x$ac_hi"; do
14207 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14208 cat >conftest.$ac_ext <<_ACEOF
14209/* confdefs.h. */
14210_ACEOF
14211cat confdefs.h >>conftest.$ac_ext
14212cat >>conftest.$ac_ext <<_ACEOF
14213/* end confdefs.h. */
14214
14215#ifdef HAVE_PTHREAD_H
14216#include <pthread.h>
14217#endif
14218
14219
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014220 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014221int
14222main ()
14223{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014224static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014225test_array [0] = 0
14226
14227 ;
14228 return 0;
14229}
14230_ACEOF
14231rm -f conftest.$ac_objext
14232if { (ac_try="$ac_compile"
14233case "(($ac_try" in
14234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14235 *) ac_try_echo=$ac_try;;
14236esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014238 (eval "$ac_compile") 2>conftest.er1
14239 ac_status=$?
14240 grep -v '^ *+' conftest.er1 >conftest.err
14241 rm -f conftest.er1
14242 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014244 (exit $ac_status); } && {
14245 test -z "$ac_c_werror_flag" ||
14246 test ! -s conftest.err
14247 } && test -s conftest.$ac_objext; then
14248 ac_hi=$ac_mid
14249else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014250 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014251sed 's/^/| /' conftest.$ac_ext >&5
14252
14253 ac_lo=`expr '(' $ac_mid ')' + 1`
14254fi
14255
14256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14257done
14258case $ac_lo in
14259?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14260'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014261 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014262See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014263echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014264See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014265 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014266 else
14267 ac_cv_sizeof_pthread_t=0
14268 fi ;;
14269esac
14270else
14271 cat >conftest.$ac_ext <<_ACEOF
14272/* confdefs.h. */
14273_ACEOF
14274cat confdefs.h >>conftest.$ac_ext
14275cat >>conftest.$ac_ext <<_ACEOF
14276/* end confdefs.h. */
14277
14278#ifdef HAVE_PTHREAD_H
14279#include <pthread.h>
14280#endif
14281
14282
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014283 typedef pthread_t ac__type_sizeof_;
14284static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14285static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014286#include <stdio.h>
14287#include <stdlib.h>
14288int
14289main ()
14290{
14291
14292 FILE *f = fopen ("conftest.val", "w");
14293 if (! f)
14294 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014295 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014296 {
14297 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014298 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014299 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014300 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014301 }
14302 else
14303 {
14304 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014305 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014306 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014307 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014308 }
14309 return ferror (f) || fclose (f) != 0;
14310
14311 ;
14312 return 0;
14313}
Martin v. Löwis11437992002-04-12 09:54:03 +000014314_ACEOF
14315rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014316if { (ac_try="$ac_link"
14317case "(($ac_try" in
14318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14319 *) ac_try_echo=$ac_try;;
14320esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014322 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014323 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014325 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014326 { (case "(($ac_try" in
14327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14328 *) ac_try_echo=$ac_try;;
14329esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014331 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014332 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014334 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014335 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014336else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014337 echo "$as_me: program exited with status $ac_status" >&5
14338echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014339sed 's/^/| /' conftest.$ac_ext >&5
14340
Martin v. Löwis11437992002-04-12 09:54:03 +000014341( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014342if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014343 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014344See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014345echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014346See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014347 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014348 else
14349 ac_cv_sizeof_pthread_t=0
14350 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014352rm -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 +000014353fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014354rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014355fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014356{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14357echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014358
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014359
14360
Martin v. Löwis11437992002-04-12 09:54:03 +000014361cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014362#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014363_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014364
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014365
Trent Mick635f6fb2000-08-23 21:33:05 +000014366fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014367CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014368
Michael W. Hudson54241132001-12-07 15:38:26 +000014369
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014370case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014371 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014372 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14373 ;;
14374 Darwin/*)
14375 OTHER_LIBTOOL_OPT=""
14376 ;;
14377esac
14378
14379
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014380ARCH_RUN_32BIT=""
14381
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014382case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014383 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014384 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14385 if test "${enable_universalsdk}"; then
14386 :
14387 else
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014388 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014389 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014390 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014391 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014392 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014393 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14394 if test ${gcc_version} '<' 4.0
14395 then
14396 LIBTOOL_CRUFT="-lcc_dynamic"
14397 else
14398 LIBTOOL_CRUFT=""
14399 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014400 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014401 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014402else
14403 cat >conftest.$ac_ext <<_ACEOF
14404/* confdefs.h. */
14405_ACEOF
14406cat confdefs.h >>conftest.$ac_ext
14407cat >>conftest.$ac_ext <<_ACEOF
14408/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014409
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014410 #include <unistd.h>
14411 int main(int argc, char*argv[])
14412 {
14413 if (sizeof(long) == 4) {
14414 return 0;
14415 } else {
14416 return 1;
14417 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014418 }
14419
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014420_ACEOF
14421rm -f conftest$ac_exeext
14422if { (ac_try="$ac_link"
14423case "(($ac_try" in
14424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14425 *) ac_try_echo=$ac_try;;
14426esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014428 (eval "$ac_link") 2>&5
14429 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014431 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14432 { (case "(($ac_try" in
14433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14434 *) ac_try_echo=$ac_try;;
14435esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014437 (eval "$ac_try") 2>&5
14438 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014440 (exit $ac_status); }; }; then
14441 ac_osx_32bit=yes
14442else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014443 echo "$as_me: program exited with status $ac_status" >&5
14444echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014445sed 's/^/| /' conftest.$ac_ext >&5
14446
14447( exit $ac_status )
14448ac_osx_32bit=no
14449fi
14450rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14451fi
14452
14453
14454
14455 if test "${ac_osx_32bit}" = "yes"; then
14456 case `arch` in
14457 i386)
14458 MACOSX_DEFAULT_ARCH="i386"
14459 ;;
14460 ppc)
14461 MACOSX_DEFAULT_ARCH="ppc"
14462 ;;
14463 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014464 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14465echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014466 { (exit 1); exit 1; }; }
14467 ;;
14468 esac
14469 else
14470 case `arch` in
14471 i386)
14472 MACOSX_DEFAULT_ARCH="x86_64"
14473 ;;
14474 ppc)
14475 MACOSX_DEFAULT_ARCH="ppc64"
14476 ;;
14477 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014478 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14479echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014480 { (exit 1); exit 1; }; }
14481 ;;
14482 esac
14483
14484 #ARCH_RUN_32BIT="true"
14485 fi
14486
14487 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014488 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014489 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014490esac
14491
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014492{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14493echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014494if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014495then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014496 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014497 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014498 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014499
Martin v. Löwis11437992002-04-12 09:54:03 +000014500cat >>confdefs.h <<\_ACEOF
14501#define WITH_NEXT_FRAMEWORK 1
14502_ACEOF
14503
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014504 { echo "$as_me:$LINENO: result: yes" >&5
14505echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014506 if test $enable_shared = "yes"
14507 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014508 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14509echo "$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 +000014510 { (exit 1); exit 1; }; }
14511 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014512else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014513 { echo "$as_me:$LINENO: result: no" >&5
14514echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014515fi
14516
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014517{ echo "$as_me:$LINENO: checking for dyld" >&5
14518echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014519case $ac_sys_system/$ac_sys_release in
14520 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014521
Martin v. Löwis11437992002-04-12 09:54:03 +000014522cat >>confdefs.h <<\_ACEOF
14523#define WITH_DYLD 1
14524_ACEOF
14525
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014526 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14527echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014528 ;;
14529 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014530 { echo "$as_me:$LINENO: result: no" >&5
14531echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014532 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014533esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014534
Guido van Rossum0a516c91994-09-12 10:58:40 +000014535# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014536
Michael W. Hudson54241132001-12-07 15:38:26 +000014537
14538
14539
14540
Guido van Rossum0a516c91994-09-12 10:58:40 +000014541# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014542# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014543{ echo "$as_me:$LINENO: checking SO" >&5
14544echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014545if test -z "$SO"
14546then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014547 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014548 hp*|HP*)
14549 case `uname -m` in
14550 ia64) SO=.so;;
14551 *) SO=.sl;;
14552 esac
14553 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014554 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014555 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014556 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014557else
14558 # this might also be a termcap variable, see #610332
14559 echo
14560 echo '====================================================================='
14561 echo '+ +'
14562 echo '+ WARNING: You have set SO in your environment. +'
14563 echo '+ Do you really mean to change the extension for shared libraries? +'
14564 echo '+ Continuing in 10 seconds to let you to ponder. +'
14565 echo '+ +'
14566 echo '====================================================================='
14567 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014568fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014569{ echo "$as_me:$LINENO: result: $SO" >&5
14570echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014571
Georg Brandlb1441c72009-01-03 22:33:39 +000014572
Thomas Wouters477c8d52006-05-27 19:21:47 +000014573cat >>confdefs.h <<_ACEOF
14574#define SHLIB_EXT "$SO"
14575_ACEOF
14576
Guido van Rossum0a516c91994-09-12 10:58:40 +000014577# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014578# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014579# (Shared libraries in this instance are shared modules to be loaded into
14580# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014581{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14582echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014583if test -z "$LDSHARED"
14584then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014585 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014586 AIX*)
14587 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014588 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014589 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014590 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014591 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014592 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014593 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014594 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014595 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014596 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014597 hp*|HP*)
14598 if test "$GCC" = "yes"
14599 then LDSHARED='$(CC) -shared'
14600 else LDSHARED='ld -b';
14601 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014602 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014603 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014604 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14605 if test "$enable_framework" ; then
14606 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014607 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14608 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014609 else
14610 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014611 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014612 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014613 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014614 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14615 if test "$enable_framework" ; then
14616 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014617 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14618 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014619 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014620 # No framework, use the Python app as bundle-loader
14621 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014622 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014623 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014624 Darwin/*)
14625 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14626 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014627
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014628 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014629 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014630 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014631 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014632 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014633 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14634 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014635 else
14636 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14637 if test "$enable_framework" ; then
14638 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014639 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14640 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014641 else
14642 # No framework, use the Python app as bundle-loader
14643 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14644 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14645 fi
14646 fi
14647 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014648 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014649 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014650 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014651 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014652 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014653 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014654 else
14655 LDSHARED="ld -Bshareable ${LDFLAGS}"
14656 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014657 OpenBSD*)
14658 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14659 then
14660 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14661 else
14662 case `uname -r` in
14663 [01].* | 2.[0-7] | 2.[0-7].*)
14664 LDSHARED="ld -Bshareable ${LDFLAGS}"
14665 ;;
14666 *)
14667 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14668 ;;
14669 esac
14670 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014671 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014672 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014673 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014674 then LDSHARED='$(CC) -shared'
14675 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014676 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014677 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014678 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014679 *) LDSHARED="ld";;
14680 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014681fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014682{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14683echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014684BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014685# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014686# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014687{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14688echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014689if test -z "$CCSHARED"
14690then
Guido van Rossum07397971997-04-29 21:49:50 +000014691 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014692 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014693 then CCSHARED="-fPIC";
14694 elif test `uname -p` = sparc;
14695 then CCSHARED="-xcode=pic32";
14696 else CCSHARED="-Kpic";
14697 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014698 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014699 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014700 else CCSHARED="+z";
14701 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014702 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014703 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014704 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014705 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014706 if test "$GCC" = "yes"
14707 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014708 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014709 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014710 SCO_SV*)
14711 if test "$GCC" = "yes"
14712 then CCSHARED="-fPIC"
14713 else CCSHARED="-Kpic -belf"
14714 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014715 IRIX*/6*) case $CC in
14716 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014717 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014718 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014719 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014720fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014721{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14722echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014723# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014724# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014725{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14726echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014727if test -z "$LINKFORSHARED"
14728then
Guido van Rossum07397971997-04-29 21:49:50 +000014729 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014730 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014731 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014732 LINKFORSHARED="-Wl,-E -Wl,+s";;
14733# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014734 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014735 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014736 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014737 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014738 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014739 if test "$enable_framework"
14740 then
Jack Jansenda49e192005-01-07 13:08:22 +000014741 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014742 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014743 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014744 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014745 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014746 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014747 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014748 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14749 then
14750 LINKFORSHARED="-Wl,--export-dynamic"
14751 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014752 SunOS/5*) case $CC in
14753 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014754 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014755 then
14756 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014757 fi;;
14758 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014759 CYGWIN*)
14760 if test $enable_shared = "no"
14761 then
14762 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14763 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014764 QNX*)
14765 # -Wl,-E causes the symbols to be added to the dynamic
14766 # symbol table so that they can be found when a module
14767 # is loaded. -N 2048K causes the stack size to be set
14768 # to 2048 kilobytes so that the stack doesn't overflow
14769 # when running test_compile.py.
14770 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014771 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014772fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014773{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14774echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014775
Michael W. Hudson54241132001-12-07 15:38:26 +000014776
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014777
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014778{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14779echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014780if test ! "$LIBRARY" = "$LDLIBRARY"
14781then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014782 case $ac_sys_system in
14783 CYGWIN*)
14784 # Cygwin needs CCSHARED when building extension DLLs
14785 # but not when building the interpreter DLL.
14786 CFLAGSFORSHARED='';;
14787 *)
14788 CFLAGSFORSHARED='$(CCSHARED)'
14789 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014790fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014791{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14792echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014793
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014794# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14795# library (with --enable-shared).
14796# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014797# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14798# if it is not required, since it creates a dependency of the shared library
14799# to LIBS. This, in turn, means that applications linking the shared libpython
14800# don't need to link LIBS explicitly. The default should be only changed
14801# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014802
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014803{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14804echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014805case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014806 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014807 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014808esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014809{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14810echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014811
14812
Guido van Rossum627b2d71993-12-24 10:39:16 +000014813# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014814
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014815{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14816echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014817if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014818 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014819else
Martin v. Löwis11437992002-04-12 09:54:03 +000014820 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014821LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014822cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014823/* confdefs.h. */
14824_ACEOF
14825cat confdefs.h >>conftest.$ac_ext
14826cat >>conftest.$ac_ext <<_ACEOF
14827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014828
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014829/* Override any GCC internal prototype to avoid an error.
14830 Use char because int might match the return type of a GCC
14831 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014832#ifdef __cplusplus
14833extern "C"
14834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014835char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014836int
14837main ()
14838{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014839return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014840 ;
14841 return 0;
14842}
14843_ACEOF
14844rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014845if { (ac_try="$ac_link"
14846case "(($ac_try" in
14847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14848 *) ac_try_echo=$ac_try;;
14849esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014851 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014852 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014853 grep -v '^ *+' conftest.er1 >conftest.err
14854 rm -f conftest.er1
14855 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014857 (exit $ac_status); } && {
14858 test -z "$ac_c_werror_flag" ||
14859 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014860 } && test -s conftest$ac_exeext &&
14861 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014862 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014863else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014864 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014865sed 's/^/| /' conftest.$ac_ext >&5
14866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014867 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014869
14870rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014871 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014872LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014873fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014874{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14875echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14876if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014877 cat >>confdefs.h <<_ACEOF
14878#define HAVE_LIBDL 1
14879_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014880
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014881 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014882
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014883fi
14884 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014885
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014886{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14887echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014888if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014889 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014890else
Martin v. Löwis11437992002-04-12 09:54:03 +000014891 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014892LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014893cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014894/* confdefs.h. */
14895_ACEOF
14896cat confdefs.h >>conftest.$ac_ext
14897cat >>conftest.$ac_ext <<_ACEOF
14898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014900/* Override any GCC internal prototype to avoid an error.
14901 Use char because int might match the return type of a GCC
14902 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014903#ifdef __cplusplus
14904extern "C"
14905#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014906char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014907int
14908main ()
14909{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014910return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014911 ;
14912 return 0;
14913}
14914_ACEOF
14915rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014916if { (ac_try="$ac_link"
14917case "(($ac_try" in
14918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14919 *) ac_try_echo=$ac_try;;
14920esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014922 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014923 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014924 grep -v '^ *+' conftest.er1 >conftest.err
14925 rm -f conftest.er1
14926 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014928 (exit $ac_status); } && {
14929 test -z "$ac_c_werror_flag" ||
14930 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014931 } && test -s conftest$ac_exeext &&
14932 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014933 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014934else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014936sed 's/^/| /' conftest.$ac_ext >&5
14937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014938 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940
14941rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014942 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014943LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014944fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014945{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14946echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
14947if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014948 cat >>confdefs.h <<_ACEOF
14949#define HAVE_LIBDLD 1
14950_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014951
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014952 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014953
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014954fi
14955 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014956
Georg Brandlb1441c72009-01-03 22:33:39 +000014957# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014958if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014959 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14960echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014961if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014962 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014963else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014964 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014965cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014966/* confdefs.h. */
14967_ACEOF
14968cat confdefs.h >>conftest.$ac_ext
14969cat >>conftest.$ac_ext <<_ACEOF
14970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014972/* Override any GCC internal prototype to avoid an error.
14973 Use char because int might match the return type of a GCC
14974 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014975#ifdef __cplusplus
14976extern "C"
14977#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014978char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014979int
14980main ()
14981{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014982return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014983 ;
14984 return 0;
14985}
14986_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014987for ac_lib in '' pthread rt posix4; do
14988 if test -z "$ac_lib"; then
14989 ac_res="none required"
14990 else
14991 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014992 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014993 fi
14994 rm -f conftest.$ac_objext conftest$ac_exeext
14995if { (ac_try="$ac_link"
14996case "(($ac_try" in
14997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14998 *) ac_try_echo=$ac_try;;
14999esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015001 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015002 ac_status=$?
15003 grep -v '^ *+' conftest.er1 >conftest.err
15004 rm -f conftest.er1
15005 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015007 (exit $ac_status); } && {
15008 test -z "$ac_c_werror_flag" ||
15009 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015010 } && test -s conftest$ac_exeext &&
15011 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015012 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015013else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015014 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015015sed 's/^/| /' conftest.$ac_ext >&5
15016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017
Thomas Wouters477c8d52006-05-27 19:21:47 +000015018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015019
15020rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15021 conftest$ac_exeext
15022 if test "${ac_cv_search_sem_init+set}" = set; then
15023 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015025done
15026if test "${ac_cv_search_sem_init+set}" = set; then
15027 :
15028else
15029 ac_cv_search_sem_init=no
15030fi
15031rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015032LIBS=$ac_func_search_save_LIBS
15033fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015034{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15035echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015036ac_res=$ac_cv_search_sem_init
15037if test "$ac_res" != no; then
15038 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015039
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015040fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015041 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015042 # posix4 on Solaris 2.6
15043 # pthread (first!) on Linux
15044fi
15045
Martin v. Löwis19d17342003-06-14 21:03:05 +000015046# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015047{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15048echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015049if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015050 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015051else
15052 ac_check_lib_save_LIBS=$LIBS
15053LIBS="-lintl $LIBS"
15054cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015055/* confdefs.h. */
15056_ACEOF
15057cat confdefs.h >>conftest.$ac_ext
15058cat >>conftest.$ac_ext <<_ACEOF
15059/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015061/* Override any GCC internal prototype to avoid an error.
15062 Use char because int might match the return type of a GCC
15063 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015064#ifdef __cplusplus
15065extern "C"
15066#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015067char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015068int
15069main ()
15070{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015071return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015072 ;
15073 return 0;
15074}
15075_ACEOF
15076rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015077if { (ac_try="$ac_link"
15078case "(($ac_try" in
15079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15080 *) ac_try_echo=$ac_try;;
15081esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015083 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015085 grep -v '^ *+' conftest.er1 >conftest.err
15086 rm -f conftest.er1
15087 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015089 (exit $ac_status); } && {
15090 test -z "$ac_c_werror_flag" ||
15091 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015092 } && test -s conftest$ac_exeext &&
15093 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015094 ac_cv_lib_intl_textdomain=yes
15095else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015097sed 's/^/| /' conftest.$ac_ext >&5
15098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015099 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015101
15102rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015103 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015104LIBS=$ac_check_lib_save_LIBS
15105fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015106{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15107echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15108if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015109
15110cat >>confdefs.h <<\_ACEOF
15111#define WITH_LIBINTL 1
15112_ACEOF
15113
Brett Cannonc6d936e2009-06-07 20:09:53 +000015114 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015115fi
15116
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015117
15118# checks for system dependent C++ extensions support
15119case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015120 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15121echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015122 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015123/* confdefs.h. */
15124_ACEOF
15125cat confdefs.h >>conftest.$ac_ext
15126cat >>conftest.$ac_ext <<_ACEOF
15127/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015128#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015129int
15130main ()
15131{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015132loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 ;
15134 return 0;
15135}
15136_ACEOF
15137rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138if { (ac_try="$ac_link"
15139case "(($ac_try" in
15140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15141 *) ac_try_echo=$ac_try;;
15142esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015144 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015146 grep -v '^ *+' conftest.er1 >conftest.err
15147 rm -f conftest.er1
15148 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015150 (exit $ac_status); } && {
15151 test -z "$ac_c_werror_flag" ||
15152 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015153 } && test -s conftest$ac_exeext &&
15154 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015155
Martin v. Löwis11437992002-04-12 09:54:03 +000015156cat >>confdefs.h <<\_ACEOF
15157#define AIX_GENUINE_CPLUSPLUS 1
15158_ACEOF
15159
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015160 { echo "$as_me:$LINENO: result: yes" >&5
15161echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015162else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015164sed 's/^/| /' conftest.$ac_ext >&5
15165
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015166 { echo "$as_me:$LINENO: result: no" >&5
15167echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015169
15170rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015171 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015172 *) ;;
15173esac
15174
Guido van Rossum70c7f481998-03-26 18:44:10 +000015175# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015176{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15177echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015178if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015179 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015180else
Martin v. Löwis11437992002-04-12 09:54:03 +000015181 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015182LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015183cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015184/* confdefs.h. */
15185_ACEOF
15186cat confdefs.h >>conftest.$ac_ext
15187cat >>conftest.$ac_ext <<_ACEOF
15188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015190/* Override any GCC internal prototype to avoid an error.
15191 Use char because int might match the return type of a GCC
15192 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015193#ifdef __cplusplus
15194extern "C"
15195#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015196char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015197int
15198main ()
15199{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015200return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 ;
15202 return 0;
15203}
15204_ACEOF
15205rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015206if { (ac_try="$ac_link"
15207case "(($ac_try" in
15208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15209 *) ac_try_echo=$ac_try;;
15210esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015212 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015214 grep -v '^ *+' conftest.er1 >conftest.err
15215 rm -f conftest.er1
15216 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015218 (exit $ac_status); } && {
15219 test -z "$ac_c_werror_flag" ||
15220 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015221 } && test -s conftest$ac_exeext &&
15222 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015223 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015224else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015226sed 's/^/| /' conftest.$ac_ext >&5
15227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015228 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015230
15231rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015232 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015233LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015234fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015235{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15236echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15237if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015238 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015239fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015240 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015241{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15242echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015243if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015244 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015245else
Martin v. Löwis11437992002-04-12 09:54:03 +000015246 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015247LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015248cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015249/* confdefs.h. */
15250_ACEOF
15251cat confdefs.h >>conftest.$ac_ext
15252cat >>conftest.$ac_ext <<_ACEOF
15253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015254
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015255/* Override any GCC internal prototype to avoid an error.
15256 Use char because int might match the return type of a GCC
15257 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015258#ifdef __cplusplus
15259extern "C"
15260#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015261char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015262int
15263main ()
15264{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015265return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015266 ;
15267 return 0;
15268}
15269_ACEOF
15270rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015271if { (ac_try="$ac_link"
15272case "(($ac_try" in
15273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15274 *) ac_try_echo=$ac_try;;
15275esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015277 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015279 grep -v '^ *+' conftest.er1 >conftest.err
15280 rm -f conftest.er1
15281 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015283 (exit $ac_status); } && {
15284 test -z "$ac_c_werror_flag" ||
15285 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015286 } && test -s conftest$ac_exeext &&
15287 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015288 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015289else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015291sed 's/^/| /' conftest.$ac_ext >&5
15292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015293 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015295
15296rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015297 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015298LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015299fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015300{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15301echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15302if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015303 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015304fi
15305 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015306
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015307{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15308echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015309
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015310# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015311if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015312 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015313{ echo "$as_me:$LINENO: result: $withval" >&5
15314echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015315LIBS="$withval $LIBS"
15316
15317else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015318 { echo "$as_me:$LINENO: result: no" >&5
15319echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015320fi
15321
Guido van Rossum7f43da71994-08-01 12:15:30 +000015322
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015323# Check for use of the system libffi library
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015324{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15325echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015327# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015328if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015329 withval=$with_system_ffi;
15330fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015331
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015332
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015333{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15334echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015335
Matthias Klose55708cc2009-04-30 08:06:49 +000015336# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015337{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15338echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015339
15340# Check whether --with-dbmliborder was given.
15341if test "${with_dbmliborder+set}" = set; then
15342 withval=$with_dbmliborder;
15343if test x$with_dbmliborder = xyes
15344then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015345{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15346echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015347 { (exit 1); exit 1; }; }
15348else
15349 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15350 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15351 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015352 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15353echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015354 { (exit 1); exit 1; }; }
15355 fi
15356 done
15357fi
15358fi
15359
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015360{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15361echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015362
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015363# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015364
15365
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015366{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15367echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015369# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015370if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015371 withval=$with_signal_module;
15372fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015373
15374
15375if test -z "$with_signal_module"
15376then with_signal_module="yes"
15377fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015378{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15379echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015380
15381if test "${with_signal_module}" = "yes"; then
15382 USE_SIGNAL_MODULE=""
15383 SIGNAL_OBJS=""
15384else
15385 USE_SIGNAL_MODULE="#"
15386 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15387fi
15388
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015389# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015390
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015391USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015392
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015393{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15394echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015395
Guido van Rossumec2f0731997-01-22 20:54:01 +000015396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015397# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015398if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015399 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015400{ echo "$as_me:$LINENO: result: $withval" >&5
15401echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015402LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015403if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015404 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015405fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015406else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015407 { echo "$as_me:$LINENO: result: no" >&5
15408echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015409fi
15410
Martin v. Löwis11437992002-04-12 09:54:03 +000015411
15412# Templates for things AC_DEFINEd more than once.
15413# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015414
15415
Martin v. Löwis11437992002-04-12 09:54:03 +000015416
15417
15418
15419
15420
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015421{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15422echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015424# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015425if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015426 withval=$with_threads;
15427fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015428
15429
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015430# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015431
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015432# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015433if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015434 withval=$with_thread; with_threads=$with_thread
15435fi
15436
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015437
15438if test -z "$with_threads"
15439then with_threads="yes"
15440fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015441{ echo "$as_me:$LINENO: result: $with_threads" >&5
15442echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015443
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015444
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015445if test "$with_threads" = "no"
15446then
15447 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015448elif test "$ac_cv_pthread_is_default" = yes
15449then
Martin v. Löwis11437992002-04-12 09:54:03 +000015450 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015451#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015452_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015453
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015454 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015455 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015456#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015457_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015458
15459 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015460 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015461elif test "$ac_cv_kpthread" = "yes"
15462then
15463 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015464 if test "$ac_cv_cxx_thread" = "yes"; then
15465 CXX="$CXX -Kpthread"
15466 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015467 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015468#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015469_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015470
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015471 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015472 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015473elif test "$ac_cv_kthread" = "yes"
15474then
15475 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015476 if test "$ac_cv_cxx_thread" = "yes"; then
15477 CXX="$CXX -Kthread"
15478 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015479 cat >>confdefs.h <<\_ACEOF
15480#define WITH_THREAD 1
15481_ACEOF
15482
15483 posix_threads=yes
15484 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015485elif test "$ac_cv_pthread" = "yes"
15486then
15487 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015488 if test "$ac_cv_cxx_thread" = "yes"; then
15489 CXX="$CXX -pthread"
15490 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015491 cat >>confdefs.h <<\_ACEOF
15492#define WITH_THREAD 1
15493_ACEOF
15494
15495 posix_threads=yes
15496 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015497else
15498 if test ! -z "$with_threads" -a -d "$with_threads"
15499 then LDFLAGS="$LDFLAGS -L$with_threads"
15500 fi
15501 if test ! -z "$withval" -a -d "$withval"
15502 then LDFLAGS="$LDFLAGS -L$withval"
15503 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015504
15505 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015506 # define _POSIX_THREADS in unistd.h. Some apparently don't
15507 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015508 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15509echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015511/* confdefs.h. */
15512_ACEOF
15513cat confdefs.h >>conftest.$ac_ext
15514cat >>conftest.$ac_ext <<_ACEOF
15515/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015516
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015517#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015518#ifdef _POSIX_THREADS
15519yes
15520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015521
15522_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015523if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015524 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015525 unistd_defines_pthreads=yes
15526else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015527 unistd_defines_pthreads=no
15528fi
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000015529rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015530
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015531 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15532echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015533
Martin v. Löwis11437992002-04-12 09:54:03 +000015534 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015535#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015536_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015537
Martin v. Löwis11437992002-04-12 09:54:03 +000015538 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015539 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15540echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015541if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015542 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015543fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015544{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15545echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015546else
Martin v. Löwis11437992002-04-12 09:54:03 +000015547 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015548{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15549echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015550cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015551/* confdefs.h. */
15552_ACEOF
15553cat confdefs.h >>conftest.$ac_ext
15554cat >>conftest.$ac_ext <<_ACEOF
15555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015556$ac_includes_default
15557#include <cthreads.h>
15558_ACEOF
15559rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015560if { (ac_try="$ac_compile"
15561case "(($ac_try" in
15562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15563 *) ac_try_echo=$ac_try;;
15564esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015566 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015568 grep -v '^ *+' conftest.er1 >conftest.err
15569 rm -f conftest.er1
15570 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015572 (exit $ac_status); } && {
15573 test -z "$ac_c_werror_flag" ||
15574 test ! -s conftest.err
15575 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015576 ac_header_compiler=yes
15577else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015579sed 's/^/| /' conftest.$ac_ext >&5
15580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015581 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015583
15584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015585{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15586echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015587
15588# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015589{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15590echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015591cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015592/* confdefs.h. */
15593_ACEOF
15594cat confdefs.h >>conftest.$ac_ext
15595cat >>conftest.$ac_ext <<_ACEOF
15596/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015597#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015598_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015599if { (ac_try="$ac_cpp conftest.$ac_ext"
15600case "(($ac_try" in
15601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15602 *) ac_try_echo=$ac_try;;
15603esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015605 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015606 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015607 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015608 rm -f conftest.er1
15609 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015611 (exit $ac_status); } >/dev/null && {
15612 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15613 test ! -s conftest.err
15614 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015615 ac_header_preproc=yes
15616else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015618sed 's/^/| /' conftest.$ac_ext >&5
15619
Martin v. Löwis11437992002-04-12 09:54:03 +000015620 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015622
Martin v. Löwis11437992002-04-12 09:54:03 +000015623rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015624{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15625echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015626
15627# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015628case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15629 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015630 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15631echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15632 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15633echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015634 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015635 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015636 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015637 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15638echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15639 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15640echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15641 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15642echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15643 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15644echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15645 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15646echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15647 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15648echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015649 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015650## -------------------------------------- ##
15651## Report this to http://bugs.python.org/ ##
15652## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015653_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015654 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015655 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015656esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015657{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15658echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015659if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015660 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015661else
15662 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015663fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015664{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15665echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015666
15667fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015668if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015669 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015670#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015671_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015672
Martin v. Löwis11437992002-04-12 09:54:03 +000015673 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015674#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015675_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015676
Martin v. Löwis11437992002-04-12 09:54:03 +000015677
15678cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015679#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015680_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015681
15682 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015683 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015684else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015685
Martin v. Löwis11437992002-04-12 09:54:03 +000015686 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015687 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15688echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015689if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015690 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015691fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015692{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15693echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015694else
Martin v. Löwis11437992002-04-12 09:54:03 +000015695 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015696{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15697echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015698cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015699/* confdefs.h. */
15700_ACEOF
15701cat confdefs.h >>conftest.$ac_ext
15702cat >>conftest.$ac_ext <<_ACEOF
15703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015704$ac_includes_default
15705#include <mach/cthreads.h>
15706_ACEOF
15707rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015708if { (ac_try="$ac_compile"
15709case "(($ac_try" in
15710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15711 *) ac_try_echo=$ac_try;;
15712esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015714 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015716 grep -v '^ *+' conftest.er1 >conftest.err
15717 rm -f conftest.er1
15718 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015720 (exit $ac_status); } && {
15721 test -z "$ac_c_werror_flag" ||
15722 test ! -s conftest.err
15723 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015724 ac_header_compiler=yes
15725else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015727sed 's/^/| /' conftest.$ac_ext >&5
15728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015729 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015731
15732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015733{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15734echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015735
15736# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015737{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15738echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015739cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015740/* confdefs.h. */
15741_ACEOF
15742cat confdefs.h >>conftest.$ac_ext
15743cat >>conftest.$ac_ext <<_ACEOF
15744/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015745#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015746_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015747if { (ac_try="$ac_cpp conftest.$ac_ext"
15748case "(($ac_try" in
15749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15750 *) ac_try_echo=$ac_try;;
15751esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015753 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015754 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015755 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015756 rm -f conftest.er1
15757 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015759 (exit $ac_status); } >/dev/null && {
15760 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15761 test ! -s conftest.err
15762 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015763 ac_header_preproc=yes
15764else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015766sed 's/^/| /' conftest.$ac_ext >&5
15767
Martin v. Löwis11437992002-04-12 09:54:03 +000015768 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015770
Martin v. Löwis11437992002-04-12 09:54:03 +000015771rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015772{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15773echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015774
15775# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015776case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15777 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015778 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15779echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15780 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15781echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015782 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015783 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015784 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015785 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15786echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15787 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15788echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15789 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15790echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15791 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15792echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15793 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15794echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15795 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15796echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015797 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015798## -------------------------------------- ##
15799## Report this to http://bugs.python.org/ ##
15800## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015801_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015802 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015803 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015804esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015805{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15806echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015807if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015808 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015809else
15810 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015811fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015812{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15813echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015814
15815fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015816if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015817 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015818#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015819_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015820
Martin v. Löwis11437992002-04-12 09:54:03 +000015821 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015822#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015823_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015824
Martin v. Löwis11437992002-04-12 09:54:03 +000015825
15826cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015827#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015828_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015829
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015830 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015831else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015832
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015833 # Just looking for pthread_create in libpthread is not enough:
15834 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15835 # So we really have to include pthread.h, and then link.
15836 _libs=$LIBS
15837 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015838 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15839echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015840 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015841/* confdefs.h. */
15842_ACEOF
15843cat confdefs.h >>conftest.$ac_ext
15844cat >>conftest.$ac_ext <<_ACEOF
15845/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015846#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015847
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015848void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015849int
15850main ()
15851{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015852
15853pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015854 ;
15855 return 0;
15856}
15857_ACEOF
15858rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015859if { (ac_try="$ac_link"
15860case "(($ac_try" in
15861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15862 *) ac_try_echo=$ac_try;;
15863esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015865 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015866 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015867 grep -v '^ *+' conftest.er1 >conftest.err
15868 rm -f conftest.er1
15869 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015871 (exit $ac_status); } && {
15872 test -z "$ac_c_werror_flag" ||
15873 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015874 } && test -s conftest$ac_exeext &&
15875 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015876
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015877 { echo "$as_me:$LINENO: result: yes" >&5
15878echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015879 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015880#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015881_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015882
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015883 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015884 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000015885else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015887sed 's/^/| /' conftest.$ac_ext >&5
15888
Martin v. Löwis11437992002-04-12 09:54:03 +000015889
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015890 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015891 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
15892echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015893if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015894 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015895else
Martin v. Löwis11437992002-04-12 09:54:03 +000015896 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015897/* confdefs.h. */
15898_ACEOF
15899cat confdefs.h >>conftest.$ac_ext
15900cat >>conftest.$ac_ext <<_ACEOF
15901/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015902/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
15903 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15904#define pthread_detach innocuous_pthread_detach
15905
Guido van Rossumad678af1998-10-02 14:42:15 +000015906/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015907 which can conflict with char pthread_detach (); below.
15908 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015909 <limits.h> exists even on freestanding compilers. */
15910
15911#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015912# include <limits.h>
15913#else
15914# include <assert.h>
15915#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015916
15917#undef pthread_detach
15918
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015919/* Override any GCC internal prototype to avoid an error.
15920 Use char because int might match the return type of a GCC
15921 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015922#ifdef __cplusplus
15923extern "C"
15924#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015925char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000015926/* The GNU C library defines this for functions which it implements
15927 to always fail with ENOSYS. Some functions are actually named
15928 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015929#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000015930choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000015931#endif
15932
Skip Montanaro6dead952003-09-25 14:50:04 +000015933int
15934main ()
15935{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015936return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015937 ;
15938 return 0;
15939}
15940_ACEOF
15941rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015942if { (ac_try="$ac_link"
15943case "(($ac_try" in
15944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15945 *) ac_try_echo=$ac_try;;
15946esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015948 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015950 grep -v '^ *+' conftest.er1 >conftest.err
15951 rm -f conftest.er1
15952 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015954 (exit $ac_status); } && {
15955 test -z "$ac_c_werror_flag" ||
15956 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015957 } && test -s conftest$ac_exeext &&
15958 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015959 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015960else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015962sed 's/^/| /' conftest.$ac_ext >&5
15963
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015964 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015966
15967rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015968 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000015969fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015970{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
15971echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
15972if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015973 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015974#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015975_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015976
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015977 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015978 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000015979else
Guido van Rossumad678af1998-10-02 14:42:15 +000015980
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015981 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15982echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015983if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015984 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015985else
Martin v. Löwis11437992002-04-12 09:54:03 +000015986 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015987LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015988cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015989/* confdefs.h. */
15990_ACEOF
15991cat confdefs.h >>conftest.$ac_ext
15992cat >>conftest.$ac_ext <<_ACEOF
15993/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015995/* Override any GCC internal prototype to avoid an error.
15996 Use char because int might match the return type of a GCC
15997 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015998#ifdef __cplusplus
15999extern "C"
16000#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016001char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016002int
16003main ()
16004{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016005return pthread_create ();
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 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016029else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016030 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016031sed 's/^/| /' conftest.$ac_ext >&5
16032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016033 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016035
16036rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016037 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016038LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016039fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016040{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16041echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16042if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016043 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016044#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016045_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016046
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016047 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016048 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016049 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016050else
Greg Steinadf63d62000-07-05 10:38:09 +000016051
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016052 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16053echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016054if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016055 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016056else
Martin v. Löwis11437992002-04-12 09:54:03 +000016057 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016058LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016059cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016060/* confdefs.h. */
16061_ACEOF
16062cat confdefs.h >>conftest.$ac_ext
16063cat >>conftest.$ac_ext <<_ACEOF
16064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016065
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016066/* Override any GCC internal prototype to avoid an error.
16067 Use char because int might match the return type of a GCC
16068 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016069#ifdef __cplusplus
16070extern "C"
16071#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016072char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016073int
16074main ()
16075{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016076return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016077 ;
16078 return 0;
16079}
16080_ACEOF
16081rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016082if { (ac_try="$ac_link"
16083case "(($ac_try" in
16084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16085 *) ac_try_echo=$ac_try;;
16086esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016088 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016089 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016090 grep -v '^ *+' conftest.er1 >conftest.err
16091 rm -f conftest.er1
16092 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016094 (exit $ac_status); } && {
16095 test -z "$ac_c_werror_flag" ||
16096 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016097 } && test -s conftest$ac_exeext &&
16098 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016099 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016100else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016102sed 's/^/| /' conftest.$ac_ext >&5
16103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016104 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016106
16107rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016108 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016109LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016110fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016111{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16112echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16113if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016114 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016115#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016116_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016117
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016118 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016119 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016120 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016121else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016122
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016123 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16124echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016125if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016126 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016127else
Martin v. Löwis11437992002-04-12 09:54:03 +000016128 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016129LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016130cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016131/* confdefs.h. */
16132_ACEOF
16133cat confdefs.h >>conftest.$ac_ext
16134cat >>conftest.$ac_ext <<_ACEOF
16135/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016137/* Override any GCC internal prototype to avoid an error.
16138 Use char because int might match the return type of a GCC
16139 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016140#ifdef __cplusplus
16141extern "C"
16142#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016143char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016144int
16145main ()
16146{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016147return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016148 ;
16149 return 0;
16150}
16151_ACEOF
16152rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016153if { (ac_try="$ac_link"
16154case "(($ac_try" in
16155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16156 *) ac_try_echo=$ac_try;;
16157esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016159 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016161 grep -v '^ *+' conftest.er1 >conftest.err
16162 rm -f conftest.er1
16163 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016165 (exit $ac_status); } && {
16166 test -z "$ac_c_werror_flag" ||
16167 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016168 } && test -s conftest$ac_exeext &&
16169 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016170 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016171else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016173sed 's/^/| /' conftest.$ac_ext >&5
16174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016175 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016177
16178rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016179 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016180LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016181fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016182{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16183echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16184if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016185 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016186#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016187_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016188
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016189 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016190 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016191 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016192else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016193
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016194 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16195echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016196if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016197 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016198else
Martin v. Löwis11437992002-04-12 09:54:03 +000016199 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016200LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016201cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016202/* confdefs.h. */
16203_ACEOF
16204cat confdefs.h >>conftest.$ac_ext
16205cat >>conftest.$ac_ext <<_ACEOF
16206/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016208/* Override any GCC internal prototype to avoid an error.
16209 Use char because int might match the return type of a GCC
16210 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016211#ifdef __cplusplus
16212extern "C"
16213#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016214char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016215int
16216main ()
16217{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016218return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016219 ;
16220 return 0;
16221}
16222_ACEOF
16223rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016224if { (ac_try="$ac_link"
16225case "(($ac_try" in
16226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16227 *) ac_try_echo=$ac_try;;
16228esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016230 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016231 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016232 grep -v '^ *+' conftest.er1 >conftest.err
16233 rm -f conftest.er1
16234 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016236 (exit $ac_status); } && {
16237 test -z "$ac_c_werror_flag" ||
16238 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016239 } && test -s conftest$ac_exeext &&
16240 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016241 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016242else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016244sed 's/^/| /' conftest.$ac_ext >&5
16245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016246 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016248
16249rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016250 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016251LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016252fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016253{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16254echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16255if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016256 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016257#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016258_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016259
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016260 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016261 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016262 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016263else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016264
Martin v. Löwis130fb172001-07-19 11:00:41 +000016265 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016266fi
16267
Guido van Rossum627b2d71993-12-24 10:39:16 +000016268
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016269fi
16270
Guido van Rossum0be3e491997-05-22 20:33:33 +000016271fi
16272
Guido van Rossum49545951997-12-02 19:28:29 +000016273fi
16274
Guido van Rossumb93a8621998-05-07 13:27:32 +000016275fi
16276
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016278
16279rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016280 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016281fi
16282
Martin v. Löwis11437992002-04-12 09:54:03 +000016283
16284fi
16285
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016286
Michael W. Hudson54241132001-12-07 15:38:26 +000016287
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016288 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16289echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016290if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016291 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016292else
Martin v. Löwis11437992002-04-12 09:54:03 +000016293 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016294LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016295cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016296/* confdefs.h. */
16297_ACEOF
16298cat confdefs.h >>conftest.$ac_ext
16299cat >>conftest.$ac_ext <<_ACEOF
16300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016302/* Override any GCC internal prototype to avoid an error.
16303 Use char because int might match the return type of a GCC
16304 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016305#ifdef __cplusplus
16306extern "C"
16307#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016308char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016309int
16310main ()
16311{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016312return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016313 ;
16314 return 0;
16315}
16316_ACEOF
16317rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016318if { (ac_try="$ac_link"
16319case "(($ac_try" in
16320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16321 *) ac_try_echo=$ac_try;;
16322esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016324 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016326 grep -v '^ *+' conftest.er1 >conftest.err
16327 rm -f conftest.er1
16328 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016330 (exit $ac_status); } && {
16331 test -z "$ac_c_werror_flag" ||
16332 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016333 } && test -s conftest$ac_exeext &&
16334 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016335 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016336else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016338sed 's/^/| /' conftest.$ac_ext >&5
16339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016340 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016342
16343rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016344 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016345LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016346fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016347{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16348echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16349if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016350 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016351#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016352_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016353
Martin v. Löwis130fb172001-07-19 11:00:41 +000016354 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016355 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016356 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016357fi
16358
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016359
Neal Norwitza978ab02002-11-02 16:58:05 +000016360 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016361 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16362echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016363if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016364 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016365else
Martin v. Löwis11437992002-04-12 09:54:03 +000016366 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016367LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016368cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016369/* confdefs.h. */
16370_ACEOF
16371cat confdefs.h >>conftest.$ac_ext
16372cat >>conftest.$ac_ext <<_ACEOF
16373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016375/* Override any GCC internal prototype to avoid an error.
16376 Use char because int might match the return type of a GCC
16377 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016378#ifdef __cplusplus
16379extern "C"
16380#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016381char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016382int
16383main ()
16384{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016385return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016386 ;
16387 return 0;
16388}
16389_ACEOF
16390rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016391if { (ac_try="$ac_link"
16392case "(($ac_try" in
16393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16394 *) ac_try_echo=$ac_try;;
16395esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016397 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016398 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016399 grep -v '^ *+' conftest.er1 >conftest.err
16400 rm -f conftest.er1
16401 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016403 (exit $ac_status); } && {
16404 test -z "$ac_c_werror_flag" ||
16405 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016406 } && test -s conftest$ac_exeext &&
16407 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016408 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016409else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016410 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016411sed 's/^/| /' conftest.$ac_ext >&5
16412
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016413 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016415
16416rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016417 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016418LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016419fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016420{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16421echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16422if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016423 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016424#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016425_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016426
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016427 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016428 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016429 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016430fi
16431
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016432 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016433
Martin v. Löwis130fb172001-07-19 11:00:41 +000016434 if test "$USE_THREAD_MODULE" != "#"
16435 then
16436 # If the above checks didn't disable threads, (at least) OSF1
16437 # needs this '-threads' argument during linking.
16438 case $ac_sys_system in
16439 OSF1) LDLAST=-threads;;
16440 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016441 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016442fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016443
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016444if test "$posix_threads" = "yes"; then
16445 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016446
16447cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016448#define _POSIX_THREADS 1
16449_ACEOF
16450
16451 fi
16452
16453 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16454 case $ac_sys_system/$ac_sys_release in
16455 SunOS/5.6)
16456cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016457#define HAVE_PTHREAD_DESTRUCTOR 1
16458_ACEOF
16459
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016460 ;;
16461 SunOS/5.8)
16462cat >>confdefs.h <<\_ACEOF
16463#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16464_ACEOF
16465
16466 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016467 AIX/5)
16468cat >>confdefs.h <<\_ACEOF
16469#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16470_ACEOF
16471
16472 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016473 esac
16474
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016475 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16476echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016477 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016478 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016479else
16480 if test "$cross_compiling" = yes; then
16481 ac_cv_pthread_system_supported=no
16482else
16483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016484/* confdefs.h. */
16485_ACEOF
16486cat confdefs.h >>conftest.$ac_ext
16487cat >>conftest.$ac_ext <<_ACEOF
16488/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016489#include <pthread.h>
16490 void *foo(void *parm) {
16491 return NULL;
16492 }
16493 main() {
16494 pthread_attr_t attr;
16495 pthread_t id;
16496 if (pthread_attr_init(&attr)) exit(-1);
16497 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16498 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16499 exit(0);
16500 }
16501_ACEOF
16502rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016503if { (ac_try="$ac_link"
16504case "(($ac_try" in
16505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16506 *) ac_try_echo=$ac_try;;
16507esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016509 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016510 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016513 { (case "(($ac_try" in
16514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16515 *) ac_try_echo=$ac_try;;
16516esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016518 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016519 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016521 (exit $ac_status); }; }; then
16522 ac_cv_pthread_system_supported=yes
16523else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016524 echo "$as_me: program exited with status $ac_status" >&5
16525echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016526sed 's/^/| /' conftest.$ac_ext >&5
16527
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016528( exit $ac_status )
16529ac_cv_pthread_system_supported=no
16530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016531rm -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 +000016532fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534
16535
Guido van Rossum627b2d71993-12-24 10:39:16 +000016536fi
16537
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016538 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16539echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016540 if test "$ac_cv_pthread_system_supported" = "yes"; then
16541
16542cat >>confdefs.h <<\_ACEOF
16543#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16544_ACEOF
16545
16546 fi
16547
16548for ac_func in pthread_sigmask
16549do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016550as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16551{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16552echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016553if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016554 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016555else
16556 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016557/* confdefs.h. */
16558_ACEOF
16559cat confdefs.h >>conftest.$ac_ext
16560cat >>conftest.$ac_ext <<_ACEOF
16561/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016562/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16563 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16564#define $ac_func innocuous_$ac_func
16565
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016566/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016567 which can conflict with char $ac_func (); below.
16568 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016569 <limits.h> exists even on freestanding compilers. */
16570
16571#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016572# include <limits.h>
16573#else
16574# include <assert.h>
16575#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016576
16577#undef $ac_func
16578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016579/* Override any GCC internal prototype to avoid an error.
16580 Use char because int might match the return type of a GCC
16581 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016582#ifdef __cplusplus
16583extern "C"
16584#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016585char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016586/* The GNU C library defines this for functions which it implements
16587 to always fail with ENOSYS. Some functions are actually named
16588 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016589#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016590choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016591#endif
16592
Skip Montanaro6dead952003-09-25 14:50:04 +000016593int
16594main ()
16595{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016596return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016597 ;
16598 return 0;
16599}
16600_ACEOF
16601rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016602if { (ac_try="$ac_link"
16603case "(($ac_try" in
16604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16605 *) ac_try_echo=$ac_try;;
16606esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016608 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016609 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016610 grep -v '^ *+' conftest.er1 >conftest.err
16611 rm -f conftest.er1
16612 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016614 (exit $ac_status); } && {
16615 test -z "$ac_c_werror_flag" ||
16616 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016617 } && test -s conftest$ac_exeext &&
16618 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016619 eval "$as_ac_var=yes"
16620else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016622sed 's/^/| /' conftest.$ac_ext >&5
16623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016624 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016626
16627rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016628 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016629fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016630ac_res=`eval echo '${'$as_ac_var'}'`
16631 { echo "$as_me:$LINENO: result: $ac_res" >&5
16632echo "${ECHO_T}$ac_res" >&6; }
16633if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016634 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016635#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016636_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016637 case $ac_sys_system in
16638 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016639
Jason Tishlerfac083d2003-07-22 15:20:49 +000016640cat >>confdefs.h <<\_ACEOF
16641#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16642_ACEOF
16643
16644 ;;
16645 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016646fi
16647done
16648
16649fi
16650
16651
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016652# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016653
16654
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016655{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16656echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016657# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016658if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016659 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016660 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016661 { echo "$as_me:$LINENO: result: no" >&5
16662echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016663 ipv6=no
16664 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016665 *) { echo "$as_me:$LINENO: result: yes" >&5
16666echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016667 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016668#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016669_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016670
16671 ipv6=yes
16672 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016673 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016674else
Martin v. Löwis11437992002-04-12 09:54:03 +000016675
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016676 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016677 { echo "$as_me:$LINENO: result: no" >&5
16678echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016679 ipv6=no
16680
16681else
Martin v. Löwis11437992002-04-12 09:54:03 +000016682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016683/* confdefs.h. */
16684_ACEOF
16685cat confdefs.h >>conftest.$ac_ext
16686cat >>conftest.$ac_ext <<_ACEOF
16687/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016688 /* AF_INET6 available check */
16689#include <sys/types.h>
16690#include <sys/socket.h>
16691main()
16692{
16693 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16694 exit(1);
16695 else
16696 exit(0);
16697}
16698
Martin v. Löwis11437992002-04-12 09:54:03 +000016699_ACEOF
16700rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016701if { (ac_try="$ac_link"
16702case "(($ac_try" in
16703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16704 *) ac_try_echo=$ac_try;;
16705esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016707 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016708 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016710 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016711 { (case "(($ac_try" in
16712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16713 *) ac_try_echo=$ac_try;;
16714esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016716 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016717 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016719 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016720 { echo "$as_me:$LINENO: result: yes" >&5
16721echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016722 ipv6=yes
16723else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016724 echo "$as_me: program exited with status $ac_status" >&5
16725echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016726sed 's/^/| /' conftest.$ac_ext >&5
16727
Martin v. Löwis11437992002-04-12 09:54:03 +000016728( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016729{ echo "$as_me:$LINENO: result: no" >&5
16730echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016731 ipv6=no
16732fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016733rm -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 +000016734fi
16735
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016736
16737
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016738if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016739 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16740echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016741 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016742/* confdefs.h. */
16743_ACEOF
16744cat confdefs.h >>conftest.$ac_ext
16745cat >>conftest.$ac_ext <<_ACEOF
16746/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016747#include <sys/types.h>
16748#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016749int
16750main ()
16751{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016752struct sockaddr_in6 x;
16753x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016754 ;
16755 return 0;
16756}
16757_ACEOF
16758rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016759if { (ac_try="$ac_compile"
16760case "(($ac_try" in
16761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16762 *) ac_try_echo=$ac_try;;
16763esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016767 grep -v '^ *+' conftest.er1 >conftest.err
16768 rm -f conftest.er1
16769 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016771 (exit $ac_status); } && {
16772 test -z "$ac_c_werror_flag" ||
16773 test ! -s conftest.err
16774 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016775 { echo "$as_me:$LINENO: result: yes" >&5
16776echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016777 ipv6=yes
16778else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016780sed 's/^/| /' conftest.$ac_ext >&5
16781
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016782 { echo "$as_me:$LINENO: result: no" >&5
16783echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016784 ipv6=no
16785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016786
16787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016788fi
16789
16790if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016791 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016792#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016793_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016794
16795fi
16796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016797fi
16798
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016799
16800ipv6type=unknown
16801ipv6lib=none
16802ipv6trylibc=no
16803
16804if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016805 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16806echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016807 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16808 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016809 case $i in
16810 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016812/* confdefs.h. */
16813_ACEOF
16814cat confdefs.h >>conftest.$ac_ext
16815cat >>conftest.$ac_ext <<_ACEOF
16816/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016817
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016818#include <netinet/in.h>
16819#ifdef IPV6_INRIA_VERSION
16820yes
16821#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016822_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016824 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016825 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016826fi
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000016827rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016828
16829 ;;
16830 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016831 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016832/* confdefs.h. */
16833_ACEOF
16834cat confdefs.h >>conftest.$ac_ext
16835cat >>conftest.$ac_ext <<_ACEOF
16836/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016837
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016838#include <netinet/in.h>
16839#ifdef __KAME__
16840yes
16841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016842_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016843if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016844 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016845 ipv6type=$i;
16846 ipv6lib=inet6
16847 ipv6libdir=/usr/local/v6/lib
16848 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016849fi
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000016850rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016851
16852 ;;
16853 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016854 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016855/* confdefs.h. */
16856_ACEOF
16857cat confdefs.h >>conftest.$ac_ext
16858cat >>conftest.$ac_ext <<_ACEOF
16859/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016860
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016861#include <features.h>
16862#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16863yes
16864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016865_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016867 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016868 ipv6type=$i;
16869 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016870fi
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000016871rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016872
16873 ;;
16874 linux-inet6)
16875 if test -d /usr/inet6; then
16876 ipv6type=$i
16877 ipv6lib=inet6
16878 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016879 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016880 fi
16881 ;;
16882 solaris)
16883 if test -f /etc/netconfig; then
16884 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16885 ipv6type=$i
16886 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016887 fi
16888 fi
16889 ;;
16890 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016891 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016892/* confdefs.h. */
16893_ACEOF
16894cat confdefs.h >>conftest.$ac_ext
16895cat >>conftest.$ac_ext <<_ACEOF
16896/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016897
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016898#include <sys/param.h>
16899#ifdef _TOSHIBA_INET6
16900yes
16901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016902_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016904 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016905 ipv6type=$i;
16906 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016907 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016908fi
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000016909rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016910
16911 ;;
16912 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016913 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016914/* confdefs.h. */
16915_ACEOF
16916cat confdefs.h >>conftest.$ac_ext
16917cat >>conftest.$ac_ext <<_ACEOF
16918/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016919
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016920#include </usr/local/v6/include/sys/v6config.h>
16921#ifdef __V6D__
16922yes
16923#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016924_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016925if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016926 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016927 ipv6type=$i;
16928 ipv6lib=v6;
16929 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016930 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016931fi
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000016932rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016933
16934 ;;
16935 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016937/* confdefs.h. */
16938_ACEOF
16939cat confdefs.h >>conftest.$ac_ext
16940cat >>conftest.$ac_ext <<_ACEOF
16941/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016942
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016943#include <sys/param.h>
16944#ifdef _ZETA_MINAMI_INET6
16945yes
16946#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016947_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016948if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016949 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016950 ipv6type=$i;
16951 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016952 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016953fi
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000016954rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016955
16956 ;;
16957 esac
16958 if test "$ipv6type" != "unknown"; then
16959 break
16960 fi
16961 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016962 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16963echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016964fi
16965
16966if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16967 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16968 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16969 echo "using lib$ipv6lib"
16970 else
16971 if test $ipv6trylibc = "yes"; then
16972 echo "using libc"
16973 else
16974 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16975 echo "You need to fetch lib$ipv6lib.a from appropriate"
16976 echo 'ipv6 kit and compile beforehand.'
16977 exit 1
16978 fi
16979 fi
16980fi
16981
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016982{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16983echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016984cat >conftest.$ac_ext <<_ACEOF
16985/* confdefs.h. */
16986_ACEOF
16987cat confdefs.h >>conftest.$ac_ext
16988cat >>conftest.$ac_ext <<_ACEOF
16989/* end confdefs.h. */
16990#include <Carbon/Carbon.h>
16991int
16992main ()
16993{
16994FSIORefNum fRef = 0
16995 ;
16996 return 0;
16997}
16998_ACEOF
16999rm -f conftest.$ac_objext
17000if { (ac_try="$ac_compile"
17001case "(($ac_try" in
17002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17003 *) ac_try_echo=$ac_try;;
17004esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017006 (eval "$ac_compile") 2>conftest.er1
17007 ac_status=$?
17008 grep -v '^ *+' conftest.er1 >conftest.err
17009 rm -f conftest.er1
17010 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017012 (exit $ac_status); } && {
17013 test -z "$ac_c_werror_flag" ||
17014 test ! -s conftest.err
17015 } && test -s conftest.$ac_objext; then
17016
17017cat >>confdefs.h <<\_ACEOF
17018#define HAVE_OSX105_SDK 1
17019_ACEOF
17020
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017021 { echo "$as_me:$LINENO: result: yes" >&5
17022echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017023else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017024 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017025sed 's/^/| /' conftest.$ac_ext >&5
17026
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017027 { echo "$as_me:$LINENO: result: no" >&5
17028echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017029
17030fi
17031
17032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17033
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017034# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017035{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17036echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017038# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017039if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017040 withval=$with_doc_strings;
17041fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017042
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017043
17044if test -z "$with_doc_strings"
17045then with_doc_strings="yes"
17046fi
17047if test "$with_doc_strings" != "no"
17048then
17049
17050cat >>confdefs.h <<\_ACEOF
17051#define WITH_DOC_STRINGS 1
17052_ACEOF
17053
17054fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017055{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17056echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017057
Neil Schemenauera35c6882001-02-27 04:45:05 +000017058# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017059{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17060echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017062# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017063if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017064 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017065if test "$withval" != no
17066then
17067
17068cat >>confdefs.h <<\_ACEOF
17069#define WITH_TSC 1
17070_ACEOF
17071
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017072 { echo "$as_me:$LINENO: result: yes" >&5
17073echo "${ECHO_T}yes" >&6; }
17074else { echo "$as_me:$LINENO: result: no" >&5
17075echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017076fi
17077else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017078 { echo "$as_me:$LINENO: result: no" >&5
17079echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017080fi
17081
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017082
17083# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017084{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17085echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017087# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017088if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017089 withval=$with_pymalloc;
17090fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017091
Neil Schemenauera35c6882001-02-27 04:45:05 +000017092
Neil Schemenauer16c22972002-03-22 15:34:49 +000017093if test -z "$with_pymalloc"
17094then with_pymalloc="yes"
17095fi
17096if test "$with_pymalloc" != "no"
17097then
Martin v. Löwis11437992002-04-12 09:54:03 +000017098
17099cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017100#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017101_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017102
17103fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017104{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17105echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017106
Benjamin Peterson05159c42009-12-03 03:01:27 +000017107# Check for Valgrind support
17108{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17109echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17110
17111# Check whether --with-valgrind was given.
17112if test "${with_valgrind+set}" = set; then
17113 withval=$with_valgrind;
17114else
17115 with_valgrind=no
17116fi
17117
17118{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17119echo "${ECHO_T}$with_valgrind" >&6; }
17120if test "$with_valgrind" != no; then
17121 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17122 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17123echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17124if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17125 echo $ECHO_N "(cached) $ECHO_C" >&6
17126fi
17127{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17128echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17129else
17130 # Is the header compilable?
17131{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17132echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17133cat >conftest.$ac_ext <<_ACEOF
17134/* confdefs.h. */
17135_ACEOF
17136cat confdefs.h >>conftest.$ac_ext
17137cat >>conftest.$ac_ext <<_ACEOF
17138/* end confdefs.h. */
17139$ac_includes_default
17140#include <valgrind/valgrind.h>
17141_ACEOF
17142rm -f conftest.$ac_objext
17143if { (ac_try="$ac_compile"
17144case "(($ac_try" in
17145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17146 *) ac_try_echo=$ac_try;;
17147esac
17148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17149 (eval "$ac_compile") 2>conftest.er1
17150 ac_status=$?
17151 grep -v '^ *+' conftest.er1 >conftest.err
17152 rm -f conftest.er1
17153 cat conftest.err >&5
17154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17155 (exit $ac_status); } && {
17156 test -z "$ac_c_werror_flag" ||
17157 test ! -s conftest.err
17158 } && test -s conftest.$ac_objext; then
17159 ac_header_compiler=yes
17160else
17161 echo "$as_me: failed program was:" >&5
17162sed 's/^/| /' conftest.$ac_ext >&5
17163
17164 ac_header_compiler=no
17165fi
17166
17167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17168{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17169echo "${ECHO_T}$ac_header_compiler" >&6; }
17170
17171# Is the header present?
17172{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17173echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17174cat >conftest.$ac_ext <<_ACEOF
17175/* confdefs.h. */
17176_ACEOF
17177cat confdefs.h >>conftest.$ac_ext
17178cat >>conftest.$ac_ext <<_ACEOF
17179/* end confdefs.h. */
17180#include <valgrind/valgrind.h>
17181_ACEOF
17182if { (ac_try="$ac_cpp conftest.$ac_ext"
17183case "(($ac_try" in
17184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17185 *) ac_try_echo=$ac_try;;
17186esac
17187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17188 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17189 ac_status=$?
17190 grep -v '^ *+' conftest.er1 >conftest.err
17191 rm -f conftest.er1
17192 cat conftest.err >&5
17193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17194 (exit $ac_status); } >/dev/null && {
17195 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17196 test ! -s conftest.err
17197 }; then
17198 ac_header_preproc=yes
17199else
17200 echo "$as_me: failed program was:" >&5
17201sed 's/^/| /' conftest.$ac_ext >&5
17202
17203 ac_header_preproc=no
17204fi
17205
17206rm -f conftest.err conftest.$ac_ext
17207{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17208echo "${ECHO_T}$ac_header_preproc" >&6; }
17209
17210# So? What about this header?
17211case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17212 yes:no: )
17213 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17214echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17215 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17216echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17217 ac_header_preproc=yes
17218 ;;
17219 no:yes:* )
17220 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17221echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17222 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17223echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17224 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17225echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17226 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17227echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17228 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17229echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17230 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17231echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17232 ( cat <<\_ASBOX
17233## -------------------------------------- ##
17234## Report this to http://bugs.python.org/ ##
17235## -------------------------------------- ##
17236_ASBOX
17237 ) | sed "s/^/$as_me: WARNING: /" >&2
17238 ;;
17239esac
17240{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17241echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17242if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17243 echo $ECHO_N "(cached) $ECHO_C" >&6
17244else
17245 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17246fi
17247{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17248echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17249
17250fi
17251if test $ac_cv_header_valgrind_valgrind_h = yes; then
17252
17253cat >>confdefs.h <<\_ACEOF
17254#define WITH_VALGRIND 1
17255_ACEOF
17256
17257else
17258 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17259echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17260 { (exit 1); exit 1; }; }
17261
17262fi
17263
17264
17265fi
17266
Barry Warsawef82cd72000-06-30 16:21:01 +000017267# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017268{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17269echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017270
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017271# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017272if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017273 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017274if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017275then
17276
17277cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017278#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017279_ACEOF
17280
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017281 { echo "$as_me:$LINENO: result: yes" >&5
17282echo "${ECHO_T}yes" >&6; }
17283else { echo "$as_me:$LINENO: result: no" >&5
17284echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017285fi
17286else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017287 { echo "$as_me:$LINENO: result: no" >&5
17288echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289fi
17290
Barry Warsawef82cd72000-06-30 16:21:01 +000017291
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017292# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017293
Guido van Rossum98935bf2001-09-05 19:13:16 +000017294DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017295
Guido van Rossume97ee181999-12-20 21:27:22 +000017296# the dlopen() function means we might want to use dynload_shlib.o. some
17297# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017298
Thomas Wouters3a584202000-08-05 23:28:51 +000017299for ac_func in dlopen
17300do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017301as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17302{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17303echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017304if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017305 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017306else
Martin v. Löwis11437992002-04-12 09:54:03 +000017307 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017308/* confdefs.h. */
17309_ACEOF
17310cat confdefs.h >>conftest.$ac_ext
17311cat >>conftest.$ac_ext <<_ACEOF
17312/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017313/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17314 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17315#define $ac_func innocuous_$ac_func
17316
Guido van Rossume97ee181999-12-20 21:27:22 +000017317/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017318 which can conflict with char $ac_func (); below.
17319 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017320 <limits.h> exists even on freestanding compilers. */
17321
17322#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017323# include <limits.h>
17324#else
17325# include <assert.h>
17326#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017327
17328#undef $ac_func
17329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017330/* Override any GCC internal prototype to avoid an error.
17331 Use char because int might match the return type of a GCC
17332 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017333#ifdef __cplusplus
17334extern "C"
17335#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017336char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017337/* The GNU C library defines this for functions which it implements
17338 to always fail with ENOSYS. Some functions are actually named
17339 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017340#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017341choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017342#endif
17343
Skip Montanaro6dead952003-09-25 14:50:04 +000017344int
17345main ()
17346{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017347return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017348 ;
17349 return 0;
17350}
17351_ACEOF
17352rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017353if { (ac_try="$ac_link"
17354case "(($ac_try" in
17355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17356 *) ac_try_echo=$ac_try;;
17357esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017359 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017361 grep -v '^ *+' conftest.er1 >conftest.err
17362 rm -f conftest.er1
17363 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017365 (exit $ac_status); } && {
17366 test -z "$ac_c_werror_flag" ||
17367 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017368 } && test -s conftest$ac_exeext &&
17369 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017370 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017371else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017373sed 's/^/| /' conftest.$ac_ext >&5
17374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017375 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017377
17378rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017379 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017380fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017381ac_res=`eval echo '${'$as_ac_var'}'`
17382 { echo "$as_me:$LINENO: result: $ac_res" >&5
17383echo "${ECHO_T}$ac_res" >&6; }
17384if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017385 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017386#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017387_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017388
Guido van Rossume97ee181999-12-20 21:27:22 +000017389fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017390done
Guido van Rossume97ee181999-12-20 21:27:22 +000017391
Michael W. Hudson54241132001-12-07 15:38:26 +000017392
Guido van Rossume97ee181999-12-20 21:27:22 +000017393# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17394# loading of modules.
17395
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017396{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17397echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017398if test -z "$DYNLOADFILE"
17399then
17400 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017401 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17402 if test "$ac_cv_func_dlopen" = yes
17403 then DYNLOADFILE="dynload_shlib.o"
17404 else DYNLOADFILE="dynload_aix.o"
17405 fi
17406 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017407 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017408 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17409 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017410 *)
17411 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17412 # out any dynamic loading
17413 if test "$ac_cv_func_dlopen" = yes
17414 then DYNLOADFILE="dynload_shlib.o"
17415 else DYNLOADFILE="dynload_stub.o"
17416 fi
17417 ;;
17418 esac
17419fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017420{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17421echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017422if test "$DYNLOADFILE" != "dynload_stub.o"
17423then
Martin v. Löwis11437992002-04-12 09:54:03 +000017424
17425cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017426#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017427_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017428
17429fi
17430
Neil Schemenauer4e425612001-06-19 15:44:15 +000017431# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17432
Michael W. Hudson54241132001-12-07 15:38:26 +000017433
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017434{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17435echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017436if test -z "$MACHDEP_OBJS"
17437then
Jack Jansene578a632001-08-15 01:27:14 +000017438 MACHDEP_OBJS=$extra_machdep_objs
17439else
17440 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017441fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017442{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17443echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017444
Guido van Rossum627b2d71993-12-24 10:39:16 +000017445# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
Martin v. Löwisd6320502004-08-12 13:45:08 +000017517
Martin v. Löwisc3001752005-01-23 09:27:24 +000017518
17519
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017520
17521
Thomas Wouterscf297e42007-02-23 15:07:44 +000017522
17523
Gregory P. Smith25523d22007-09-03 16:44:55 +000017524
Christian Heimes4e30a842007-11-30 22:12:06 +000017525
Martin v. Löwis92fab752008-03-08 10:40:41 +000017526
Martin v. Löwis823725e2008-03-24 13:39:54 +000017527
17528
Benjamin Peterson965ce872009-04-05 21:24:58 +000017529
17530
17531
17532
Martin v. Löwis011e8422009-05-05 04:43:17 +000017533
Martin v. Löwis113a0852009-05-29 17:25:39 +000017534
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017535
17536
17537
17538
Antoine Pitroub7572f02009-12-02 20:46:48 +000017539
Martin v. Löwis823725e2008-03-24 13:39:54 +000017540for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17541 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017542 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017543 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +000017544 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017545 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017546 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017547 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17548 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017549 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
17550 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017551 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017552 truncate uname unsetenv utimes waitpid wait3 wait4 \
17553 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017554do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017555as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17556{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17557echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017558if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017559 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017560else
Martin v. Löwis11437992002-04-12 09:54:03 +000017561 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017562/* confdefs.h. */
17563_ACEOF
17564cat confdefs.h >>conftest.$ac_ext
17565cat >>conftest.$ac_ext <<_ACEOF
17566/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017567/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17568 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17569#define $ac_func innocuous_$ac_func
17570
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017571/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017572 which can conflict with char $ac_func (); below.
17573 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017574 <limits.h> exists even on freestanding compilers. */
17575
17576#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017577# include <limits.h>
17578#else
17579# include <assert.h>
17580#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017581
17582#undef $ac_func
17583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017584/* Override any GCC internal prototype to avoid an error.
17585 Use char because int might match the return type of a GCC
17586 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017587#ifdef __cplusplus
17588extern "C"
17589#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017590char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017591/* The GNU C library defines this for functions which it implements
17592 to always fail with ENOSYS. Some functions are actually named
17593 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017594#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017595choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017596#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017597
Skip Montanaro6dead952003-09-25 14:50:04 +000017598int
17599main ()
17600{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017601return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017602 ;
17603 return 0;
17604}
17605_ACEOF
17606rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017607if { (ac_try="$ac_link"
17608case "(($ac_try" in
17609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17610 *) ac_try_echo=$ac_try;;
17611esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017613 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017615 grep -v '^ *+' conftest.er1 >conftest.err
17616 rm -f conftest.er1
17617 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017619 (exit $ac_status); } && {
17620 test -z "$ac_c_werror_flag" ||
17621 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017622 } && test -s conftest$ac_exeext &&
17623 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017624 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017625else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017627sed 's/^/| /' conftest.$ac_ext >&5
17628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017629 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017631
17632rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017633 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017634fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017635ac_res=`eval echo '${'$as_ac_var'}'`
17636 { echo "$as_me:$LINENO: result: $ac_res" >&5
17637echo "${ECHO_T}$ac_res" >&6; }
17638if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017639 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017640#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017641_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017642
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017643fi
17644done
17645
Michael W. Hudson54241132001-12-07 15:38:26 +000017646
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017647# For some functions, having a definition is not sufficient, since
17648# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017649{ echo "$as_me:$LINENO: checking for chroot" >&5
17650echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017651cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017652/* confdefs.h. */
17653_ACEOF
17654cat confdefs.h >>conftest.$ac_ext
17655cat >>conftest.$ac_ext <<_ACEOF
17656/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017657#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017658int
17659main ()
17660{
17661void *x=chroot
17662 ;
17663 return 0;
17664}
17665_ACEOF
17666rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017667if { (ac_try="$ac_compile"
17668case "(($ac_try" in
17669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17670 *) ac_try_echo=$ac_try;;
17671esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017673 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017675 grep -v '^ *+' conftest.er1 >conftest.err
17676 rm -f conftest.er1
17677 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017679 (exit $ac_status); } && {
17680 test -z "$ac_c_werror_flag" ||
17681 test ! -s conftest.err
17682 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017683
17684cat >>confdefs.h <<\_ACEOF
17685#define HAVE_CHROOT 1
17686_ACEOF
17687
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017688 { echo "$as_me:$LINENO: result: yes" >&5
17689echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017690else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017692sed 's/^/| /' conftest.$ac_ext >&5
17693
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017694 { echo "$as_me:$LINENO: result: no" >&5
17695echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017696
17697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017698
17699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017700{ echo "$as_me:$LINENO: checking for link" >&5
17701echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017702cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017703/* confdefs.h. */
17704_ACEOF
17705cat confdefs.h >>conftest.$ac_ext
17706cat >>conftest.$ac_ext <<_ACEOF
17707/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017708#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017709int
17710main ()
17711{
17712void *x=link
17713 ;
17714 return 0;
17715}
17716_ACEOF
17717rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017718if { (ac_try="$ac_compile"
17719case "(($ac_try" in
17720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17721 *) ac_try_echo=$ac_try;;
17722esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017724 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017726 grep -v '^ *+' conftest.er1 >conftest.err
17727 rm -f conftest.er1
17728 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017730 (exit $ac_status); } && {
17731 test -z "$ac_c_werror_flag" ||
17732 test ! -s conftest.err
17733 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017734
17735cat >>confdefs.h <<\_ACEOF
17736#define HAVE_LINK 1
17737_ACEOF
17738
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017739 { echo "$as_me:$LINENO: result: yes" >&5
17740echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017741else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017743sed 's/^/| /' conftest.$ac_ext >&5
17744
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017745 { echo "$as_me:$LINENO: result: no" >&5
17746echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017747
17748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017749
17750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017751{ echo "$as_me:$LINENO: checking for symlink" >&5
17752echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017753cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017754/* confdefs.h. */
17755_ACEOF
17756cat confdefs.h >>conftest.$ac_ext
17757cat >>conftest.$ac_ext <<_ACEOF
17758/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017759#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017760int
17761main ()
17762{
17763void *x=symlink
17764 ;
17765 return 0;
17766}
17767_ACEOF
17768rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017769if { (ac_try="$ac_compile"
17770case "(($ac_try" in
17771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17772 *) ac_try_echo=$ac_try;;
17773esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017775 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017777 grep -v '^ *+' conftest.er1 >conftest.err
17778 rm -f conftest.er1
17779 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017781 (exit $ac_status); } && {
17782 test -z "$ac_c_werror_flag" ||
17783 test ! -s conftest.err
17784 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017785
17786cat >>confdefs.h <<\_ACEOF
17787#define HAVE_SYMLINK 1
17788_ACEOF
17789
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017790 { echo "$as_me:$LINENO: result: yes" >&5
17791echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017792else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017794sed 's/^/| /' conftest.$ac_ext >&5
17795
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017796 { echo "$as_me:$LINENO: result: no" >&5
17797echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017798
17799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017800
17801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017802{ echo "$as_me:$LINENO: checking for fchdir" >&5
17803echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017804cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017805/* confdefs.h. */
17806_ACEOF
17807cat confdefs.h >>conftest.$ac_ext
17808cat >>conftest.$ac_ext <<_ACEOF
17809/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017810#include <unistd.h>
17811int
17812main ()
17813{
17814void *x=fchdir
17815 ;
17816 return 0;
17817}
17818_ACEOF
17819rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017820if { (ac_try="$ac_compile"
17821case "(($ac_try" in
17822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17823 *) ac_try_echo=$ac_try;;
17824esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017826 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017828 grep -v '^ *+' conftest.er1 >conftest.err
17829 rm -f conftest.er1
17830 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017832 (exit $ac_status); } && {
17833 test -z "$ac_c_werror_flag" ||
17834 test ! -s conftest.err
17835 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017836
17837cat >>confdefs.h <<\_ACEOF
17838#define HAVE_FCHDIR 1
17839_ACEOF
17840
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017841 { echo "$as_me:$LINENO: result: yes" >&5
17842echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017843else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017845sed 's/^/| /' conftest.$ac_ext >&5
17846
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017847 { echo "$as_me:$LINENO: result: no" >&5
17848echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017849
17850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017851
17852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017853{ echo "$as_me:$LINENO: checking for fsync" >&5
17854echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017855cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017856/* confdefs.h. */
17857_ACEOF
17858cat confdefs.h >>conftest.$ac_ext
17859cat >>conftest.$ac_ext <<_ACEOF
17860/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017861#include <unistd.h>
17862int
17863main ()
17864{
17865void *x=fsync
17866 ;
17867 return 0;
17868}
17869_ACEOF
17870rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017871if { (ac_try="$ac_compile"
17872case "(($ac_try" in
17873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17874 *) ac_try_echo=$ac_try;;
17875esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017877 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017878 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017879 grep -v '^ *+' conftest.er1 >conftest.err
17880 rm -f conftest.er1
17881 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017883 (exit $ac_status); } && {
17884 test -z "$ac_c_werror_flag" ||
17885 test ! -s conftest.err
17886 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017887
17888cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017889#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017890_ACEOF
17891
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017892 { echo "$as_me:$LINENO: result: yes" >&5
17893echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017894else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017896sed 's/^/| /' conftest.$ac_ext >&5
17897
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017898 { echo "$as_me:$LINENO: result: no" >&5
17899echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017900
17901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902
17903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017904{ echo "$as_me:$LINENO: checking for fdatasync" >&5
17905echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017906cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017907/* confdefs.h. */
17908_ACEOF
17909cat confdefs.h >>conftest.$ac_ext
17910cat >>conftest.$ac_ext <<_ACEOF
17911/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017912#include <unistd.h>
17913int
17914main ()
17915{
17916void *x=fdatasync
17917 ;
17918 return 0;
17919}
17920_ACEOF
17921rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017922if { (ac_try="$ac_compile"
17923case "(($ac_try" in
17924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17925 *) ac_try_echo=$ac_try;;
17926esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017928 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017929 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017930 grep -v '^ *+' conftest.er1 >conftest.err
17931 rm -f conftest.er1
17932 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017934 (exit $ac_status); } && {
17935 test -z "$ac_c_werror_flag" ||
17936 test ! -s conftest.err
17937 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017938
17939cat >>confdefs.h <<\_ACEOF
17940#define HAVE_FDATASYNC 1
17941_ACEOF
17942
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017943 { echo "$as_me:$LINENO: result: yes" >&5
17944echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017945else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017946 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017947sed 's/^/| /' conftest.$ac_ext >&5
17948
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017949 { echo "$as_me:$LINENO: result: no" >&5
17950echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017951
17952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017953
17954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017955{ echo "$as_me:$LINENO: checking for epoll" >&5
17956echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017957cat >conftest.$ac_ext <<_ACEOF
17958/* confdefs.h. */
17959_ACEOF
17960cat confdefs.h >>conftest.$ac_ext
17961cat >>conftest.$ac_ext <<_ACEOF
17962/* end confdefs.h. */
17963#include <sys/epoll.h>
17964int
17965main ()
17966{
17967void *x=epoll_create
17968 ;
17969 return 0;
17970}
17971_ACEOF
17972rm -f conftest.$ac_objext
17973if { (ac_try="$ac_compile"
17974case "(($ac_try" in
17975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17976 *) ac_try_echo=$ac_try;;
17977esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017979 (eval "$ac_compile") 2>conftest.er1
17980 ac_status=$?
17981 grep -v '^ *+' conftest.er1 >conftest.err
17982 rm -f conftest.er1
17983 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017985 (exit $ac_status); } && {
17986 test -z "$ac_c_werror_flag" ||
17987 test ! -s conftest.err
17988 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017989
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017990cat >>confdefs.h <<\_ACEOF
17991#define HAVE_EPOLL 1
17992_ACEOF
17993
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017994 { echo "$as_me:$LINENO: result: yes" >&5
17995echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017996else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017997 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017998sed 's/^/| /' conftest.$ac_ext >&5
17999
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018000 { echo "$as_me:$LINENO: result: no" >&5
18001echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018002
18003fi
18004
18005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018006{ echo "$as_me:$LINENO: checking for kqueue" >&5
18007echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018008cat >conftest.$ac_ext <<_ACEOF
18009/* confdefs.h. */
18010_ACEOF
18011cat confdefs.h >>conftest.$ac_ext
18012cat >>conftest.$ac_ext <<_ACEOF
18013/* end confdefs.h. */
18014
18015#include <sys/types.h>
18016#include <sys/event.h>
18017
18018int
18019main ()
18020{
18021int x=kqueue()
18022 ;
18023 return 0;
18024}
18025_ACEOF
18026rm -f conftest.$ac_objext
18027if { (ac_try="$ac_compile"
18028case "(($ac_try" in
18029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18030 *) ac_try_echo=$ac_try;;
18031esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018033 (eval "$ac_compile") 2>conftest.er1
18034 ac_status=$?
18035 grep -v '^ *+' conftest.er1 >conftest.err
18036 rm -f conftest.er1
18037 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018039 (exit $ac_status); } && {
18040 test -z "$ac_c_werror_flag" ||
18041 test ! -s conftest.err
18042 } && test -s conftest.$ac_objext; then
18043
18044cat >>confdefs.h <<\_ACEOF
18045#define HAVE_KQUEUE 1
18046_ACEOF
18047
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018048 { echo "$as_me:$LINENO: result: yes" >&5
18049echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018050else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018051 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018052sed 's/^/| /' conftest.$ac_ext >&5
18053
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018054 { echo "$as_me:$LINENO: result: no" >&5
18055echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018056
18057fi
18058
18059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018060# On some systems (eg. FreeBSD 5), we would find a definition of the
18061# functions ctermid_r, setgroups in the library, but no prototype
18062# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18063# address to avoid compiler warnings and potential miscompilations
18064# because of the missing prototypes.
18065
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018066{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18067echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018068cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018069/* confdefs.h. */
18070_ACEOF
18071cat confdefs.h >>conftest.$ac_ext
18072cat >>conftest.$ac_ext <<_ACEOF
18073/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018074
18075#include "confdefs.h"
18076#include <stdio.h>
18077
Martin v. Löwisd5843682002-11-21 20:41:28 +000018078int
18079main ()
18080{
18081void* p = ctermid_r
18082 ;
18083 return 0;
18084}
18085_ACEOF
18086rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018087if { (ac_try="$ac_compile"
18088case "(($ac_try" in
18089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18090 *) ac_try_echo=$ac_try;;
18091esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018093 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018094 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018095 grep -v '^ *+' conftest.er1 >conftest.err
18096 rm -f conftest.er1
18097 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018099 (exit $ac_status); } && {
18100 test -z "$ac_c_werror_flag" ||
18101 test ! -s conftest.err
18102 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018103
18104cat >>confdefs.h <<\_ACEOF
18105#define HAVE_CTERMID_R 1
18106_ACEOF
18107
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018108 { echo "$as_me:$LINENO: result: yes" >&5
18109echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018110else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018112sed 's/^/| /' conftest.$ac_ext >&5
18113
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018114 { echo "$as_me:$LINENO: result: no" >&5
18115echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018116
18117fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18120
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018121{ echo "$as_me:$LINENO: checking for flock" >&5
18122echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018123cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018124/* confdefs.h. */
18125_ACEOF
18126cat confdefs.h >>conftest.$ac_ext
18127cat >>conftest.$ac_ext <<_ACEOF
18128/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018129
18130#include "confdefs.h"
18131#include <sys/file.h>
18132
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018133int
18134main ()
18135{
18136void* p = flock
18137 ;
18138 return 0;
18139}
18140_ACEOF
18141rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018142if { (ac_try="$ac_compile"
18143case "(($ac_try" in
18144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18145 *) ac_try_echo=$ac_try;;
18146esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018148 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018149 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018150 grep -v '^ *+' conftest.er1 >conftest.err
18151 rm -f conftest.er1
18152 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018154 (exit $ac_status); } && {
18155 test -z "$ac_c_werror_flag" ||
18156 test ! -s conftest.err
18157 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018158
18159cat >>confdefs.h <<\_ACEOF
18160#define HAVE_FLOCK 1
18161_ACEOF
18162
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018163 { echo "$as_me:$LINENO: result: yes" >&5
18164echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018165else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018166 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018167sed 's/^/| /' conftest.$ac_ext >&5
18168
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018169 { echo "$as_me:$LINENO: result: no" >&5
18170echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018171
18172fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18175
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018176{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18177echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018178cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018179/* confdefs.h. */
18180_ACEOF
18181cat confdefs.h >>conftest.$ac_ext
18182cat >>conftest.$ac_ext <<_ACEOF
18183/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018184
18185#include "confdefs.h"
18186#include <unistd.h>
18187
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018188int
18189main ()
18190{
18191void* p = getpagesize
18192 ;
18193 return 0;
18194}
18195_ACEOF
18196rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018197if { (ac_try="$ac_compile"
18198case "(($ac_try" in
18199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18200 *) ac_try_echo=$ac_try;;
18201esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018203 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018204 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018205 grep -v '^ *+' conftest.er1 >conftest.err
18206 rm -f conftest.er1
18207 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018209 (exit $ac_status); } && {
18210 test -z "$ac_c_werror_flag" ||
18211 test ! -s conftest.err
18212 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018213
18214cat >>confdefs.h <<\_ACEOF
18215#define HAVE_GETPAGESIZE 1
18216_ACEOF
18217
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018218 { echo "$as_me:$LINENO: result: yes" >&5
18219echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018220else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018222sed 's/^/| /' conftest.$ac_ext >&5
18223
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018224 { echo "$as_me:$LINENO: result: no" >&5
18225echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018226
18227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018228
18229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018230
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018231for ac_prog in true
18232do
18233 # Extract the first word of "$ac_prog", so it can be a program name with args.
18234set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018235{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18236echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018237if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018238 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018239else
18240 if test -n "$TRUE"; then
18241 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18242else
18243as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18244for as_dir in $PATH
18245do
18246 IFS=$as_save_IFS
18247 test -z "$as_dir" && as_dir=.
18248 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018249 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 +000018250 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018251 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018252 break 2
18253 fi
18254done
18255done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018256IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018257
18258fi
18259fi
18260TRUE=$ac_cv_prog_TRUE
18261if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018262 { echo "$as_me:$LINENO: result: $TRUE" >&5
18263echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018264else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018265 { echo "$as_me:$LINENO: result: no" >&5
18266echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018267fi
18268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018269
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018270 test -n "$TRUE" && break
18271done
18272test -n "$TRUE" || TRUE="/bin/true"
18273
18274
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018275{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18276echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018277if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018278 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018279else
18280 ac_check_lib_save_LIBS=$LIBS
18281LIBS="-lc $LIBS"
18282cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018283/* confdefs.h. */
18284_ACEOF
18285cat confdefs.h >>conftest.$ac_ext
18286cat >>conftest.$ac_ext <<_ACEOF
18287/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018289/* Override any GCC internal prototype to avoid an error.
18290 Use char because int might match the return type of a GCC
18291 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018292#ifdef __cplusplus
18293extern "C"
18294#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018295char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018296int
18297main ()
18298{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018299return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018300 ;
18301 return 0;
18302}
18303_ACEOF
18304rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018305if { (ac_try="$ac_link"
18306case "(($ac_try" in
18307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18308 *) ac_try_echo=$ac_try;;
18309esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018311 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018312 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018313 grep -v '^ *+' conftest.er1 >conftest.err
18314 rm -f conftest.er1
18315 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018317 (exit $ac_status); } && {
18318 test -z "$ac_c_werror_flag" ||
18319 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018320 } && test -s conftest$ac_exeext &&
18321 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018322 ac_cv_lib_c_inet_aton=yes
18323else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018325sed 's/^/| /' conftest.$ac_ext >&5
18326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018327 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018329
18330rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018331 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018332LIBS=$ac_check_lib_save_LIBS
18333fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018334{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18335echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18336if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018337 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018338else
18339
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018340{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18341echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018342if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018343 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018344else
18345 ac_check_lib_save_LIBS=$LIBS
18346LIBS="-lresolv $LIBS"
18347cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018348/* confdefs.h. */
18349_ACEOF
18350cat confdefs.h >>conftest.$ac_ext
18351cat >>conftest.$ac_ext <<_ACEOF
18352/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018354/* Override any GCC internal prototype to avoid an error.
18355 Use char because int might match the return type of a GCC
18356 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018357#ifdef __cplusplus
18358extern "C"
18359#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018360char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018361int
18362main ()
18363{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018364return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018365 ;
18366 return 0;
18367}
18368_ACEOF
18369rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018370if { (ac_try="$ac_link"
18371case "(($ac_try" in
18372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18373 *) ac_try_echo=$ac_try;;
18374esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018376 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018377 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018378 grep -v '^ *+' conftest.er1 >conftest.err
18379 rm -f conftest.er1
18380 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018382 (exit $ac_status); } && {
18383 test -z "$ac_c_werror_flag" ||
18384 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018385 } && test -s conftest$ac_exeext &&
18386 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018387 ac_cv_lib_resolv_inet_aton=yes
18388else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018389 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018390sed 's/^/| /' conftest.$ac_ext >&5
18391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018392 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018394
18395rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018396 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018397LIBS=$ac_check_lib_save_LIBS
18398fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018399{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18400echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18401if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018402 cat >>confdefs.h <<_ACEOF
18403#define HAVE_LIBRESOLV 1
18404_ACEOF
18405
18406 LIBS="-lresolv $LIBS"
18407
18408fi
18409
18410
18411fi
18412
18413
Christian Heimesd0764e22007-12-04 15:00:33 +000018414# On Tru64, chflags seems to be present, but calling it will
18415# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018416{ echo "$as_me:$LINENO: checking for chflags" >&5
18417echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018418if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018419 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018420else
18421 if test "$cross_compiling" = yes; then
18422 ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018423else
18424 cat >conftest.$ac_ext <<_ACEOF
18425/* confdefs.h. */
18426_ACEOF
18427cat confdefs.h >>conftest.$ac_ext
18428cat >>conftest.$ac_ext <<_ACEOF
18429/* end confdefs.h. */
18430
18431#include <sys/stat.h>
18432#include <unistd.h>
18433int main(int argc, char*argv[])
18434{
18435 if(chflags(argv[0], 0) != 0)
18436 return 1;
18437 return 0;
18438}
18439
18440_ACEOF
18441rm -f conftest$ac_exeext
18442if { (ac_try="$ac_link"
18443case "(($ac_try" in
18444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18445 *) ac_try_echo=$ac_try;;
18446esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018448 (eval "$ac_link") 2>&5
18449 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018451 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18452 { (case "(($ac_try" in
18453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18454 *) ac_try_echo=$ac_try;;
18455esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018457 (eval "$ac_try") 2>&5
18458 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018460 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018461 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018462else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018463 echo "$as_me: program exited with status $ac_status" >&5
18464echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018465sed 's/^/| /' conftest.$ac_ext >&5
18466
18467( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018468ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018469fi
18470rm -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 +000018471fi
18472
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018473
18474
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018475fi
18476
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018477{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18478echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018479if test $ac_cv_have_chflags = yes
18480then
18481
18482cat >>confdefs.h <<\_ACEOF
18483#define HAVE_CHFLAGS 1
18484_ACEOF
18485
18486fi
18487
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018488{ echo "$as_me:$LINENO: checking for lchflags" >&5
18489echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018490if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018491 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018492else
18493 if test "$cross_compiling" = yes; then
18494 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018495else
18496 cat >conftest.$ac_ext <<_ACEOF
18497/* confdefs.h. */
18498_ACEOF
18499cat confdefs.h >>conftest.$ac_ext
18500cat >>conftest.$ac_ext <<_ACEOF
18501/* end confdefs.h. */
18502
18503#include <sys/stat.h>
18504#include <unistd.h>
18505int main(int argc, char*argv[])
18506{
18507 if(lchflags(argv[0], 0) != 0)
18508 return 1;
18509 return 0;
18510}
18511
18512_ACEOF
18513rm -f conftest$ac_exeext
18514if { (ac_try="$ac_link"
18515case "(($ac_try" in
18516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18517 *) ac_try_echo=$ac_try;;
18518esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018520 (eval "$ac_link") 2>&5
18521 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018523 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18524 { (case "(($ac_try" in
18525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18526 *) ac_try_echo=$ac_try;;
18527esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018529 (eval "$ac_try") 2>&5
18530 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018532 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018533 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018534else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018535 echo "$as_me: program exited with status $ac_status" >&5
18536echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018537sed 's/^/| /' conftest.$ac_ext >&5
18538
18539( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018540ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018541fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018542rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18543fi
18544
18545
Christian Heimesd0764e22007-12-04 15:00:33 +000018546
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018547fi
18548
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018549{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18550echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018551if test $ac_cv_have_lchflags = yes
18552then
18553
18554cat >>confdefs.h <<\_ACEOF
18555#define HAVE_LCHFLAGS 1
18556_ACEOF
18557
18558fi
18559
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018560case $ac_sys_system/$ac_sys_release in
18561Darwin/*)
18562 _CUR_CFLAGS="${CFLAGS}"
18563 _CUR_LDFLAGS="${LDFLAGS}"
18564 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18565 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18566 ;;
18567esac
18568
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018569{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18570echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018571if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018572 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018573else
18574 ac_check_lib_save_LIBS=$LIBS
18575LIBS="-lz $LIBS"
18576cat >conftest.$ac_ext <<_ACEOF
18577/* confdefs.h. */
18578_ACEOF
18579cat confdefs.h >>conftest.$ac_ext
18580cat >>conftest.$ac_ext <<_ACEOF
18581/* end confdefs.h. */
18582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018583/* Override any GCC internal prototype to avoid an error.
18584 Use char because int might match the return type of a GCC
18585 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018586#ifdef __cplusplus
18587extern "C"
18588#endif
18589char inflateCopy ();
18590int
18591main ()
18592{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018593return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018594 ;
18595 return 0;
18596}
18597_ACEOF
18598rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018599if { (ac_try="$ac_link"
18600case "(($ac_try" in
18601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18602 *) ac_try_echo=$ac_try;;
18603esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018605 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018606 ac_status=$?
18607 grep -v '^ *+' conftest.er1 >conftest.err
18608 rm -f conftest.er1
18609 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018611 (exit $ac_status); } && {
18612 test -z "$ac_c_werror_flag" ||
18613 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018614 } && test -s conftest$ac_exeext &&
18615 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018616 ac_cv_lib_z_inflateCopy=yes
18617else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018618 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018619sed 's/^/| /' conftest.$ac_ext >&5
18620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018621 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018623
18624rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018625 conftest$ac_exeext conftest.$ac_ext
18626LIBS=$ac_check_lib_save_LIBS
18627fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018628{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18629echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18630if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018631
18632cat >>confdefs.h <<\_ACEOF
18633#define HAVE_ZLIB_COPY 1
18634_ACEOF
18635
18636fi
18637
18638
18639case $ac_sys_system/$ac_sys_release in
18640Darwin/*)
18641 CFLAGS="${_CUR_CFLAGS}"
18642 LDFLAGS="${_CUR_LDFLAGS}"
18643 ;;
18644esac
18645
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018646{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18647echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018648cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018649/* confdefs.h. */
18650_ACEOF
18651cat confdefs.h >>conftest.$ac_ext
18652cat >>conftest.$ac_ext <<_ACEOF
18653/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018654
18655#include "confdefs.h"
18656#include <netdb.h>
18657
Martin v. Löwise9416172003-05-03 10:12:45 +000018658int
18659main ()
18660{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018661void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018662 ;
18663 return 0;
18664}
18665_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018666rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018667if { (ac_try="$ac_link"
18668case "(($ac_try" in
18669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18670 *) ac_try_echo=$ac_try;;
18671esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018673 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018675 grep -v '^ *+' conftest.er1 >conftest.err
18676 rm -f conftest.er1
18677 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018679 (exit $ac_status); } && {
18680 test -z "$ac_c_werror_flag" ||
18681 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018682 } && test -s conftest$ac_exeext &&
18683 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018684
18685cat >>confdefs.h <<\_ACEOF
18686#define HAVE_HSTRERROR 1
18687_ACEOF
18688
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018689 { echo "$as_me:$LINENO: result: yes" >&5
18690echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018691else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018693sed 's/^/| /' conftest.$ac_ext >&5
18694
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018695 { echo "$as_me:$LINENO: result: no" >&5
18696echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018697
18698fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018699
18700rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018701 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018702
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018703{ echo "$as_me:$LINENO: checking for inet_aton" >&5
18704echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018705cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018706/* confdefs.h. */
18707_ACEOF
18708cat confdefs.h >>conftest.$ac_ext
18709cat >>conftest.$ac_ext <<_ACEOF
18710/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018711
18712#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018713#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018714#include <sys/socket.h>
18715#include <netinet/in.h>
18716#include <arpa/inet.h>
18717
Martin v. Löwise9416172003-05-03 10:12:45 +000018718int
18719main ()
18720{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018721void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018722 ;
18723 return 0;
18724}
18725_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018726rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018727if { (ac_try="$ac_link"
18728case "(($ac_try" in
18729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18730 *) ac_try_echo=$ac_try;;
18731esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018733 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018735 grep -v '^ *+' conftest.er1 >conftest.err
18736 rm -f conftest.er1
18737 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018739 (exit $ac_status); } && {
18740 test -z "$ac_c_werror_flag" ||
18741 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018742 } && test -s conftest$ac_exeext &&
18743 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018744
18745cat >>confdefs.h <<\_ACEOF
18746#define HAVE_INET_ATON 1
18747_ACEOF
18748
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018749 { echo "$as_me:$LINENO: result: yes" >&5
18750echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018751else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018753sed 's/^/| /' conftest.$ac_ext >&5
18754
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018755 { echo "$as_me:$LINENO: result: no" >&5
18756echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018757
18758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018759
18760rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018761 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018762
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018763{ echo "$as_me:$LINENO: checking for inet_pton" >&5
18764echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018765cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018766/* confdefs.h. */
18767_ACEOF
18768cat confdefs.h >>conftest.$ac_ext
18769cat >>conftest.$ac_ext <<_ACEOF
18770/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018771
18772#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018773#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018774#include <sys/socket.h>
18775#include <netinet/in.h>
18776#include <arpa/inet.h>
18777
Martin v. Löwise9416172003-05-03 10:12:45 +000018778int
18779main ()
18780{
18781void* p = inet_pton
18782 ;
18783 return 0;
18784}
18785_ACEOF
18786rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018787if { (ac_try="$ac_compile"
18788case "(($ac_try" in
18789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18790 *) ac_try_echo=$ac_try;;
18791esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018795 grep -v '^ *+' conftest.er1 >conftest.err
18796 rm -f conftest.er1
18797 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018799 (exit $ac_status); } && {
18800 test -z "$ac_c_werror_flag" ||
18801 test ! -s conftest.err
18802 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018803
18804cat >>confdefs.h <<\_ACEOF
18805#define HAVE_INET_PTON 1
18806_ACEOF
18807
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018808 { echo "$as_me:$LINENO: result: yes" >&5
18809echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018810else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018812sed 's/^/| /' conftest.$ac_ext >&5
18813
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018814 { echo "$as_me:$LINENO: result: no" >&5
18815echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018816
18817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018818
18819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018820
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018821# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018822{ echo "$as_me:$LINENO: checking for setgroups" >&5
18823echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018824cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018825/* confdefs.h. */
18826_ACEOF
18827cat confdefs.h >>conftest.$ac_ext
18828cat >>conftest.$ac_ext <<_ACEOF
18829/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018830
18831#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018832#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018833#ifdef HAVE_GRP_H
18834#include <grp.h>
18835#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000018836
Martin v. Löwisd5843682002-11-21 20:41:28 +000018837int
18838main ()
18839{
18840void* p = setgroups
18841 ;
18842 return 0;
18843}
18844_ACEOF
18845rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018846if { (ac_try="$ac_compile"
18847case "(($ac_try" in
18848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18849 *) ac_try_echo=$ac_try;;
18850esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018852 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018853 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018854 grep -v '^ *+' conftest.er1 >conftest.err
18855 rm -f conftest.er1
18856 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018858 (exit $ac_status); } && {
18859 test -z "$ac_c_werror_flag" ||
18860 test ! -s conftest.err
18861 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018862
18863cat >>confdefs.h <<\_ACEOF
18864#define HAVE_SETGROUPS 1
18865_ACEOF
18866
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018867 { echo "$as_me:$LINENO: result: yes" >&5
18868echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018869else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018871sed 's/^/| /' conftest.$ac_ext >&5
18872
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018873 { echo "$as_me:$LINENO: result: no" >&5
18874echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018875
18876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018877
18878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018879
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018880# check for openpty and forkpty
18881
Martin v. Löwis11437992002-04-12 09:54:03 +000018882
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018883for ac_func in openpty
18884do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018885as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18886{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18887echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018888if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018889 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018890else
Martin v. Löwis11437992002-04-12 09:54:03 +000018891 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018892/* confdefs.h. */
18893_ACEOF
18894cat confdefs.h >>conftest.$ac_ext
18895cat >>conftest.$ac_ext <<_ACEOF
18896/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018897/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18898 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18899#define $ac_func innocuous_$ac_func
18900
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018901/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018902 which can conflict with char $ac_func (); below.
18903 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018904 <limits.h> exists even on freestanding compilers. */
18905
18906#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018907# include <limits.h>
18908#else
18909# include <assert.h>
18910#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018911
18912#undef $ac_func
18913
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018914/* Override any GCC internal prototype to avoid an error.
18915 Use char because int might match the return type of a GCC
18916 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018917#ifdef __cplusplus
18918extern "C"
18919#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018920char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018921/* The GNU C library defines this for functions which it implements
18922 to always fail with ENOSYS. Some functions are actually named
18923 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018924#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018925choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018926#endif
18927
Skip Montanaro6dead952003-09-25 14:50:04 +000018928int
18929main ()
18930{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018931return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018932 ;
18933 return 0;
18934}
18935_ACEOF
18936rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018937if { (ac_try="$ac_link"
18938case "(($ac_try" in
18939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18940 *) ac_try_echo=$ac_try;;
18941esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018943 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018944 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018945 grep -v '^ *+' conftest.er1 >conftest.err
18946 rm -f conftest.er1
18947 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018949 (exit $ac_status); } && {
18950 test -z "$ac_c_werror_flag" ||
18951 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018952 } && test -s conftest$ac_exeext &&
18953 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018954 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018955else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018956 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018957sed 's/^/| /' conftest.$ac_ext >&5
18958
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018959 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018961
18962rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018963 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018964fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018965ac_res=`eval echo '${'$as_ac_var'}'`
18966 { echo "$as_me:$LINENO: result: $ac_res" >&5
18967echo "${ECHO_T}$ac_res" >&6; }
18968if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018969 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018970#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018971_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018972
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018973else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018974 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18975echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018976if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018977 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018978else
Martin v. Löwis11437992002-04-12 09:54:03 +000018979 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018980LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018981cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018982/* confdefs.h. */
18983_ACEOF
18984cat confdefs.h >>conftest.$ac_ext
18985cat >>conftest.$ac_ext <<_ACEOF
18986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018987
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018988/* Override any GCC internal prototype to avoid an error.
18989 Use char because int might match the return type of a GCC
18990 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018991#ifdef __cplusplus
18992extern "C"
18993#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018994char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018995int
18996main ()
18997{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018998return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018999 ;
19000 return 0;
19001}
19002_ACEOF
19003rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019004if { (ac_try="$ac_link"
19005case "(($ac_try" in
19006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19007 *) ac_try_echo=$ac_try;;
19008esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019010 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019012 grep -v '^ *+' conftest.er1 >conftest.err
19013 rm -f conftest.er1
19014 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019016 (exit $ac_status); } && {
19017 test -z "$ac_c_werror_flag" ||
19018 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019019 } && test -s conftest$ac_exeext &&
19020 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019021 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019022else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019023 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019024sed 's/^/| /' conftest.$ac_ext >&5
19025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019026 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019028
19029rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019030 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019031LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019032fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019033{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19034echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19035if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019036 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019037#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019038_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019039 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019040else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019041 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19042echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019043if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019044 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019045else
19046 ac_check_lib_save_LIBS=$LIBS
19047LIBS="-lbsd $LIBS"
19048cat >conftest.$ac_ext <<_ACEOF
19049/* confdefs.h. */
19050_ACEOF
19051cat confdefs.h >>conftest.$ac_ext
19052cat >>conftest.$ac_ext <<_ACEOF
19053/* end confdefs.h. */
19054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019055/* Override any GCC internal prototype to avoid an error.
19056 Use char because int might match the return type of a GCC
19057 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019058#ifdef __cplusplus
19059extern "C"
19060#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019061char openpty ();
19062int
19063main ()
19064{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019065return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019066 ;
19067 return 0;
19068}
19069_ACEOF
19070rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019071if { (ac_try="$ac_link"
19072case "(($ac_try" in
19073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19074 *) ac_try_echo=$ac_try;;
19075esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019077 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019078 ac_status=$?
19079 grep -v '^ *+' conftest.er1 >conftest.err
19080 rm -f conftest.er1
19081 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019083 (exit $ac_status); } && {
19084 test -z "$ac_c_werror_flag" ||
19085 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019086 } && test -s conftest$ac_exeext &&
19087 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019088 ac_cv_lib_bsd_openpty=yes
19089else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019090 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019091sed 's/^/| /' conftest.$ac_ext >&5
19092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019093 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019095
19096rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019097 conftest$ac_exeext conftest.$ac_ext
19098LIBS=$ac_check_lib_save_LIBS
19099fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019100{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19101echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19102if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019103 cat >>confdefs.h <<\_ACEOF
19104#define HAVE_OPENPTY 1
19105_ACEOF
19106 LIBS="$LIBS -lbsd"
19107fi
19108
19109
19110fi
19111
Fred Drake8cef4cf2000-06-28 16:40:38 +000019112
19113fi
19114done
19115
Martin v. Löwis11437992002-04-12 09:54:03 +000019116
Fred Drake8cef4cf2000-06-28 16:40:38 +000019117for ac_func in forkpty
19118do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019119as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19120{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19121echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019122if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019123 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019124else
Martin v. Löwis11437992002-04-12 09:54:03 +000019125 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019126/* confdefs.h. */
19127_ACEOF
19128cat confdefs.h >>conftest.$ac_ext
19129cat >>conftest.$ac_ext <<_ACEOF
19130/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019131/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19132 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19133#define $ac_func innocuous_$ac_func
19134
Fred Drake8cef4cf2000-06-28 16:40:38 +000019135/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019136 which can conflict with char $ac_func (); below.
19137 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019138 <limits.h> exists even on freestanding compilers. */
19139
19140#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019141# include <limits.h>
19142#else
19143# include <assert.h>
19144#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019145
19146#undef $ac_func
19147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019148/* Override any GCC internal prototype to avoid an error.
19149 Use char because int might match the return type of a GCC
19150 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019151#ifdef __cplusplus
19152extern "C"
19153#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019154char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019155/* The GNU C library defines this for functions which it implements
19156 to always fail with ENOSYS. Some functions are actually named
19157 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019158#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019159choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019160#endif
19161
Skip Montanaro6dead952003-09-25 14:50:04 +000019162int
19163main ()
19164{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019165return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019166 ;
19167 return 0;
19168}
19169_ACEOF
19170rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019171if { (ac_try="$ac_link"
19172case "(($ac_try" in
19173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19174 *) ac_try_echo=$ac_try;;
19175esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019177 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019178 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019179 grep -v '^ *+' conftest.er1 >conftest.err
19180 rm -f conftest.er1
19181 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019183 (exit $ac_status); } && {
19184 test -z "$ac_c_werror_flag" ||
19185 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019186 } && test -s conftest$ac_exeext &&
19187 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019188 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019189else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019190 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019191sed 's/^/| /' conftest.$ac_ext >&5
19192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019193 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019195
19196rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019197 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019198fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019199ac_res=`eval echo '${'$as_ac_var'}'`
19200 { echo "$as_me:$LINENO: result: $ac_res" >&5
19201echo "${ECHO_T}$ac_res" >&6; }
19202if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019203 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019204#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019205_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019206
Fred Drake8cef4cf2000-06-28 16:40:38 +000019207else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019208 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19209echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019210if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019211 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019212else
Martin v. Löwis11437992002-04-12 09:54:03 +000019213 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019214LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019215cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019216/* confdefs.h. */
19217_ACEOF
19218cat confdefs.h >>conftest.$ac_ext
19219cat >>conftest.$ac_ext <<_ACEOF
19220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019221
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019222/* Override any GCC internal prototype to avoid an error.
19223 Use char because int might match the return type of a GCC
19224 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019225#ifdef __cplusplus
19226extern "C"
19227#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019228char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019229int
19230main ()
19231{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019232return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019233 ;
19234 return 0;
19235}
19236_ACEOF
19237rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019238if { (ac_try="$ac_link"
19239case "(($ac_try" in
19240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19241 *) ac_try_echo=$ac_try;;
19242esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019244 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019245 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019246 grep -v '^ *+' conftest.er1 >conftest.err
19247 rm -f conftest.er1
19248 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019250 (exit $ac_status); } && {
19251 test -z "$ac_c_werror_flag" ||
19252 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019253 } && test -s conftest$ac_exeext &&
19254 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019255 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019256else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019258sed 's/^/| /' conftest.$ac_ext >&5
19259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019260 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019261fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019262
19263rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019264 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019265LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019266fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019267{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19268echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19269if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019270 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019271#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019272_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019273 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019274else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019275 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19276echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019277if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019278 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019279else
19280 ac_check_lib_save_LIBS=$LIBS
19281LIBS="-lbsd $LIBS"
19282cat >conftest.$ac_ext <<_ACEOF
19283/* confdefs.h. */
19284_ACEOF
19285cat confdefs.h >>conftest.$ac_ext
19286cat >>conftest.$ac_ext <<_ACEOF
19287/* end confdefs.h. */
19288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019289/* Override any GCC internal prototype to avoid an error.
19290 Use char because int might match the return type of a GCC
19291 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019292#ifdef __cplusplus
19293extern "C"
19294#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019295char forkpty ();
19296int
19297main ()
19298{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019299return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019300 ;
19301 return 0;
19302}
19303_ACEOF
19304rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019305if { (ac_try="$ac_link"
19306case "(($ac_try" in
19307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19308 *) ac_try_echo=$ac_try;;
19309esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019311 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019312 ac_status=$?
19313 grep -v '^ *+' conftest.er1 >conftest.err
19314 rm -f conftest.er1
19315 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019317 (exit $ac_status); } && {
19318 test -z "$ac_c_werror_flag" ||
19319 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019320 } && test -s conftest$ac_exeext &&
19321 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019322 ac_cv_lib_bsd_forkpty=yes
19323else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019324 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019325sed 's/^/| /' conftest.$ac_ext >&5
19326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019327 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019329
19330rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019331 conftest$ac_exeext conftest.$ac_ext
19332LIBS=$ac_check_lib_save_LIBS
19333fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019334{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19335echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19336if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019337 cat >>confdefs.h <<\_ACEOF
19338#define HAVE_FORKPTY 1
19339_ACEOF
19340 LIBS="$LIBS -lbsd"
19341fi
19342
19343
19344fi
19345
Fred Drake8cef4cf2000-06-28 16:40:38 +000019346
19347fi
19348done
19349
Jack Jansendd19cf82001-12-06 22:36:17 +000019350
Christian Heimesb186d002008-03-18 15:15:01 +000019351# Stuff for expat.
19352
19353for ac_func in memmove
19354do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019355as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19356{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19357echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019358if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019359 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019360else
19361 cat >conftest.$ac_ext <<_ACEOF
19362/* confdefs.h. */
19363_ACEOF
19364cat confdefs.h >>conftest.$ac_ext
19365cat >>conftest.$ac_ext <<_ACEOF
19366/* end confdefs.h. */
19367/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19368 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19369#define $ac_func innocuous_$ac_func
19370
19371/* System header to define __stub macros and hopefully few prototypes,
19372 which can conflict with char $ac_func (); below.
19373 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19374 <limits.h> exists even on freestanding compilers. */
19375
19376#ifdef __STDC__
19377# include <limits.h>
19378#else
19379# include <assert.h>
19380#endif
19381
19382#undef $ac_func
19383
19384/* Override any GCC internal prototype to avoid an error.
19385 Use char because int might match the return type of a GCC
19386 builtin and then its argument prototype would still apply. */
19387#ifdef __cplusplus
19388extern "C"
19389#endif
19390char $ac_func ();
19391/* The GNU C library defines this for functions which it implements
19392 to always fail with ENOSYS. Some functions are actually named
19393 something starting with __ and the normal name is an alias. */
19394#if defined __stub_$ac_func || defined __stub___$ac_func
19395choke me
19396#endif
19397
19398int
19399main ()
19400{
19401return $ac_func ();
19402 ;
19403 return 0;
19404}
19405_ACEOF
19406rm -f conftest.$ac_objext conftest$ac_exeext
19407if { (ac_try="$ac_link"
19408case "(($ac_try" in
19409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19410 *) ac_try_echo=$ac_try;;
19411esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019413 (eval "$ac_link") 2>conftest.er1
19414 ac_status=$?
19415 grep -v '^ *+' conftest.er1 >conftest.err
19416 rm -f conftest.er1
19417 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019419 (exit $ac_status); } && {
19420 test -z "$ac_c_werror_flag" ||
19421 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019422 } && test -s conftest$ac_exeext &&
19423 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019424 eval "$as_ac_var=yes"
19425else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019426 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019427sed 's/^/| /' conftest.$ac_ext >&5
19428
19429 eval "$as_ac_var=no"
19430fi
19431
19432rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19433 conftest$ac_exeext conftest.$ac_ext
19434fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019435ac_res=`eval echo '${'$as_ac_var'}'`
19436 { echo "$as_me:$LINENO: result: $ac_res" >&5
19437echo "${ECHO_T}$ac_res" >&6; }
19438if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019439 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019440#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019441_ACEOF
19442
19443fi
19444done
19445
19446
Michael W. Hudson54241132001-12-07 15:38:26 +000019447# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019448
19449
19450
19451
19452
19453
Fred Drake8cef4cf2000-06-28 16:40:38 +000019454for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19455do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019456as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19457{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19458echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019459if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019460 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019461else
Martin v. Löwis11437992002-04-12 09:54:03 +000019462 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019463/* confdefs.h. */
19464_ACEOF
19465cat confdefs.h >>conftest.$ac_ext
19466cat >>conftest.$ac_ext <<_ACEOF
19467/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019468/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19469 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19470#define $ac_func innocuous_$ac_func
19471
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019472/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019473 which can conflict with char $ac_func (); below.
19474 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019475 <limits.h> exists even on freestanding compilers. */
19476
19477#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019478# include <limits.h>
19479#else
19480# include <assert.h>
19481#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019482
19483#undef $ac_func
19484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019485/* Override any GCC internal prototype to avoid an error.
19486 Use char because int might match the return type of a GCC
19487 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019488#ifdef __cplusplus
19489extern "C"
19490#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019491char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019492/* The GNU C library defines this for functions which it implements
19493 to always fail with ENOSYS. Some functions are actually named
19494 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019495#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019496choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019497#endif
19498
Skip Montanaro6dead952003-09-25 14:50:04 +000019499int
19500main ()
19501{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019502return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019503 ;
19504 return 0;
19505}
19506_ACEOF
19507rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019508if { (ac_try="$ac_link"
19509case "(($ac_try" in
19510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19511 *) ac_try_echo=$ac_try;;
19512esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019514 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019515 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019516 grep -v '^ *+' conftest.er1 >conftest.err
19517 rm -f conftest.er1
19518 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019520 (exit $ac_status); } && {
19521 test -z "$ac_c_werror_flag" ||
19522 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019523 } && test -s conftest$ac_exeext &&
19524 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019525 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019526else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019527 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019528sed 's/^/| /' conftest.$ac_ext >&5
19529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019530 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019532
19533rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019534 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019535fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019536ac_res=`eval echo '${'$as_ac_var'}'`
19537 { echo "$as_me:$LINENO: result: $ac_res" >&5
19538echo "${ECHO_T}$ac_res" >&6; }
19539if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019540 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019541#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019542_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019543
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019544fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019545done
19546
Michael W. Hudson54241132001-12-07 15:38:26 +000019547
Martin v. Löwis11437992002-04-12 09:54:03 +000019548
19549
19550
Christian Heimesb186d002008-03-18 15:15:01 +000019551for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019552do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019553as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19554{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19555echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019556if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019557 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019558else
Martin v. Löwis11437992002-04-12 09:54:03 +000019559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019560/* confdefs.h. */
19561_ACEOF
19562cat confdefs.h >>conftest.$ac_ext
19563cat >>conftest.$ac_ext <<_ACEOF
19564/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019565/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19566 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19567#define $ac_func innocuous_$ac_func
19568
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019569/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019570 which can conflict with char $ac_func (); below.
19571 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019572 <limits.h> exists even on freestanding compilers. */
19573
19574#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019575# include <limits.h>
19576#else
19577# include <assert.h>
19578#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019579
19580#undef $ac_func
19581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019582/* Override any GCC internal prototype to avoid an error.
19583 Use char because int might match the return type of a GCC
19584 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019585#ifdef __cplusplus
19586extern "C"
19587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019588char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019589/* The GNU C library defines this for functions which it implements
19590 to always fail with ENOSYS. Some functions are actually named
19591 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019592#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019593choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019594#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019595
Skip Montanaro6dead952003-09-25 14:50:04 +000019596int
19597main ()
19598{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019599return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019600 ;
19601 return 0;
19602}
19603_ACEOF
19604rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019605if { (ac_try="$ac_link"
19606case "(($ac_try" in
19607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19608 *) ac_try_echo=$ac_try;;
19609esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019611 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019613 grep -v '^ *+' conftest.er1 >conftest.err
19614 rm -f conftest.er1
19615 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019617 (exit $ac_status); } && {
19618 test -z "$ac_c_werror_flag" ||
19619 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019620 } && test -s conftest$ac_exeext &&
19621 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019622 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019623else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019625sed 's/^/| /' conftest.$ac_ext >&5
19626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019627 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019629
19630rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019631 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019632fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019633ac_res=`eval echo '${'$as_ac_var'}'`
19634 { echo "$as_me:$LINENO: result: $ac_res" >&5
19635echo "${ECHO_T}$ac_res" >&6; }
19636if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019637 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019638#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019639_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019640
Martin v. Löwis1142de32002-03-29 16:28:31 +000019641else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019642 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019643 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019644 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19645 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019646esac
19647
Martin v. Löwis1142de32002-03-29 16:28:31 +000019648fi
19649done
19650
19651
Martin v. Löwis11437992002-04-12 09:54:03 +000019652
Martin v. Löwis1142de32002-03-29 16:28:31 +000019653for ac_func in getpgrp
19654do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019655as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19656{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19657echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019658if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019659 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019660else
Martin v. Löwis11437992002-04-12 09:54:03 +000019661 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019662/* confdefs.h. */
19663_ACEOF
19664cat confdefs.h >>conftest.$ac_ext
19665cat >>conftest.$ac_ext <<_ACEOF
19666/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019667/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19668 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19669#define $ac_func innocuous_$ac_func
19670
Martin v. Löwis1142de32002-03-29 16:28:31 +000019671/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019672 which can conflict with char $ac_func (); below.
19673 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019674 <limits.h> exists even on freestanding compilers. */
19675
19676#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019677# include <limits.h>
19678#else
19679# include <assert.h>
19680#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019681
19682#undef $ac_func
19683
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019684/* Override any GCC internal prototype to avoid an error.
19685 Use char because int might match the return type of a GCC
19686 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019687#ifdef __cplusplus
19688extern "C"
19689#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019690char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019691/* The GNU C library defines this for functions which it implements
19692 to always fail with ENOSYS. Some functions are actually named
19693 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019694#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019695choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019696#endif
19697
Skip Montanaro6dead952003-09-25 14:50:04 +000019698int
19699main ()
19700{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019701return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019702 ;
19703 return 0;
19704}
19705_ACEOF
19706rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019707if { (ac_try="$ac_link"
19708case "(($ac_try" in
19709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19710 *) ac_try_echo=$ac_try;;
19711esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019713 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019715 grep -v '^ *+' conftest.er1 >conftest.err
19716 rm -f conftest.er1
19717 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019719 (exit $ac_status); } && {
19720 test -z "$ac_c_werror_flag" ||
19721 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019722 } && test -s conftest$ac_exeext &&
19723 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019724 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019725else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019727sed 's/^/| /' conftest.$ac_ext >&5
19728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019729 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019731
19732rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019733 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019734fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019735ac_res=`eval echo '${'$as_ac_var'}'`
19736 { echo "$as_me:$LINENO: result: $ac_res" >&5
19737echo "${ECHO_T}$ac_res" >&6; }
19738if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019739 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019740#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019741_ACEOF
19742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019743/* confdefs.h. */
19744_ACEOF
19745cat confdefs.h >>conftest.$ac_ext
19746cat >>conftest.$ac_ext <<_ACEOF
19747/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019748#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019749int
19750main ()
19751{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019752getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019753 ;
19754 return 0;
19755}
19756_ACEOF
19757rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019758if { (ac_try="$ac_compile"
19759case "(($ac_try" in
19760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19761 *) ac_try_echo=$ac_try;;
19762esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019766 grep -v '^ *+' conftest.er1 >conftest.err
19767 rm -f conftest.er1
19768 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019770 (exit $ac_status); } && {
19771 test -z "$ac_c_werror_flag" ||
19772 test ! -s conftest.err
19773 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019774
19775cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019776#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019777_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019778
Martin v. Löwis11437992002-04-12 09:54:03 +000019779
Guido van Rossumf78abae1997-01-21 22:02:36 +000019780else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019782sed 's/^/| /' conftest.$ac_ext >&5
19783
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019784
Guido van Rossum627b2d71993-12-24 10:39:16 +000019785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019786
19787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019788
Guido van Rossum627b2d71993-12-24 10:39:16 +000019789fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019790done
Guido van Rossum627b2d71993-12-24 10:39:16 +000019791
Jack Jansen150753c2003-03-29 22:07:47 +000019792
19793for ac_func in setpgrp
19794do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019795as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19796{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19797echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019798if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019799 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019800else
Martin v. Löwis11437992002-04-12 09:54:03 +000019801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019802/* confdefs.h. */
19803_ACEOF
19804cat confdefs.h >>conftest.$ac_ext
19805cat >>conftest.$ac_ext <<_ACEOF
19806/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019807/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19808 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19809#define $ac_func innocuous_$ac_func
19810
Jack Jansen150753c2003-03-29 22:07:47 +000019811/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019812 which can conflict with char $ac_func (); below.
19813 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019814 <limits.h> exists even on freestanding compilers. */
19815
19816#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019817# include <limits.h>
19818#else
19819# include <assert.h>
19820#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019821
19822#undef $ac_func
19823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019824/* Override any GCC internal prototype to avoid an error.
19825 Use char because int might match the return type of a GCC
19826 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000019827#ifdef __cplusplus
19828extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000019829#endif
Jack Jansen150753c2003-03-29 22:07:47 +000019830char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000019831/* The GNU C library defines this for functions which it implements
19832 to always fail with ENOSYS. Some functions are actually named
19833 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019834#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000019835choke me
Jack Jansen150753c2003-03-29 22:07:47 +000019836#endif
19837
Skip Montanaro6dead952003-09-25 14:50:04 +000019838int
19839main ()
19840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019841return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019842 ;
19843 return 0;
19844}
19845_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019846rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019847if { (ac_try="$ac_link"
19848case "(($ac_try" in
19849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19850 *) ac_try_echo=$ac_try;;
19851esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019853 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019855 grep -v '^ *+' conftest.er1 >conftest.err
19856 rm -f conftest.er1
19857 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019859 (exit $ac_status); } && {
19860 test -z "$ac_c_werror_flag" ||
19861 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019862 } && test -s conftest$ac_exeext &&
19863 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000019864 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019865else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019867sed 's/^/| /' conftest.$ac_ext >&5
19868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019869 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019871
19872rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019873 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019874fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019875ac_res=`eval echo '${'$as_ac_var'}'`
19876 { echo "$as_me:$LINENO: result: $ac_res" >&5
19877echo "${ECHO_T}$ac_res" >&6; }
19878if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000019879 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019880#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000019881_ACEOF
19882 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019883/* confdefs.h. */
19884_ACEOF
19885cat confdefs.h >>conftest.$ac_ext
19886cat >>conftest.$ac_ext <<_ACEOF
19887/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019888#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019889int
19890main ()
19891{
19892setpgrp(0,0);
19893 ;
19894 return 0;
19895}
19896_ACEOF
19897rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019898if { (ac_try="$ac_compile"
19899case "(($ac_try" in
19900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19901 *) ac_try_echo=$ac_try;;
19902esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019904 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019905 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019906 grep -v '^ *+' conftest.er1 >conftest.err
19907 rm -f conftest.er1
19908 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019910 (exit $ac_status); } && {
19911 test -z "$ac_c_werror_flag" ||
19912 test ! -s conftest.err
19913 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019914
19915cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019916#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019917_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019918
Jack Jansen150753c2003-03-29 22:07:47 +000019919
19920else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019922sed 's/^/| /' conftest.$ac_ext >&5
19923
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019924
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019926
19927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019928
19929fi
19930done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019931
Martin v. Löwis11437992002-04-12 09:54:03 +000019932
Thomas Wouters3a584202000-08-05 23:28:51 +000019933for ac_func in gettimeofday
19934do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019935as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19936{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19937echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019938if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019939 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019940else
Martin v. Löwis11437992002-04-12 09:54:03 +000019941 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019942/* confdefs.h. */
19943_ACEOF
19944cat confdefs.h >>conftest.$ac_ext
19945cat >>conftest.$ac_ext <<_ACEOF
19946/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019947/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19948 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19949#define $ac_func innocuous_$ac_func
19950
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019951/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019952 which can conflict with char $ac_func (); below.
19953 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019954 <limits.h> exists even on freestanding compilers. */
19955
19956#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019957# include <limits.h>
19958#else
19959# include <assert.h>
19960#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019961
19962#undef $ac_func
19963
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019964/* Override any GCC internal prototype to avoid an error.
19965 Use char because int might match the return type of a GCC
19966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019967#ifdef __cplusplus
19968extern "C"
19969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019970char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019971/* The GNU C library defines this for functions which it implements
19972 to always fail with ENOSYS. Some functions are actually named
19973 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019974#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019975choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019976#endif
19977
Skip Montanaro6dead952003-09-25 14:50:04 +000019978int
19979main ()
19980{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019981return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019982 ;
19983 return 0;
19984}
19985_ACEOF
19986rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019987if { (ac_try="$ac_link"
19988case "(($ac_try" in
19989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19990 *) ac_try_echo=$ac_try;;
19991esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019993 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019995 grep -v '^ *+' conftest.er1 >conftest.err
19996 rm -f conftest.er1
19997 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019999 (exit $ac_status); } && {
20000 test -z "$ac_c_werror_flag" ||
20001 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020002 } && test -s conftest$ac_exeext &&
20003 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020004 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020005else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020007sed 's/^/| /' conftest.$ac_ext >&5
20008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020009 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020011
20012rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020013 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020014fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020015ac_res=`eval echo '${'$as_ac_var'}'`
20016 { echo "$as_me:$LINENO: result: $ac_res" >&5
20017echo "${ECHO_T}$ac_res" >&6; }
20018if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020019 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020020#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020021_ACEOF
20022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020023/* confdefs.h. */
20024_ACEOF
20025cat confdefs.h >>conftest.$ac_ext
20026cat >>conftest.$ac_ext <<_ACEOF
20027/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020028#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020029int
20030main ()
20031{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020032gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020033 ;
20034 return 0;
20035}
20036_ACEOF
20037rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020038if { (ac_try="$ac_compile"
20039case "(($ac_try" in
20040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20041 *) ac_try_echo=$ac_try;;
20042esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020044 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020045 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020046 grep -v '^ *+' conftest.er1 >conftest.err
20047 rm -f conftest.er1
20048 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020050 (exit $ac_status); } && {
20051 test -z "$ac_c_werror_flag" ||
20052 test ! -s conftest.err
20053 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020054 :
20055else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020056 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020057sed 's/^/| /' conftest.$ac_ext >&5
20058
Martin v. Löwis11437992002-04-12 09:54:03 +000020059
20060cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020061#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020062_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020063
Martin v. Löwis11437992002-04-12 09:54:03 +000020064
Guido van Rossum627b2d71993-12-24 10:39:16 +000020065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020066
20067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020068
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020069fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020070done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020071
Michael W. Hudson54241132001-12-07 15:38:26 +000020072
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020073{ echo "$as_me:$LINENO: checking for major" >&5
20074echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020075cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020076/* confdefs.h. */
20077_ACEOF
20078cat confdefs.h >>conftest.$ac_ext
20079cat >>conftest.$ac_ext <<_ACEOF
20080/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020081
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020082#if defined(MAJOR_IN_MKDEV)
20083#include <sys/mkdev.h>
20084#elif defined(MAJOR_IN_SYSMACROS)
20085#include <sys/sysmacros.h>
20086#else
20087#include <sys/types.h>
20088#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020089
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020090int
20091main ()
20092{
20093
20094 makedev(major(0),minor(0));
20095
20096 ;
20097 return 0;
20098}
20099_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020100rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020101if { (ac_try="$ac_link"
20102case "(($ac_try" in
20103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20104 *) ac_try_echo=$ac_try;;
20105esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020107 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020109 grep -v '^ *+' conftest.er1 >conftest.err
20110 rm -f conftest.er1
20111 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020113 (exit $ac_status); } && {
20114 test -z "$ac_c_werror_flag" ||
20115 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020116 } && test -s conftest$ac_exeext &&
20117 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020118
20119
20120cat >>confdefs.h <<\_ACEOF
20121#define HAVE_DEVICE_MACROS 1
20122_ACEOF
20123
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020124 { echo "$as_me:$LINENO: result: yes" >&5
20125echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020126
20127else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020128 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020129sed 's/^/| /' conftest.$ac_ext >&5
20130
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020131
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020132 { echo "$as_me:$LINENO: result: no" >&5
20133echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020134
20135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020136
20137rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020138 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020139
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020140# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020141# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020142{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20143echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020144cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020145/* confdefs.h. */
20146_ACEOF
20147cat confdefs.h >>conftest.$ac_ext
20148cat >>conftest.$ac_ext <<_ACEOF
20149/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020150
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020151#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020152#include <sys/socket.h>
20153#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020154#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020155
Martin v. Löwis11437992002-04-12 09:54:03 +000020156int
20157main ()
20158{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020159getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020160 ;
20161 return 0;
20162}
20163_ACEOF
20164rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020165if { (ac_try="$ac_link"
20166case "(($ac_try" in
20167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20168 *) ac_try_echo=$ac_try;;
20169esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020171 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020172 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020173 grep -v '^ *+' conftest.er1 >conftest.err
20174 rm -f conftest.er1
20175 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020177 (exit $ac_status); } && {
20178 test -z "$ac_c_werror_flag" ||
20179 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020180 } && test -s conftest$ac_exeext &&
20181 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020182 have_getaddrinfo=yes
20183else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020184 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020185sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020186
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020187 have_getaddrinfo=no
20188fi
20189
20190rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20191 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020192{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20193echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020194if test $have_getaddrinfo = yes
20195then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020196 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20197echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020198 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020199 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020200else
20201 if test "$cross_compiling" = yes; then
20202 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020203else
Martin v. Löwis11437992002-04-12 09:54:03 +000020204 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020205/* confdefs.h. */
20206_ACEOF
20207cat confdefs.h >>conftest.$ac_ext
20208cat >>conftest.$ac_ext <<_ACEOF
20209/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020210
20211#include <sys/types.h>
20212#include <netdb.h>
20213#include <string.h>
20214#include <sys/socket.h>
20215#include <netinet/in.h>
20216
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020217int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020218{
20219 int passive, gaierr, inet4 = 0, inet6 = 0;
20220 struct addrinfo hints, *ai, *aitop;
20221 char straddr[INET6_ADDRSTRLEN], strport[16];
20222
20223 for (passive = 0; passive <= 1; passive++) {
20224 memset(&hints, 0, sizeof(hints));
20225 hints.ai_family = AF_UNSPEC;
20226 hints.ai_flags = passive ? AI_PASSIVE : 0;
20227 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020228 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020229 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20230 (void)gai_strerror(gaierr);
20231 goto bad;
20232 }
20233 for (ai = aitop; ai; ai = ai->ai_next) {
20234 if (ai->ai_addr == NULL ||
20235 ai->ai_addrlen == 0 ||
20236 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20237 straddr, sizeof(straddr), strport, sizeof(strport),
20238 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20239 goto bad;
20240 }
20241 switch (ai->ai_family) {
20242 case AF_INET:
20243 if (strcmp(strport, "54321") != 0) {
20244 goto bad;
20245 }
20246 if (passive) {
20247 if (strcmp(straddr, "0.0.0.0") != 0) {
20248 goto bad;
20249 }
20250 } else {
20251 if (strcmp(straddr, "127.0.0.1") != 0) {
20252 goto bad;
20253 }
20254 }
20255 inet4++;
20256 break;
20257 case AF_INET6:
20258 if (strcmp(strport, "54321") != 0) {
20259 goto bad;
20260 }
20261 if (passive) {
20262 if (strcmp(straddr, "::") != 0) {
20263 goto bad;
20264 }
20265 } else {
20266 if (strcmp(straddr, "::1") != 0) {
20267 goto bad;
20268 }
20269 }
20270 inet6++;
20271 break;
20272 case AF_UNSPEC:
20273 goto bad;
20274 break;
20275 default:
20276 /* another family support? */
20277 break;
20278 }
20279 }
20280 }
20281
20282 if (!(inet4 == 0 || inet4 == 2))
20283 goto bad;
20284 if (!(inet6 == 0 || inet6 == 2))
20285 goto bad;
20286
20287 if (aitop)
20288 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020289 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020290
20291 bad:
20292 if (aitop)
20293 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020294 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020295}
20296
Martin v. Löwis11437992002-04-12 09:54:03 +000020297_ACEOF
20298rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020299if { (ac_try="$ac_link"
20300case "(($ac_try" in
20301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20302 *) ac_try_echo=$ac_try;;
20303esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020305 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020306 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020308 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020309 { (case "(($ac_try" in
20310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20311 *) ac_try_echo=$ac_try;;
20312esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020314 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020315 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020317 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020318 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020319else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020320 echo "$as_me: program exited with status $ac_status" >&5
20321echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020322sed 's/^/| /' conftest.$ac_ext >&5
20323
Martin v. Löwis11437992002-04-12 09:54:03 +000020324( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020325ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020327rm -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 +000020328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020329
20330
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020331fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020332
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020334
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020335if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20336then
20337 if test $ipv6 = yes
20338 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020339 echo 'Fatal: You must get working getaddrinfo() function.'
20340 echo ' or you can specify "--disable-ipv6"'.
20341 exit 1
20342 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020343else
Martin v. Löwis11437992002-04-12 09:54:03 +000020344
20345cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020346#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020347_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020348
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020349fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020350
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020351for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020352do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020353as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20354{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20355echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020356if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020357 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020358else
Martin v. Löwis11437992002-04-12 09:54:03 +000020359 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020360/* confdefs.h. */
20361_ACEOF
20362cat confdefs.h >>conftest.$ac_ext
20363cat >>conftest.$ac_ext <<_ACEOF
20364/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020365/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20366 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20367#define $ac_func innocuous_$ac_func
20368
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020369/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020370 which can conflict with char $ac_func (); below.
20371 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020372 <limits.h> exists even on freestanding compilers. */
20373
20374#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020375# include <limits.h>
20376#else
20377# include <assert.h>
20378#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020379
20380#undef $ac_func
20381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020382/* Override any GCC internal prototype to avoid an error.
20383 Use char because int might match the return type of a GCC
20384 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020385#ifdef __cplusplus
20386extern "C"
20387#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020388char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020389/* The GNU C library defines this for functions which it implements
20390 to always fail with ENOSYS. Some functions are actually named
20391 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020392#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020393choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020394#endif
20395
Skip Montanaro6dead952003-09-25 14:50:04 +000020396int
20397main ()
20398{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020399return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020400 ;
20401 return 0;
20402}
20403_ACEOF
20404rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020405if { (ac_try="$ac_link"
20406case "(($ac_try" in
20407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20408 *) ac_try_echo=$ac_try;;
20409esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020411 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020413 grep -v '^ *+' conftest.er1 >conftest.err
20414 rm -f conftest.er1
20415 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020417 (exit $ac_status); } && {
20418 test -z "$ac_c_werror_flag" ||
20419 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020420 } && test -s conftest$ac_exeext &&
20421 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020422 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020423else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020424 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020425sed 's/^/| /' conftest.$ac_ext >&5
20426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020427 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020429
20430rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020431 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020432fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020433ac_res=`eval echo '${'$as_ac_var'}'`
20434 { echo "$as_me:$LINENO: result: $ac_res" >&5
20435echo "${ECHO_T}$ac_res" >&6; }
20436if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020437 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020438#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020439_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020440
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020441fi
20442done
20443
Michael W. Hudson54241132001-12-07 15:38:26 +000020444
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020445# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020446{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20447echo $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 +000020448if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020449 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020450else
Martin v. Löwis11437992002-04-12 09:54:03 +000020451 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020452/* confdefs.h. */
20453_ACEOF
20454cat confdefs.h >>conftest.$ac_ext
20455cat >>conftest.$ac_ext <<_ACEOF
20456/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020457#include <sys/types.h>
20458#include <sys/time.h>
20459#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020460
Martin v. Löwis11437992002-04-12 09:54:03 +000020461int
20462main ()
20463{
20464if ((struct tm *) 0)
20465return 0;
20466 ;
20467 return 0;
20468}
20469_ACEOF
20470rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020471if { (ac_try="$ac_compile"
20472case "(($ac_try" in
20473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20474 *) ac_try_echo=$ac_try;;
20475esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020477 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020478 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020479 grep -v '^ *+' conftest.er1 >conftest.err
20480 rm -f conftest.er1
20481 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020483 (exit $ac_status); } && {
20484 test -z "$ac_c_werror_flag" ||
20485 test ! -s conftest.err
20486 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020487 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020488else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020490sed 's/^/| /' conftest.$ac_ext >&5
20491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020492 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020494
20495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020496fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020497{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20498echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020499if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020500
20501cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020502#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020503_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020504
20505fi
20506
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020507{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20508echo $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 +000020509if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020510 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020511else
Martin v. Löwis11437992002-04-12 09:54:03 +000020512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020513/* confdefs.h. */
20514_ACEOF
20515cat confdefs.h >>conftest.$ac_ext
20516cat >>conftest.$ac_ext <<_ACEOF
20517/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020518#include <sys/types.h>
20519#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020520
Martin v. Löwis11437992002-04-12 09:54:03 +000020521int
20522main ()
20523{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020524struct tm tm;
20525 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020526 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020527 ;
20528 return 0;
20529}
20530_ACEOF
20531rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020532if { (ac_try="$ac_compile"
20533case "(($ac_try" in
20534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20535 *) ac_try_echo=$ac_try;;
20536esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020538 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020539 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020540 grep -v '^ *+' conftest.er1 >conftest.err
20541 rm -f conftest.er1
20542 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020544 (exit $ac_status); } && {
20545 test -z "$ac_c_werror_flag" ||
20546 test ! -s conftest.err
20547 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020548 ac_cv_struct_tm=time.h
20549else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020551sed 's/^/| /' conftest.$ac_ext >&5
20552
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020553 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020555
20556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020557fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020558{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20559echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020560if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020561
20562cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020563#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020564_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020565
20566fi
20567
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020568{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20569echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020570if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020571 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020572else
Martin v. Löwis11437992002-04-12 09:54:03 +000020573 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020574/* confdefs.h. */
20575_ACEOF
20576cat confdefs.h >>conftest.$ac_ext
20577cat >>conftest.$ac_ext <<_ACEOF
20578/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020579#include <sys/types.h>
20580#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020581
20582
Martin v. Löwis11437992002-04-12 09:54:03 +000020583int
20584main ()
20585{
20586static struct tm ac_aggr;
20587if (ac_aggr.tm_zone)
20588return 0;
20589 ;
20590 return 0;
20591}
20592_ACEOF
20593rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020594if { (ac_try="$ac_compile"
20595case "(($ac_try" in
20596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20597 *) ac_try_echo=$ac_try;;
20598esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020600 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020602 grep -v '^ *+' conftest.er1 >conftest.err
20603 rm -f conftest.er1
20604 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020606 (exit $ac_status); } && {
20607 test -z "$ac_c_werror_flag" ||
20608 test ! -s conftest.err
20609 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020610 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020611else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020613sed 's/^/| /' conftest.$ac_ext >&5
20614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020615 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020616/* confdefs.h. */
20617_ACEOF
20618cat confdefs.h >>conftest.$ac_ext
20619cat >>conftest.$ac_ext <<_ACEOF
20620/* end confdefs.h. */
20621#include <sys/types.h>
20622#include <$ac_cv_struct_tm>
20623
20624
20625int
20626main ()
20627{
20628static struct tm ac_aggr;
20629if (sizeof ac_aggr.tm_zone)
20630return 0;
20631 ;
20632 return 0;
20633}
20634_ACEOF
20635rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020636if { (ac_try="$ac_compile"
20637case "(($ac_try" in
20638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20639 *) ac_try_echo=$ac_try;;
20640esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020642 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020643 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020644 grep -v '^ *+' conftest.er1 >conftest.err
20645 rm -f conftest.er1
20646 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020648 (exit $ac_status); } && {
20649 test -z "$ac_c_werror_flag" ||
20650 test ! -s conftest.err
20651 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020652 ac_cv_member_struct_tm_tm_zone=yes
20653else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020655sed 's/^/| /' conftest.$ac_ext >&5
20656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020657 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020659
20660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020662
20663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020664fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020665{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20666echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
20667if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020668
20669cat >>confdefs.h <<_ACEOF
20670#define HAVE_STRUCT_TM_TM_ZONE 1
20671_ACEOF
20672
20673
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020674fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020675
Martin v. Löwis11437992002-04-12 09:54:03 +000020676if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20677
20678cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020679#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020680_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020681
20682else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020683 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20684echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020685if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020686 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020687else
20688 cat >conftest.$ac_ext <<_ACEOF
20689/* confdefs.h. */
20690_ACEOF
20691cat confdefs.h >>conftest.$ac_ext
20692cat >>conftest.$ac_ext <<_ACEOF
20693/* end confdefs.h. */
20694#include <time.h>
20695
20696int
20697main ()
20698{
20699#ifndef tzname
20700 (void) tzname;
20701#endif
20702
20703 ;
20704 return 0;
20705}
20706_ACEOF
20707rm -f conftest.$ac_objext
20708if { (ac_try="$ac_compile"
20709case "(($ac_try" in
20710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20711 *) ac_try_echo=$ac_try;;
20712esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020714 (eval "$ac_compile") 2>conftest.er1
20715 ac_status=$?
20716 grep -v '^ *+' conftest.er1 >conftest.err
20717 rm -f conftest.er1
20718 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020720 (exit $ac_status); } && {
20721 test -z "$ac_c_werror_flag" ||
20722 test ! -s conftest.err
20723 } && test -s conftest.$ac_objext; then
20724 ac_cv_have_decl_tzname=yes
20725else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020726 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020727sed 's/^/| /' conftest.$ac_ext >&5
20728
20729 ac_cv_have_decl_tzname=no
20730fi
20731
20732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20733fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020734{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20735echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
20736if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020737
20738cat >>confdefs.h <<_ACEOF
20739#define HAVE_DECL_TZNAME 1
20740_ACEOF
20741
20742
20743else
20744 cat >>confdefs.h <<_ACEOF
20745#define HAVE_DECL_TZNAME 0
20746_ACEOF
20747
20748
20749fi
20750
20751
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020752 { echo "$as_me:$LINENO: checking for tzname" >&5
20753echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020754if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020755 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020756else
Martin v. Löwis11437992002-04-12 09:54:03 +000020757 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020758/* confdefs.h. */
20759_ACEOF
20760cat confdefs.h >>conftest.$ac_ext
20761cat >>conftest.$ac_ext <<_ACEOF
20762/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020763#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020764#if !HAVE_DECL_TZNAME
20765extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000020766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020767
Martin v. Löwis11437992002-04-12 09:54:03 +000020768int
20769main ()
20770{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020771return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000020772 ;
20773 return 0;
20774}
20775_ACEOF
20776rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020777if { (ac_try="$ac_link"
20778case "(($ac_try" in
20779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20780 *) ac_try_echo=$ac_try;;
20781esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020783 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020785 grep -v '^ *+' conftest.er1 >conftest.err
20786 rm -f conftest.er1
20787 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020789 (exit $ac_status); } && {
20790 test -z "$ac_c_werror_flag" ||
20791 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020792 } && test -s conftest$ac_exeext &&
20793 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020794 ac_cv_var_tzname=yes
20795else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020797sed 's/^/| /' conftest.$ac_ext >&5
20798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020799 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020801
20802rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020803 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000020804fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020805{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20806echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020807 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020808
20809cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020810#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020811_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020812
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020813 fi
20814fi
20815
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020816{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
20817echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020818if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020819 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020820else
20821 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020822/* confdefs.h. */
20823_ACEOF
20824cat confdefs.h >>conftest.$ac_ext
20825cat >>conftest.$ac_ext <<_ACEOF
20826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020827$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020828int
20829main ()
20830{
20831static struct stat ac_aggr;
20832if (ac_aggr.st_rdev)
20833return 0;
20834 ;
20835 return 0;
20836}
20837_ACEOF
20838rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020839if { (ac_try="$ac_compile"
20840case "(($ac_try" in
20841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20842 *) ac_try_echo=$ac_try;;
20843esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020845 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020847 grep -v '^ *+' conftest.er1 >conftest.err
20848 rm -f conftest.er1
20849 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020851 (exit $ac_status); } && {
20852 test -z "$ac_c_werror_flag" ||
20853 test ! -s conftest.err
20854 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020855 ac_cv_member_struct_stat_st_rdev=yes
20856else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020858sed 's/^/| /' conftest.$ac_ext >&5
20859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020861/* confdefs.h. */
20862_ACEOF
20863cat confdefs.h >>conftest.$ac_ext
20864cat >>conftest.$ac_ext <<_ACEOF
20865/* end confdefs.h. */
20866$ac_includes_default
20867int
20868main ()
20869{
20870static struct stat ac_aggr;
20871if (sizeof ac_aggr.st_rdev)
20872return 0;
20873 ;
20874 return 0;
20875}
20876_ACEOF
20877rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020878if { (ac_try="$ac_compile"
20879case "(($ac_try" in
20880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20881 *) ac_try_echo=$ac_try;;
20882esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020884 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020886 grep -v '^ *+' conftest.er1 >conftest.err
20887 rm -f conftest.er1
20888 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020890 (exit $ac_status); } && {
20891 test -z "$ac_c_werror_flag" ||
20892 test ! -s conftest.err
20893 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020894 ac_cv_member_struct_stat_st_rdev=yes
20895else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020897sed 's/^/| /' conftest.$ac_ext >&5
20898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020899 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020901
20902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020904
20905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020906fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020907{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20908echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20909if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020910
20911cat >>confdefs.h <<_ACEOF
20912#define HAVE_STRUCT_STAT_ST_RDEV 1
20913_ACEOF
20914
20915
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020916fi
20917
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020918{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20919echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020920if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020921 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020922else
Martin v. Löwis11437992002-04-12 09:54:03 +000020923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020924/* confdefs.h. */
20925_ACEOF
20926cat confdefs.h >>conftest.$ac_ext
20927cat >>conftest.$ac_ext <<_ACEOF
20928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020929$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020930int
20931main ()
20932{
20933static struct stat ac_aggr;
20934if (ac_aggr.st_blksize)
20935return 0;
20936 ;
20937 return 0;
20938}
20939_ACEOF
20940rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020941if { (ac_try="$ac_compile"
20942case "(($ac_try" in
20943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20944 *) ac_try_echo=$ac_try;;
20945esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020947 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020949 grep -v '^ *+' conftest.er1 >conftest.err
20950 rm -f conftest.er1
20951 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020953 (exit $ac_status); } && {
20954 test -z "$ac_c_werror_flag" ||
20955 test ! -s conftest.err
20956 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020957 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020958else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020960sed 's/^/| /' conftest.$ac_ext >&5
20961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020962 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020963/* confdefs.h. */
20964_ACEOF
20965cat confdefs.h >>conftest.$ac_ext
20966cat >>conftest.$ac_ext <<_ACEOF
20967/* end confdefs.h. */
20968$ac_includes_default
20969int
20970main ()
20971{
20972static struct stat ac_aggr;
20973if (sizeof ac_aggr.st_blksize)
20974return 0;
20975 ;
20976 return 0;
20977}
20978_ACEOF
20979rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020980if { (ac_try="$ac_compile"
20981case "(($ac_try" in
20982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20983 *) ac_try_echo=$ac_try;;
20984esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020986 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020987 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020988 grep -v '^ *+' conftest.er1 >conftest.err
20989 rm -f conftest.er1
20990 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020992 (exit $ac_status); } && {
20993 test -z "$ac_c_werror_flag" ||
20994 test ! -s conftest.err
20995 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020996 ac_cv_member_struct_stat_st_blksize=yes
20997else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020998 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020999sed 's/^/| /' conftest.$ac_ext >&5
21000
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021001 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021003
21004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021006
21007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021008fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021009{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21010echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21011if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021012
Martin v. Löwis11437992002-04-12 09:54:03 +000021013cat >>confdefs.h <<_ACEOF
21014#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21015_ACEOF
21016
21017
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021018fi
21019
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021020{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21021echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021022if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021023 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021024else
21025 cat >conftest.$ac_ext <<_ACEOF
21026/* confdefs.h. */
21027_ACEOF
21028cat confdefs.h >>conftest.$ac_ext
21029cat >>conftest.$ac_ext <<_ACEOF
21030/* end confdefs.h. */
21031$ac_includes_default
21032int
21033main ()
21034{
21035static struct stat ac_aggr;
21036if (ac_aggr.st_flags)
21037return 0;
21038 ;
21039 return 0;
21040}
21041_ACEOF
21042rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021043if { (ac_try="$ac_compile"
21044case "(($ac_try" in
21045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21046 *) ac_try_echo=$ac_try;;
21047esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021049 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021050 ac_status=$?
21051 grep -v '^ *+' conftest.er1 >conftest.err
21052 rm -f conftest.er1
21053 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021055 (exit $ac_status); } && {
21056 test -z "$ac_c_werror_flag" ||
21057 test ! -s conftest.err
21058 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021059 ac_cv_member_struct_stat_st_flags=yes
21060else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021061 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021062sed 's/^/| /' conftest.$ac_ext >&5
21063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021064 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021065/* confdefs.h. */
21066_ACEOF
21067cat confdefs.h >>conftest.$ac_ext
21068cat >>conftest.$ac_ext <<_ACEOF
21069/* end confdefs.h. */
21070$ac_includes_default
21071int
21072main ()
21073{
21074static struct stat ac_aggr;
21075if (sizeof ac_aggr.st_flags)
21076return 0;
21077 ;
21078 return 0;
21079}
21080_ACEOF
21081rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021082if { (ac_try="$ac_compile"
21083case "(($ac_try" in
21084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21085 *) ac_try_echo=$ac_try;;
21086esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021088 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021089 ac_status=$?
21090 grep -v '^ *+' conftest.er1 >conftest.err
21091 rm -f conftest.er1
21092 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021094 (exit $ac_status); } && {
21095 test -z "$ac_c_werror_flag" ||
21096 test ! -s conftest.err
21097 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021098 ac_cv_member_struct_stat_st_flags=yes
21099else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021100 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021101sed 's/^/| /' conftest.$ac_ext >&5
21102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021103 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021105
21106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021108
21109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021110fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021111{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21112echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21113if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021114
21115cat >>confdefs.h <<_ACEOF
21116#define HAVE_STRUCT_STAT_ST_FLAGS 1
21117_ACEOF
21118
21119
21120fi
21121
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021122{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21123echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021124if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021125 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021126else
21127 cat >conftest.$ac_ext <<_ACEOF
21128/* confdefs.h. */
21129_ACEOF
21130cat confdefs.h >>conftest.$ac_ext
21131cat >>conftest.$ac_ext <<_ACEOF
21132/* end confdefs.h. */
21133$ac_includes_default
21134int
21135main ()
21136{
21137static struct stat ac_aggr;
21138if (ac_aggr.st_gen)
21139return 0;
21140 ;
21141 return 0;
21142}
21143_ACEOF
21144rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021145if { (ac_try="$ac_compile"
21146case "(($ac_try" in
21147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21148 *) ac_try_echo=$ac_try;;
21149esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021151 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021152 ac_status=$?
21153 grep -v '^ *+' conftest.er1 >conftest.err
21154 rm -f conftest.er1
21155 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021157 (exit $ac_status); } && {
21158 test -z "$ac_c_werror_flag" ||
21159 test ! -s conftest.err
21160 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021161 ac_cv_member_struct_stat_st_gen=yes
21162else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021163 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021164sed 's/^/| /' conftest.$ac_ext >&5
21165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021166 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021167/* confdefs.h. */
21168_ACEOF
21169cat confdefs.h >>conftest.$ac_ext
21170cat >>conftest.$ac_ext <<_ACEOF
21171/* end confdefs.h. */
21172$ac_includes_default
21173int
21174main ()
21175{
21176static struct stat ac_aggr;
21177if (sizeof ac_aggr.st_gen)
21178return 0;
21179 ;
21180 return 0;
21181}
21182_ACEOF
21183rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021184if { (ac_try="$ac_compile"
21185case "(($ac_try" in
21186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21187 *) ac_try_echo=$ac_try;;
21188esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021190 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021191 ac_status=$?
21192 grep -v '^ *+' conftest.er1 >conftest.err
21193 rm -f conftest.er1
21194 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021196 (exit $ac_status); } && {
21197 test -z "$ac_c_werror_flag" ||
21198 test ! -s conftest.err
21199 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021200 ac_cv_member_struct_stat_st_gen=yes
21201else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021202 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021203sed 's/^/| /' conftest.$ac_ext >&5
21204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021205 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021207
21208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021209fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021210
21211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021212fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021213{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21214echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21215if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021216
21217cat >>confdefs.h <<_ACEOF
21218#define HAVE_STRUCT_STAT_ST_GEN 1
21219_ACEOF
21220
21221
21222fi
21223
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021224{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21225echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021226if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021227 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021228else
21229 cat >conftest.$ac_ext <<_ACEOF
21230/* confdefs.h. */
21231_ACEOF
21232cat confdefs.h >>conftest.$ac_ext
21233cat >>conftest.$ac_ext <<_ACEOF
21234/* end confdefs.h. */
21235$ac_includes_default
21236int
21237main ()
21238{
21239static struct stat ac_aggr;
21240if (ac_aggr.st_birthtime)
21241return 0;
21242 ;
21243 return 0;
21244}
21245_ACEOF
21246rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021247if { (ac_try="$ac_compile"
21248case "(($ac_try" in
21249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21250 *) ac_try_echo=$ac_try;;
21251esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021253 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021254 ac_status=$?
21255 grep -v '^ *+' conftest.er1 >conftest.err
21256 rm -f conftest.er1
21257 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021259 (exit $ac_status); } && {
21260 test -z "$ac_c_werror_flag" ||
21261 test ! -s conftest.err
21262 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021263 ac_cv_member_struct_stat_st_birthtime=yes
21264else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021265 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021266sed 's/^/| /' conftest.$ac_ext >&5
21267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021268 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021269/* confdefs.h. */
21270_ACEOF
21271cat confdefs.h >>conftest.$ac_ext
21272cat >>conftest.$ac_ext <<_ACEOF
21273/* end confdefs.h. */
21274$ac_includes_default
21275int
21276main ()
21277{
21278static struct stat ac_aggr;
21279if (sizeof ac_aggr.st_birthtime)
21280return 0;
21281 ;
21282 return 0;
21283}
21284_ACEOF
21285rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021286if { (ac_try="$ac_compile"
21287case "(($ac_try" in
21288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21289 *) ac_try_echo=$ac_try;;
21290esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021292 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021293 ac_status=$?
21294 grep -v '^ *+' conftest.er1 >conftest.err
21295 rm -f conftest.er1
21296 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021298 (exit $ac_status); } && {
21299 test -z "$ac_c_werror_flag" ||
21300 test ! -s conftest.err
21301 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021302 ac_cv_member_struct_stat_st_birthtime=yes
21303else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021304 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021305sed 's/^/| /' conftest.$ac_ext >&5
21306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021307 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021309
21310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021312
21313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021314fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021315{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21316echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21317if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021318
21319cat >>confdefs.h <<_ACEOF
21320#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21321_ACEOF
21322
21323
21324fi
21325
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021326{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21327echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021328if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021329 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021330else
Martin v. Löwis11437992002-04-12 09:54:03 +000021331 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021332/* confdefs.h. */
21333_ACEOF
21334cat confdefs.h >>conftest.$ac_ext
21335cat >>conftest.$ac_ext <<_ACEOF
21336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021337$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021338int
21339main ()
21340{
21341static struct stat ac_aggr;
21342if (ac_aggr.st_blocks)
21343return 0;
21344 ;
21345 return 0;
21346}
21347_ACEOF
21348rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021349if { (ac_try="$ac_compile"
21350case "(($ac_try" in
21351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21352 *) ac_try_echo=$ac_try;;
21353esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021355 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021357 grep -v '^ *+' conftest.er1 >conftest.err
21358 rm -f conftest.er1
21359 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021361 (exit $ac_status); } && {
21362 test -z "$ac_c_werror_flag" ||
21363 test ! -s conftest.err
21364 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021365 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021366else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021368sed 's/^/| /' conftest.$ac_ext >&5
21369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021370 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021371/* confdefs.h. */
21372_ACEOF
21373cat confdefs.h >>conftest.$ac_ext
21374cat >>conftest.$ac_ext <<_ACEOF
21375/* end confdefs.h. */
21376$ac_includes_default
21377int
21378main ()
21379{
21380static struct stat ac_aggr;
21381if (sizeof ac_aggr.st_blocks)
21382return 0;
21383 ;
21384 return 0;
21385}
21386_ACEOF
21387rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021388if { (ac_try="$ac_compile"
21389case "(($ac_try" in
21390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21391 *) ac_try_echo=$ac_try;;
21392esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021394 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021396 grep -v '^ *+' conftest.er1 >conftest.err
21397 rm -f conftest.er1
21398 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021400 (exit $ac_status); } && {
21401 test -z "$ac_c_werror_flag" ||
21402 test ! -s conftest.err
21403 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021404 ac_cv_member_struct_stat_st_blocks=yes
21405else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021406 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021407sed 's/^/| /' conftest.$ac_ext >&5
21408
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021409 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021411
21412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021414
21415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021416fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021417{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21418echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21419if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021420
Martin v. Löwis11437992002-04-12 09:54:03 +000021421cat >>confdefs.h <<_ACEOF
21422#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21423_ACEOF
21424
21425
21426cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021427#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021428_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021429
21430else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021431 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021432 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021433 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21434 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021435esac
21436
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021437fi
21438
Michael W. Hudson54241132001-12-07 15:38:26 +000021439
Martin v. Löwis11437992002-04-12 09:54:03 +000021440
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021441{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21442echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021443if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021444 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021445else
Martin v. Löwis11437992002-04-12 09:54:03 +000021446 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021447/* confdefs.h. */
21448_ACEOF
21449cat confdefs.h >>conftest.$ac_ext
21450cat >>conftest.$ac_ext <<_ACEOF
21451/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021452#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021453int
21454main ()
21455{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021456return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021457 ;
21458 return 0;
21459}
21460_ACEOF
21461rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021462if { (ac_try="$ac_compile"
21463case "(($ac_try" in
21464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21465 *) ac_try_echo=$ac_try;;
21466esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021468 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021469 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021470 grep -v '^ *+' conftest.er1 >conftest.err
21471 rm -f conftest.er1
21472 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021474 (exit $ac_status); } && {
21475 test -z "$ac_c_werror_flag" ||
21476 test ! -s conftest.err
21477 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021478 ac_cv_header_time_altzone=yes
21479else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021481sed 's/^/| /' conftest.$ac_ext >&5
21482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021483 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021484fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021485
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21487fi
21488
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021489{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21490echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021491if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021492
21493cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021494#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021495_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021496
21497fi
21498
Guido van Rossumda88dad1995-01-26 00:46:29 +000021499was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021500{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21501echo $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 +000021502cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021503/* confdefs.h. */
21504_ACEOF
21505cat confdefs.h >>conftest.$ac_ext
21506cat >>conftest.$ac_ext <<_ACEOF
21507/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021508
21509#include <sys/types.h>
21510#include <sys/select.h>
21511#include <sys/time.h>
21512
Martin v. Löwis11437992002-04-12 09:54:03 +000021513int
21514main ()
21515{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021516;
Martin v. Löwis11437992002-04-12 09:54:03 +000021517 ;
21518 return 0;
21519}
21520_ACEOF
21521rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021522if { (ac_try="$ac_compile"
21523case "(($ac_try" in
21524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21525 *) ac_try_echo=$ac_try;;
21526esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021528 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021530 grep -v '^ *+' conftest.er1 >conftest.err
21531 rm -f conftest.er1
21532 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021534 (exit $ac_status); } && {
21535 test -z "$ac_c_werror_flag" ||
21536 test ! -s conftest.err
21537 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021538
21539
21540cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021541#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021542_ACEOF
21543
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021544 was_it_defined=yes
21545
Guido van Rossumf78abae1997-01-21 22:02:36 +000021546else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021548sed 's/^/| /' conftest.$ac_ext >&5
21549
Thomas Wouters477c8d52006-05-27 19:21:47 +000021550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021551fi
21552
21553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021554{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21555echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021556
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021557{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21558echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021559if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021560 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021561else
Martin v. Löwis11437992002-04-12 09:54:03 +000021562 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021563/* confdefs.h. */
21564_ACEOF
21565cat confdefs.h >>conftest.$ac_ext
21566cat >>conftest.$ac_ext <<_ACEOF
21567/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021568
21569# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021570int
21571main ()
21572{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021573struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021574 ;
21575 return 0;
21576}
21577_ACEOF
21578rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021579if { (ac_try="$ac_compile"
21580case "(($ac_try" in
21581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21582 *) ac_try_echo=$ac_try;;
21583esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021585 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021587 grep -v '^ *+' conftest.er1 >conftest.err
21588 rm -f conftest.er1
21589 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021591 (exit $ac_status); } && {
21592 test -z "$ac_c_werror_flag" ||
21593 test ! -s conftest.err
21594 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021595 ac_cv_struct_addrinfo=yes
21596else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021597 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021598sed 's/^/| /' conftest.$ac_ext >&5
21599
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021600 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021601fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021602
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21604fi
21605
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021606{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21607echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021608if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021609
21610cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021611#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021612_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021613
21614fi
21615
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021616{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21617echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021618if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021619 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021620else
Martin v. Löwis11437992002-04-12 09:54:03 +000021621 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021622/* confdefs.h. */
21623_ACEOF
21624cat confdefs.h >>conftest.$ac_ext
21625cat >>conftest.$ac_ext <<_ACEOF
21626/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021627
21628# include <sys/types.h>
21629# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021630int
21631main ()
21632{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021633struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021634 ;
21635 return 0;
21636}
21637_ACEOF
21638rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021639if { (ac_try="$ac_compile"
21640case "(($ac_try" in
21641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21642 *) ac_try_echo=$ac_try;;
21643esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021645 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021647 grep -v '^ *+' conftest.er1 >conftest.err
21648 rm -f conftest.er1
21649 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021651 (exit $ac_status); } && {
21652 test -z "$ac_c_werror_flag" ||
21653 test ! -s conftest.err
21654 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021655 ac_cv_struct_sockaddr_storage=yes
21656else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021657 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021658sed 's/^/| /' conftest.$ac_ext >&5
21659
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021660 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021661fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21664fi
21665
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021666{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21667echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021668if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021669
21670cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021671#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021672_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021673
21674fi
21675
Guido van Rossum627b2d71993-12-24 10:39:16 +000021676# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021677
Michael W. Hudson54241132001-12-07 15:38:26 +000021678
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021679{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21680echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021681if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021682 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021683else
Martin v. Löwis11437992002-04-12 09:54:03 +000021684 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021685/* confdefs.h. */
21686_ACEOF
21687cat confdefs.h >>conftest.$ac_ext
21688cat >>conftest.$ac_ext <<_ACEOF
21689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021690$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021691int
21692main ()
21693{
21694static int test_array [1 - 2 * !(((char) -1) < 0)];
21695test_array [0] = 0
21696
21697 ;
21698 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021699}
Martin v. Löwis11437992002-04-12 09:54:03 +000021700_ACEOF
21701rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021702if { (ac_try="$ac_compile"
21703case "(($ac_try" in
21704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21705 *) ac_try_echo=$ac_try;;
21706esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021708 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021710 grep -v '^ *+' conftest.er1 >conftest.err
21711 rm -f conftest.er1
21712 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021714 (exit $ac_status); } && {
21715 test -z "$ac_c_werror_flag" ||
21716 test ! -s conftest.err
21717 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021718 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021719else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021721sed 's/^/| /' conftest.$ac_ext >&5
21722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021723 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021725
21726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021727fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021728{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21729echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021730if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021731 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021732#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021733_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021734
21735fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021736
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021737{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21738echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021739if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021740 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021741else
21742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021743/* confdefs.h. */
21744_ACEOF
21745cat confdefs.h >>conftest.$ac_ext
21746cat >>conftest.$ac_ext <<_ACEOF
21747/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021748
Martin v. Löwis11437992002-04-12 09:54:03 +000021749int
21750main ()
21751{
21752/* FIXME: Include the comments suggested by Paul. */
21753#ifndef __cplusplus
21754 /* Ultrix mips cc rejects this. */
21755 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021756 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000021757 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021758 char const *const *pcpcc;
21759 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021760 /* NEC SVR4.0.2 mips cc rejects this. */
21761 struct point {int x, y;};
21762 static struct point const zero = {0,0};
21763 /* AIX XL C 1.02.0.0 rejects this.
21764 It does not let you subtract one const X* pointer from another in
21765 an arm of an if-expression whose if-part is not a constant
21766 expression */
21767 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021768 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021769 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021770 ++pcpcc;
21771 ppc = (char**) pcpcc;
21772 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021773 { /* SCO 3.2v4 cc rejects this. */
21774 char *t;
21775 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021776
Martin v. Löwis11437992002-04-12 09:54:03 +000021777 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021778 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021779 }
21780 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21781 int x[] = {25, 17};
21782 const int *foo = &x[0];
21783 ++foo;
21784 }
21785 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21786 typedef const int *iptr;
21787 iptr p = 0;
21788 ++p;
21789 }
21790 { /* AIX XL C 1.02.0.0 rejects this saying
21791 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21792 struct s { int j; const int *ap[3]; };
21793 struct s *b; b->j = 5;
21794 }
21795 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21796 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021797 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021798 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021799 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021800#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021801
Martin v. Löwis11437992002-04-12 09:54:03 +000021802 ;
21803 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021804}
Martin v. Löwis11437992002-04-12 09:54:03 +000021805_ACEOF
21806rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021807if { (ac_try="$ac_compile"
21808case "(($ac_try" in
21809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21810 *) ac_try_echo=$ac_try;;
21811esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021813 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021815 grep -v '^ *+' conftest.er1 >conftest.err
21816 rm -f conftest.er1
21817 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021819 (exit $ac_status); } && {
21820 test -z "$ac_c_werror_flag" ||
21821 test ! -s conftest.err
21822 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021823 ac_cv_c_const=yes
21824else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021826sed 's/^/| /' conftest.$ac_ext >&5
21827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021828 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021829fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021830
21831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021832fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021833{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21834echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021835if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021836
21837cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021838#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000021839_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021840
21841fi
21842
Michael W. Hudson54241132001-12-07 15:38:26 +000021843
Guido van Rossumda88dad1995-01-26 00:46:29 +000021844works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021845{ echo "$as_me:$LINENO: checking for working volatile" >&5
21846echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021847cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021848/* confdefs.h. */
21849_ACEOF
21850cat confdefs.h >>conftest.$ac_ext
21851cat >>conftest.$ac_ext <<_ACEOF
21852/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021853
Martin v. Löwis11437992002-04-12 09:54:03 +000021854int
21855main ()
21856{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021857volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021858 ;
21859 return 0;
21860}
21861_ACEOF
21862rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021863if { (ac_try="$ac_compile"
21864case "(($ac_try" in
21865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21866 *) ac_try_echo=$ac_try;;
21867esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021869 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021870 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021871 grep -v '^ *+' conftest.er1 >conftest.err
21872 rm -f conftest.er1
21873 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021875 (exit $ac_status); } && {
21876 test -z "$ac_c_werror_flag" ||
21877 test ! -s conftest.err
21878 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021879 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021880else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021881 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021882sed 's/^/| /' conftest.$ac_ext >&5
21883
Martin v. Löwis11437992002-04-12 09:54:03 +000021884
21885cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021886#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000021887_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021888
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021889
Guido van Rossum627b2d71993-12-24 10:39:16 +000021890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021891
21892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021893{ echo "$as_me:$LINENO: result: $works" >&5
21894echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021895
Guido van Rossumda88dad1995-01-26 00:46:29 +000021896works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021897{ echo "$as_me:$LINENO: checking for working signed char" >&5
21898echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021899cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021900/* confdefs.h. */
21901_ACEOF
21902cat confdefs.h >>conftest.$ac_ext
21903cat >>conftest.$ac_ext <<_ACEOF
21904/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021905
Martin v. Löwis11437992002-04-12 09:54:03 +000021906int
21907main ()
21908{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021909signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021910 ;
21911 return 0;
21912}
21913_ACEOF
21914rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021915if { (ac_try="$ac_compile"
21916case "(($ac_try" in
21917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21918 *) ac_try_echo=$ac_try;;
21919esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021921 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021922 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021923 grep -v '^ *+' conftest.er1 >conftest.err
21924 rm -f conftest.er1
21925 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021927 (exit $ac_status); } && {
21928 test -z "$ac_c_werror_flag" ||
21929 test ! -s conftest.err
21930 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021931 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021932else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021934sed 's/^/| /' conftest.$ac_ext >&5
21935
Martin v. Löwis11437992002-04-12 09:54:03 +000021936
21937cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021938#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021939_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021940
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021941
Guido van Rossum7f43da71994-08-01 12:15:30 +000021942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021943
21944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021945{ echo "$as_me:$LINENO: result: $works" >&5
21946echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021947
Guido van Rossumda88dad1995-01-26 00:46:29 +000021948have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021949{ echo "$as_me:$LINENO: checking for prototypes" >&5
21950echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021951cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021952/* confdefs.h. */
21953_ACEOF
21954cat confdefs.h >>conftest.$ac_ext
21955cat >>conftest.$ac_ext <<_ACEOF
21956/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021957int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021958int
21959main ()
21960{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021961return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021962 ;
21963 return 0;
21964}
21965_ACEOF
21966rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021967if { (ac_try="$ac_compile"
21968case "(($ac_try" in
21969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21970 *) ac_try_echo=$ac_try;;
21971esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021973 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021974 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021975 grep -v '^ *+' conftest.er1 >conftest.err
21976 rm -f conftest.er1
21977 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021979 (exit $ac_status); } && {
21980 test -z "$ac_c_werror_flag" ||
21981 test ! -s conftest.err
21982 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021983
21984
21985cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021986#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021987_ACEOF
21988
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021989 have_prototypes=yes
21990
Guido van Rossumf78abae1997-01-21 22:02:36 +000021991else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021993sed 's/^/| /' conftest.$ac_ext >&5
21994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021995
Guido van Rossum7f43da71994-08-01 12:15:30 +000021996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021997
21998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021999{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22000echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022001
Guido van Rossumda88dad1995-01-26 00:46:29 +000022002works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022003{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22004echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022005cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022006/* confdefs.h. */
22007_ACEOF
22008cat confdefs.h >>conftest.$ac_ext
22009cat >>conftest.$ac_ext <<_ACEOF
22010/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022011
22012#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022013int foo(int x, ...) {
22014 va_list va;
22015 va_start(va, x);
22016 va_arg(va, int);
22017 va_arg(va, char *);
22018 va_arg(va, double);
22019 return 0;
22020}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022021
Martin v. Löwis11437992002-04-12 09:54:03 +000022022int
22023main ()
22024{
Guido van Rossum90eea071996-08-30 20:58:57 +000022025return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022026 ;
22027 return 0;
22028}
22029_ACEOF
22030rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022031if { (ac_try="$ac_compile"
22032case "(($ac_try" in
22033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22034 *) ac_try_echo=$ac_try;;
22035esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022037 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022039 grep -v '^ *+' conftest.er1 >conftest.err
22040 rm -f conftest.er1
22041 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022043 (exit $ac_status); } && {
22044 test -z "$ac_c_werror_flag" ||
22045 test ! -s conftest.err
22046 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022047
22048
22049cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022050#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022051_ACEOF
22052
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022053 works=yes
22054
Guido van Rossumf78abae1997-01-21 22:02:36 +000022055else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022056 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022057sed 's/^/| /' conftest.$ac_ext >&5
22058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022059
Guido van Rossum627b2d71993-12-24 10:39:16 +000022060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022061
22062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022063{ echo "$as_me:$LINENO: result: $works" >&5
22064echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022065
Martin v. Löwisd6320502004-08-12 13:45:08 +000022066# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022067{ echo "$as_me:$LINENO: checking for socketpair" >&5
22068echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022069cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022070/* confdefs.h. */
22071_ACEOF
22072cat confdefs.h >>conftest.$ac_ext
22073cat >>conftest.$ac_ext <<_ACEOF
22074/* end confdefs.h. */
22075
22076#include <sys/types.h>
22077#include <sys/socket.h>
22078
22079int
22080main ()
22081{
22082void *x=socketpair
22083 ;
22084 return 0;
22085}
22086_ACEOF
22087rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022088if { (ac_try="$ac_compile"
22089case "(($ac_try" in
22090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22091 *) ac_try_echo=$ac_try;;
22092esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022094 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022095 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022096 grep -v '^ *+' conftest.er1 >conftest.err
22097 rm -f conftest.er1
22098 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022100 (exit $ac_status); } && {
22101 test -z "$ac_c_werror_flag" ||
22102 test ! -s conftest.err
22103 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022104
22105cat >>confdefs.h <<\_ACEOF
22106#define HAVE_SOCKETPAIR 1
22107_ACEOF
22108
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022109 { echo "$as_me:$LINENO: result: yes" >&5
22110echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022111else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022112 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022113sed 's/^/| /' conftest.$ac_ext >&5
22114
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022115 { echo "$as_me:$LINENO: result: no" >&5
22116echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022117
22118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022119
22120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022121
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022122# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022123{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22124echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022125cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022126/* confdefs.h. */
22127_ACEOF
22128cat confdefs.h >>conftest.$ac_ext
22129cat >>conftest.$ac_ext <<_ACEOF
22130/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022131#include <sys/types.h>
22132#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022133int
22134main ()
22135{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022136struct sockaddr x;
22137x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022138 ;
22139 return 0;
22140}
22141_ACEOF
22142rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022143if { (ac_try="$ac_compile"
22144case "(($ac_try" in
22145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22146 *) ac_try_echo=$ac_try;;
22147esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022149 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022151 grep -v '^ *+' conftest.er1 >conftest.err
22152 rm -f conftest.er1
22153 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022155 (exit $ac_status); } && {
22156 test -z "$ac_c_werror_flag" ||
22157 test ! -s conftest.err
22158 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022159 { echo "$as_me:$LINENO: result: yes" >&5
22160echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022161
22162cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022163#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022164_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022165
22166else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022168sed 's/^/| /' conftest.$ac_ext >&5
22169
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022170 { echo "$as_me:$LINENO: result: no" >&5
22171echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022173
22174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022175
Guido van Rossumda88dad1995-01-26 00:46:29 +000022176va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022177{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22178echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022179cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022180/* confdefs.h. */
22181_ACEOF
22182cat confdefs.h >>conftest.$ac_ext
22183cat >>conftest.$ac_ext <<_ACEOF
22184/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022185
22186#ifdef HAVE_STDARG_PROTOTYPES
22187#include <stdarg.h>
22188#else
22189#include <varargs.h>
22190#endif
22191
Martin v. Löwis11437992002-04-12 09:54:03 +000022192int
22193main ()
22194{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022195va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022196 ;
22197 return 0;
22198}
22199_ACEOF
22200rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022201if { (ac_try="$ac_compile"
22202case "(($ac_try" in
22203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22204 *) ac_try_echo=$ac_try;;
22205esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022207 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022209 grep -v '^ *+' conftest.er1 >conftest.err
22210 rm -f conftest.er1
22211 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022213 (exit $ac_status); } && {
22214 test -z "$ac_c_werror_flag" ||
22215 test ! -s conftest.err
22216 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022217 :
22218else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022220sed 's/^/| /' conftest.$ac_ext >&5
22221
Martin v. Löwis11437992002-04-12 09:54:03 +000022222
22223
22224cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022225#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022226_ACEOF
22227
Guido van Rossumda88dad1995-01-26 00:46:29 +000022228 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022229
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022231
22232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022233{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22234echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022235
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022236# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022237
22238
22239
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022240{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22241echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022242if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022243 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022244else
Martin v. Löwis11437992002-04-12 09:54:03 +000022245 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022246/* confdefs.h. */
22247_ACEOF
22248cat confdefs.h >>conftest.$ac_ext
22249cat >>conftest.$ac_ext <<_ACEOF
22250/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022251/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22252 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22253#define gethostbyname_r innocuous_gethostbyname_r
22254
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022255/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022256 which can conflict with char gethostbyname_r (); below.
22257 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022258 <limits.h> exists even on freestanding compilers. */
22259
22260#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022261# include <limits.h>
22262#else
22263# include <assert.h>
22264#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022265
22266#undef gethostbyname_r
22267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022268/* Override any GCC internal prototype to avoid an error.
22269 Use char because int might match the return type of a GCC
22270 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022271#ifdef __cplusplus
22272extern "C"
22273#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022274char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022275/* The GNU C library defines this for functions which it implements
22276 to always fail with ENOSYS. Some functions are actually named
22277 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022278#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022279choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022280#endif
22281
Skip Montanaro6dead952003-09-25 14:50:04 +000022282int
22283main ()
22284{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022285return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022286 ;
22287 return 0;
22288}
22289_ACEOF
22290rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022291if { (ac_try="$ac_link"
22292case "(($ac_try" in
22293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22294 *) ac_try_echo=$ac_try;;
22295esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022297 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022298 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022299 grep -v '^ *+' conftest.er1 >conftest.err
22300 rm -f conftest.er1
22301 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022303 (exit $ac_status); } && {
22304 test -z "$ac_c_werror_flag" ||
22305 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022306 } && test -s conftest$ac_exeext &&
22307 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022308 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022309else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022311sed 's/^/| /' conftest.$ac_ext >&5
22312
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022313 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022315
22316rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022317 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022318fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022319{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22320echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22321if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022322
Martin v. Löwis11437992002-04-12 09:54:03 +000022323 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022324#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022325_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022326
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022327 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22328echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022329 OLD_CFLAGS=$CFLAGS
22330 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022331 cat >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 Rossuma96f0ba1999-03-22 21:49:51 +000022337
22338# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022339
Martin v. Löwis11437992002-04-12 09:54:03 +000022340int
22341main ()
22342{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022343
22344 char *name;
22345 struct hostent *he, *res;
22346 char buffer[2048];
22347 int buflen = 2048;
22348 int h_errnop;
22349
22350 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022351
22352 ;
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 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022375#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022376_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022377
Martin v. Löwis11437992002-04-12 09:54:03 +000022378
22379cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022380#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022381_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022382
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022383 { echo "$as_me:$LINENO: result: yes" >&5
22384echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022385
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022386else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022387 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022388sed 's/^/| /' conftest.$ac_ext >&5
22389
Martin v. Löwis11437992002-04-12 09:54:03 +000022390
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022391 { echo "$as_me:$LINENO: result: no" >&5
22392echo "${ECHO_T}no" >&6; }
22393 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22394echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022395 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022396/* confdefs.h. */
22397_ACEOF
22398cat confdefs.h >>conftest.$ac_ext
22399cat >>conftest.$ac_ext <<_ACEOF
22400/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022401
22402# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022403
Martin v. Löwis11437992002-04-12 09:54:03 +000022404int
22405main ()
22406{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022407
22408 char *name;
22409 struct hostent *he;
22410 char buffer[2048];
22411 int buflen = 2048;
22412 int h_errnop;
22413
22414 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022415
22416 ;
22417 return 0;
22418}
22419_ACEOF
22420rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022421if { (ac_try="$ac_compile"
22422case "(($ac_try" in
22423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22424 *) ac_try_echo=$ac_try;;
22425esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022427 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022428 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022429 grep -v '^ *+' conftest.er1 >conftest.err
22430 rm -f conftest.er1
22431 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022433 (exit $ac_status); } && {
22434 test -z "$ac_c_werror_flag" ||
22435 test ! -s conftest.err
22436 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022437
22438 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022439#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022440_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022441
Martin v. Löwis11437992002-04-12 09:54:03 +000022442
22443cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022444#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022445_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022446
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022447 { echo "$as_me:$LINENO: result: yes" >&5
22448echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022449
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022450else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022451 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022452sed 's/^/| /' conftest.$ac_ext >&5
22453
Martin v. Löwis11437992002-04-12 09:54:03 +000022454
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022455 { echo "$as_me:$LINENO: result: no" >&5
22456echo "${ECHO_T}no" >&6; }
22457 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22458echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022459 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022460/* confdefs.h. */
22461_ACEOF
22462cat confdefs.h >>conftest.$ac_ext
22463cat >>conftest.$ac_ext <<_ACEOF
22464/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022465
22466# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022467
Martin v. Löwis11437992002-04-12 09:54:03 +000022468int
22469main ()
22470{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022471
22472 char *name;
22473 struct hostent *he;
22474 struct hostent_data data;
22475
22476 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022477
22478 ;
22479 return 0;
22480}
22481_ACEOF
22482rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022483if { (ac_try="$ac_compile"
22484case "(($ac_try" in
22485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22486 *) ac_try_echo=$ac_try;;
22487esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022489 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022491 grep -v '^ *+' conftest.er1 >conftest.err
22492 rm -f conftest.er1
22493 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022495 (exit $ac_status); } && {
22496 test -z "$ac_c_werror_flag" ||
22497 test ! -s conftest.err
22498 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022499
22500 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022501#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022502_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022503
Martin v. Löwis11437992002-04-12 09:54:03 +000022504
22505cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022506#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022507_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022508
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022509 { echo "$as_me:$LINENO: result: yes" >&5
22510echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022511
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022512else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022514sed 's/^/| /' conftest.$ac_ext >&5
22515
Martin v. Löwis11437992002-04-12 09:54:03 +000022516
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022517 { echo "$as_me:$LINENO: result: no" >&5
22518echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022519
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022521
22522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022523
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022525
22526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022527
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022529
22530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022531 CFLAGS=$OLD_CFLAGS
22532
22533else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022534
Martin v. Löwis11437992002-04-12 09:54:03 +000022535
22536for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022537do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022538as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22539{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22540echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022541if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022542 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022543else
Martin v. Löwis11437992002-04-12 09:54:03 +000022544 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022545/* confdefs.h. */
22546_ACEOF
22547cat confdefs.h >>conftest.$ac_ext
22548cat >>conftest.$ac_ext <<_ACEOF
22549/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022550/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22551 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22552#define $ac_func innocuous_$ac_func
22553
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022554/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022555 which can conflict with char $ac_func (); below.
22556 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022557 <limits.h> exists even on freestanding compilers. */
22558
22559#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022560# include <limits.h>
22561#else
22562# include <assert.h>
22563#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022564
22565#undef $ac_func
22566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022567/* Override any GCC internal prototype to avoid an error.
22568 Use char because int might match the return type of a GCC
22569 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022570#ifdef __cplusplus
22571extern "C"
22572#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022573char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022574/* The GNU C library defines this for functions which it implements
22575 to always fail with ENOSYS. Some functions are actually named
22576 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022577#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022578choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022579#endif
22580
Skip Montanaro6dead952003-09-25 14:50:04 +000022581int
22582main ()
22583{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022584return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022585 ;
22586 return 0;
22587}
22588_ACEOF
22589rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022590if { (ac_try="$ac_link"
22591case "(($ac_try" in
22592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22593 *) ac_try_echo=$ac_try;;
22594esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022596 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022597 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022598 grep -v '^ *+' conftest.er1 >conftest.err
22599 rm -f conftest.er1
22600 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022602 (exit $ac_status); } && {
22603 test -z "$ac_c_werror_flag" ||
22604 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022605 } && test -s conftest$ac_exeext &&
22606 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022607 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022608else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022609 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022610sed 's/^/| /' conftest.$ac_ext >&5
22611
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022612 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022614
22615rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022616 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022617fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022618ac_res=`eval echo '${'$as_ac_var'}'`
22619 { echo "$as_me:$LINENO: result: $ac_res" >&5
22620echo "${ECHO_T}$ac_res" >&6; }
22621if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022622 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022623#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022624_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022625
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022626fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022627done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022628
Michael W. Hudson54241132001-12-07 15:38:26 +000022629
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022630fi
22631
Michael W. Hudson54241132001-12-07 15:38:26 +000022632
22633
22634
22635
22636
22637
Guido van Rossum627b2d71993-12-24 10:39:16 +000022638# checks for system services
22639# (none yet)
22640
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022641# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022642{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22643echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022644if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022645 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022646else
Martin v. Löwis11437992002-04-12 09:54:03 +000022647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022648/* confdefs.h. */
22649_ACEOF
22650cat confdefs.h >>conftest.$ac_ext
22651cat >>conftest.$ac_ext <<_ACEOF
22652/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022653/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22654 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22655#define __fpu_control innocuous___fpu_control
22656
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022657/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022658 which can conflict with char __fpu_control (); below.
22659 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022660 <limits.h> exists even on freestanding compilers. */
22661
22662#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022663# include <limits.h>
22664#else
22665# include <assert.h>
22666#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022667
22668#undef __fpu_control
22669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022670/* Override any GCC internal prototype to avoid an error.
22671 Use char because int might match the return type of a GCC
22672 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022673#ifdef __cplusplus
22674extern "C"
22675#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022676char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022677/* The GNU C library defines this for functions which it implements
22678 to always fail with ENOSYS. Some functions are actually named
22679 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022680#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022681choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022682#endif
22683
Skip Montanaro6dead952003-09-25 14:50:04 +000022684int
22685main ()
22686{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022687return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022688 ;
22689 return 0;
22690}
22691_ACEOF
22692rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022693if { (ac_try="$ac_link"
22694case "(($ac_try" in
22695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22696 *) ac_try_echo=$ac_try;;
22697esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022699 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022701 grep -v '^ *+' conftest.er1 >conftest.err
22702 rm -f conftest.er1
22703 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022705 (exit $ac_status); } && {
22706 test -z "$ac_c_werror_flag" ||
22707 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022708 } && test -s conftest$ac_exeext &&
22709 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022710 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022711else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022713sed 's/^/| /' conftest.$ac_ext >&5
22714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022715 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022717
22718rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022719 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022720fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022721{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22722echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
22723if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022724 :
22725else
Martin v. Löwis11437992002-04-12 09:54:03 +000022726
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022727{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22728echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022729if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022730 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022731else
Martin v. Löwis11437992002-04-12 09:54:03 +000022732 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022733LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022734cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022735/* confdefs.h. */
22736_ACEOF
22737cat confdefs.h >>conftest.$ac_ext
22738cat >>conftest.$ac_ext <<_ACEOF
22739/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022740
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022741/* Override any GCC internal prototype to avoid an error.
22742 Use char because int might match the return type of a GCC
22743 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022744#ifdef __cplusplus
22745extern "C"
22746#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022747char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022748int
22749main ()
22750{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022751return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022752 ;
22753 return 0;
22754}
22755_ACEOF
22756rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022757if { (ac_try="$ac_link"
22758case "(($ac_try" in
22759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22760 *) ac_try_echo=$ac_try;;
22761esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022763 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022765 grep -v '^ *+' conftest.er1 >conftest.err
22766 rm -f conftest.er1
22767 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022769 (exit $ac_status); } && {
22770 test -z "$ac_c_werror_flag" ||
22771 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022772 } && test -s conftest$ac_exeext &&
22773 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022774 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022775else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022777sed 's/^/| /' conftest.$ac_ext >&5
22778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022779 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022781
22782rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022783 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022784LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022785fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022786{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22787echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
22788if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022789 cat >>confdefs.h <<_ACEOF
22790#define HAVE_LIBIEEE 1
22791_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022792
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022793 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022794
Guido van Rossum627b2d71993-12-24 10:39:16 +000022795fi
22796
Michael W. Hudson54241132001-12-07 15:38:26 +000022797
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022798fi
22799
Michael W. Hudson54241132001-12-07 15:38:26 +000022800
Guido van Rossum7f253911997-05-09 02:42:48 +000022801# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022802{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22803echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022805# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022806if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022807 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022808if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022809then
22810
22811cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022812#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022813_ACEOF
22814
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022815 { echo "$as_me:$LINENO: result: yes" >&5
22816echo "${ECHO_T}yes" >&6; }
22817else { echo "$as_me:$LINENO: result: no" >&5
22818echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022819fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022820else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022821 { echo "$as_me:$LINENO: result: no" >&5
22822echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022823fi
22824
Guido van Rossum7f253911997-05-09 02:42:48 +000022825
Guido van Rossum7f43da71994-08-01 12:15:30 +000022826# check for --with-libm=...
22827
Guido van Rossum563e7081996-09-10 18:20:48 +000022828case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022829Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022830*) LIBM=-lm
22831esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022832{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22833echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022835# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022836if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022837 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022838if test "$withval" = no
22839then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022840 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
22841echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022842elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022843then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022844 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22845echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
22846else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22847echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022848 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022849fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022850else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022851 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22852echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022853fi
22854
Guido van Rossum7f43da71994-08-01 12:15:30 +000022855
22856# check for --with-libc=...
22857
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022858{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22859echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022861# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022862if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022863 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022864if test "$withval" = no
22865then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022866 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
22867echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022868elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022869then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022870 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22871echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
22872else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22873echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022874 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022875fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022876else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022877 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22878echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022879fi
22880
Guido van Rossum7f43da71994-08-01 12:15:30 +000022881
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022882# **************************************************
22883# * Check for various properties of floating point *
22884# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022885
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022886{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
22887echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022888if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022889 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022890else
22891
22892if test "$cross_compiling" = yes; then
22893 ac_cv_little_endian_double=no
22894else
22895 cat >conftest.$ac_ext <<_ACEOF
22896/* confdefs.h. */
22897_ACEOF
22898cat confdefs.h >>conftest.$ac_ext
22899cat >>conftest.$ac_ext <<_ACEOF
22900/* end confdefs.h. */
22901
22902#include <string.h>
22903int main() {
22904 double x = 9006104071832581.0;
22905 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22906 return 0;
22907 else
22908 return 1;
22909}
22910
22911_ACEOF
22912rm -f conftest$ac_exeext
22913if { (ac_try="$ac_link"
22914case "(($ac_try" in
22915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22916 *) ac_try_echo=$ac_try;;
22917esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022919 (eval "$ac_link") 2>&5
22920 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022922 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22923 { (case "(($ac_try" in
22924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22925 *) ac_try_echo=$ac_try;;
22926esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022928 (eval "$ac_try") 2>&5
22929 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022931 (exit $ac_status); }; }; then
22932 ac_cv_little_endian_double=yes
22933else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022934 echo "$as_me: program exited with status $ac_status" >&5
22935echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022936sed 's/^/| /' conftest.$ac_ext >&5
22937
22938( exit $ac_status )
22939ac_cv_little_endian_double=no
22940fi
22941rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22942fi
22943
22944
22945fi
22946
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022947{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22948echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022949if test "$ac_cv_little_endian_double" = yes
22950then
22951
22952cat >>confdefs.h <<\_ACEOF
22953#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22954_ACEOF
22955
22956fi
22957
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022958{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22959echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022960if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022961 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022962else
22963
22964if test "$cross_compiling" = yes; then
22965 ac_cv_big_endian_double=no
22966else
22967 cat >conftest.$ac_ext <<_ACEOF
22968/* confdefs.h. */
22969_ACEOF
22970cat confdefs.h >>conftest.$ac_ext
22971cat >>conftest.$ac_ext <<_ACEOF
22972/* end confdefs.h. */
22973
22974#include <string.h>
22975int main() {
22976 double x = 9006104071832581.0;
22977 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22978 return 0;
22979 else
22980 return 1;
22981}
22982
22983_ACEOF
22984rm -f conftest$ac_exeext
22985if { (ac_try="$ac_link"
22986case "(($ac_try" in
22987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22988 *) ac_try_echo=$ac_try;;
22989esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022991 (eval "$ac_link") 2>&5
22992 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022994 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22995 { (case "(($ac_try" in
22996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22997 *) ac_try_echo=$ac_try;;
22998esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023000 (eval "$ac_try") 2>&5
23001 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023003 (exit $ac_status); }; }; then
23004 ac_cv_big_endian_double=yes
23005else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023006 echo "$as_me: program exited with status $ac_status" >&5
23007echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023008sed 's/^/| /' conftest.$ac_ext >&5
23009
23010( exit $ac_status )
23011ac_cv_big_endian_double=no
23012fi
23013rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23014fi
23015
23016
23017fi
23018
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023019{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23020echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023021if test "$ac_cv_big_endian_double" = yes
23022then
23023
23024cat >>confdefs.h <<\_ACEOF
23025#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23026_ACEOF
23027
23028fi
23029
23030# Some ARM platforms use a mixed-endian representation for doubles.
23031# While Python doesn't currently have full support for these platforms
23032# (see e.g., issue 1762561), we can at least make sure that float <-> string
23033# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023034{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23035echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023036if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023037 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023038else
23039
23040if test "$cross_compiling" = yes; then
23041 ac_cv_mixed_endian_double=no
23042else
23043 cat >conftest.$ac_ext <<_ACEOF
23044/* confdefs.h. */
23045_ACEOF
23046cat confdefs.h >>conftest.$ac_ext
23047cat >>conftest.$ac_ext <<_ACEOF
23048/* end confdefs.h. */
23049
23050#include <string.h>
23051int main() {
23052 double x = 9006104071832581.0;
23053 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23054 return 0;
23055 else
23056 return 1;
23057}
23058
23059_ACEOF
23060rm -f conftest$ac_exeext
23061if { (ac_try="$ac_link"
23062case "(($ac_try" in
23063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23064 *) ac_try_echo=$ac_try;;
23065esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023067 (eval "$ac_link") 2>&5
23068 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023070 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23071 { (case "(($ac_try" in
23072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23073 *) ac_try_echo=$ac_try;;
23074esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023076 (eval "$ac_try") 2>&5
23077 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023079 (exit $ac_status); }; }; then
23080 ac_cv_mixed_endian_double=yes
23081else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023082 echo "$as_me: program exited with status $ac_status" >&5
23083echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023084sed 's/^/| /' conftest.$ac_ext >&5
23085
23086( exit $ac_status )
23087ac_cv_mixed_endian_double=no
23088fi
23089rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23090fi
23091
23092
23093fi
23094
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023095{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23096echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023097if test "$ac_cv_mixed_endian_double" = yes
23098then
23099
23100cat >>confdefs.h <<\_ACEOF
23101#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23102_ACEOF
23103
23104fi
23105
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023106# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023107# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023108# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023109# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023110# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000023111# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023112
23113# This inline assembler syntax may also work for suncc and icc,
23114# so we try it on all platforms.
23115
23116{ 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 +000023117echo $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 +000023118cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023119/* confdefs.h. */
23120_ACEOF
23121cat confdefs.h >>conftest.$ac_ext
23122cat >>conftest.$ac_ext <<_ACEOF
23123/* end confdefs.h. */
23124
23125int
23126main ()
23127{
23128
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023129 unsigned short cw;
23130 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23131 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023132
23133 ;
23134 return 0;
23135}
23136_ACEOF
23137rm -f conftest.$ac_objext
23138if { (ac_try="$ac_compile"
23139case "(($ac_try" in
23140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23141 *) ac_try_echo=$ac_try;;
23142esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023144 (eval "$ac_compile") 2>conftest.er1
23145 ac_status=$?
23146 grep -v '^ *+' conftest.er1 >conftest.err
23147 rm -f conftest.er1
23148 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023150 (exit $ac_status); } && {
23151 test -z "$ac_c_werror_flag" ||
23152 test ! -s conftest.err
23153 } && test -s conftest.$ac_objext; then
23154 have_gcc_asm_for_x87=yes
23155else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023156 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023157sed 's/^/| /' conftest.$ac_ext >&5
23158
23159 have_gcc_asm_for_x87=no
23160fi
23161
23162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023163{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023164echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023165if test "$have_gcc_asm_for_x87" = yes
23166then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023167
23168cat >>confdefs.h <<\_ACEOF
23169#define HAVE_GCC_ASM_FOR_X87 1
23170_ACEOF
23171
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023172fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023173
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023174# Detect whether system arithmetic is subject to x87-style double
23175# rounding issues. The result of this test has little meaning on non
23176# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23177# mode is round-to-nearest and double rounding issues are present, and
23178# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023179{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23180echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023181# $BASECFLAGS may affect the result
23182ac_save_cc="$CC"
23183CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023184if test "$cross_compiling" = yes; then
23185 ac_cv_x87_double_rounding=no
23186else
23187 cat >conftest.$ac_ext <<_ACEOF
23188/* confdefs.h. */
23189_ACEOF
23190cat confdefs.h >>conftest.$ac_ext
23191cat >>conftest.$ac_ext <<_ACEOF
23192/* end confdefs.h. */
23193
23194#include <stdlib.h>
23195#include <math.h>
23196int main() {
23197 volatile double x, y, z;
23198 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23199 x = 0.99999999999999989; /* 1-2**-53 */
23200 y = 1./x;
23201 if (y != 1.)
23202 exit(0);
23203 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23204 x = 1e16;
23205 y = 2.99999;
23206 z = x + y;
23207 if (z != 1e16+4.)
23208 exit(0);
23209 /* both tests show evidence of double rounding */
23210 exit(1);
23211}
23212
23213_ACEOF
23214rm -f conftest$ac_exeext
23215if { (ac_try="$ac_link"
23216case "(($ac_try" in
23217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23218 *) ac_try_echo=$ac_try;;
23219esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023221 (eval "$ac_link") 2>&5
23222 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023224 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23225 { (case "(($ac_try" in
23226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23227 *) ac_try_echo=$ac_try;;
23228esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023230 (eval "$ac_try") 2>&5
23231 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023233 (exit $ac_status); }; }; then
23234 ac_cv_x87_double_rounding=no
23235else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023236 echo "$as_me: program exited with status $ac_status" >&5
23237echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023238sed 's/^/| /' conftest.$ac_ext >&5
23239
23240( exit $ac_status )
23241ac_cv_x87_double_rounding=yes
23242fi
23243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23244fi
23245
23246
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023247CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023248{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23249echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023250if test "$ac_cv_x87_double_rounding" = yes
23251then
23252
23253cat >>confdefs.h <<\_ACEOF
23254#define X87_DOUBLE_ROUNDING 1
23255_ACEOF
23256
23257fi
23258
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023259# ************************************
23260# * Check for mathematical functions *
23261# ************************************
23262
23263LIBS_SAVE=$LIBS
23264LIBS="$LIBS $LIBM"
23265
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023266# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23267# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023268{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23269echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023270if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023271 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023272else
23273
23274if test "$cross_compiling" = yes; then
23275 ac_cv_tanh_preserves_zero_sign=no
23276else
23277 cat >conftest.$ac_ext <<_ACEOF
23278/* confdefs.h. */
23279_ACEOF
23280cat confdefs.h >>conftest.$ac_ext
23281cat >>conftest.$ac_ext <<_ACEOF
23282/* end confdefs.h. */
23283
23284#include <math.h>
23285#include <stdlib.h>
23286int main() {
23287 /* return 0 if either negative zeros don't exist
23288 on this platform or if negative zeros exist
23289 and tanh(-0.) == -0. */
23290 if (atan2(0., -1.) == atan2(-0., -1.) ||
23291 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23292 else exit(1);
23293}
23294
23295_ACEOF
23296rm -f conftest$ac_exeext
23297if { (ac_try="$ac_link"
23298case "(($ac_try" in
23299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23300 *) ac_try_echo=$ac_try;;
23301esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023303 (eval "$ac_link") 2>&5
23304 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023306 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23307 { (case "(($ac_try" in
23308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23309 *) ac_try_echo=$ac_try;;
23310esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023312 (eval "$ac_try") 2>&5
23313 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023315 (exit $ac_status); }; }; then
23316 ac_cv_tanh_preserves_zero_sign=yes
23317else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023318 echo "$as_me: program exited with status $ac_status" >&5
23319echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023320sed 's/^/| /' conftest.$ac_ext >&5
23321
23322( exit $ac_status )
23323ac_cv_tanh_preserves_zero_sign=no
23324fi
23325rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23326fi
23327
23328
23329fi
23330
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023331{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23332echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023333if test "$ac_cv_tanh_preserves_zero_sign" = yes
23334then
23335
23336cat >>confdefs.h <<\_ACEOF
23337#define TANH_PRESERVES_ZERO_SIGN 1
23338_ACEOF
23339
23340fi
23341
23342
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023343
Michael W. Hudson54241132001-12-07 15:38:26 +000023344
Christian Heimes99170a52007-12-19 02:07:34 +000023345
23346
23347
23348
23349
Mark Dickinsonf2537862009-04-18 13:58:18 +000023350
Mark Dickinson9c113362009-09-05 10:36:23 +000023351for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23352do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023353as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23354{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23355echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023356if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023357 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023358else
23359 cat >conftest.$ac_ext <<_ACEOF
23360/* confdefs.h. */
23361_ACEOF
23362cat confdefs.h >>conftest.$ac_ext
23363cat >>conftest.$ac_ext <<_ACEOF
23364/* end confdefs.h. */
23365/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23366 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23367#define $ac_func innocuous_$ac_func
23368
23369/* System header to define __stub macros and hopefully few prototypes,
23370 which can conflict with char $ac_func (); below.
23371 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23372 <limits.h> exists even on freestanding compilers. */
23373
23374#ifdef __STDC__
23375# include <limits.h>
23376#else
23377# include <assert.h>
23378#endif
23379
23380#undef $ac_func
23381
23382/* Override any GCC internal prototype to avoid an error.
23383 Use char because int might match the return type of a GCC
23384 builtin and then its argument prototype would still apply. */
23385#ifdef __cplusplus
23386extern "C"
23387#endif
23388char $ac_func ();
23389/* The GNU C library defines this for functions which it implements
23390 to always fail with ENOSYS. Some functions are actually named
23391 something starting with __ and the normal name is an alias. */
23392#if defined __stub_$ac_func || defined __stub___$ac_func
23393choke me
23394#endif
23395
23396int
23397main ()
23398{
23399return $ac_func ();
23400 ;
23401 return 0;
23402}
23403_ACEOF
23404rm -f conftest.$ac_objext conftest$ac_exeext
23405if { (ac_try="$ac_link"
23406case "(($ac_try" in
23407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23408 *) ac_try_echo=$ac_try;;
23409esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023411 (eval "$ac_link") 2>conftest.er1
23412 ac_status=$?
23413 grep -v '^ *+' conftest.er1 >conftest.err
23414 rm -f conftest.er1
23415 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023417 (exit $ac_status); } && {
23418 test -z "$ac_c_werror_flag" ||
23419 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023420 } && test -s conftest$ac_exeext &&
23421 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023422 eval "$as_ac_var=yes"
23423else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023424 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023425sed 's/^/| /' conftest.$ac_ext >&5
23426
23427 eval "$as_ac_var=no"
23428fi
23429
23430rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23431 conftest$ac_exeext conftest.$ac_ext
23432fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023433ac_res=`eval echo '${'$as_ac_var'}'`
23434 { echo "$as_me:$LINENO: result: $ac_res" >&5
23435echo "${ECHO_T}$ac_res" >&6; }
23436if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023437 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023438#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023439_ACEOF
23440
23441fi
23442done
23443
23444
23445
23446
23447
23448
23449for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023450do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023451as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23452{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23453echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023454if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023455 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023456else
23457 cat >conftest.$ac_ext <<_ACEOF
23458/* confdefs.h. */
23459_ACEOF
23460cat confdefs.h >>conftest.$ac_ext
23461cat >>conftest.$ac_ext <<_ACEOF
23462/* end confdefs.h. */
23463/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23464 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23465#define $ac_func innocuous_$ac_func
23466
23467/* System header to define __stub macros and hopefully few prototypes,
23468 which can conflict with char $ac_func (); below.
23469 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23470 <limits.h> exists even on freestanding compilers. */
23471
23472#ifdef __STDC__
23473# include <limits.h>
23474#else
23475# include <assert.h>
23476#endif
23477
23478#undef $ac_func
23479
23480/* Override any GCC internal prototype to avoid an error.
23481 Use char because int might match the return type of a GCC
23482 builtin and then its argument prototype would still apply. */
23483#ifdef __cplusplus
23484extern "C"
23485#endif
23486char $ac_func ();
23487/* The GNU C library defines this for functions which it implements
23488 to always fail with ENOSYS. Some functions are actually named
23489 something starting with __ and the normal name is an alias. */
23490#if defined __stub_$ac_func || defined __stub___$ac_func
23491choke me
23492#endif
23493
23494int
23495main ()
23496{
23497return $ac_func ();
23498 ;
23499 return 0;
23500}
23501_ACEOF
23502rm -f conftest.$ac_objext conftest$ac_exeext
23503if { (ac_try="$ac_link"
23504case "(($ac_try" in
23505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23506 *) ac_try_echo=$ac_try;;
23507esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023509 (eval "$ac_link") 2>conftest.er1
23510 ac_status=$?
23511 grep -v '^ *+' conftest.er1 >conftest.err
23512 rm -f conftest.er1
23513 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023515 (exit $ac_status); } && {
23516 test -z "$ac_c_werror_flag" ||
23517 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023518 } && test -s conftest$ac_exeext &&
23519 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023520 eval "$as_ac_var=yes"
23521else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023522 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023523sed 's/^/| /' conftest.$ac_ext >&5
23524
23525 eval "$as_ac_var=no"
23526fi
23527
23528rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23529 conftest$ac_exeext conftest.$ac_ext
23530fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023531ac_res=`eval echo '${'$as_ac_var'}'`
23532 { echo "$as_me:$LINENO: result: $ac_res" >&5
23533echo "${ECHO_T}$ac_res" >&6; }
23534if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023535 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023536#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023537_ACEOF
23538
23539fi
23540done
23541
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023542{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23543echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023544if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023545 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023546else
23547 cat >conftest.$ac_ext <<_ACEOF
23548/* confdefs.h. */
23549_ACEOF
23550cat confdefs.h >>conftest.$ac_ext
23551cat >>conftest.$ac_ext <<_ACEOF
23552/* end confdefs.h. */
23553#include <math.h>
23554
23555int
23556main ()
23557{
23558#ifndef isinf
23559 (void) isinf;
23560#endif
23561
23562 ;
23563 return 0;
23564}
23565_ACEOF
23566rm -f conftest.$ac_objext
23567if { (ac_try="$ac_compile"
23568case "(($ac_try" in
23569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23570 *) ac_try_echo=$ac_try;;
23571esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023573 (eval "$ac_compile") 2>conftest.er1
23574 ac_status=$?
23575 grep -v '^ *+' conftest.er1 >conftest.err
23576 rm -f conftest.er1
23577 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023579 (exit $ac_status); } && {
23580 test -z "$ac_c_werror_flag" ||
23581 test ! -s conftest.err
23582 } && test -s conftest.$ac_objext; then
23583 ac_cv_have_decl_isinf=yes
23584else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023585 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023586sed 's/^/| /' conftest.$ac_ext >&5
23587
23588 ac_cv_have_decl_isinf=no
23589fi
23590
23591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23592fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023593{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23594echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23595if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023596
23597cat >>confdefs.h <<_ACEOF
23598#define HAVE_DECL_ISINF 1
23599_ACEOF
23600
23601
23602else
23603 cat >>confdefs.h <<_ACEOF
23604#define HAVE_DECL_ISINF 0
23605_ACEOF
23606
23607
23608fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023609{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23610echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023611if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023612 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023613else
23614 cat >conftest.$ac_ext <<_ACEOF
23615/* confdefs.h. */
23616_ACEOF
23617cat confdefs.h >>conftest.$ac_ext
23618cat >>conftest.$ac_ext <<_ACEOF
23619/* end confdefs.h. */
23620#include <math.h>
23621
23622int
23623main ()
23624{
23625#ifndef isnan
23626 (void) isnan;
23627#endif
23628
23629 ;
23630 return 0;
23631}
23632_ACEOF
23633rm -f conftest.$ac_objext
23634if { (ac_try="$ac_compile"
23635case "(($ac_try" in
23636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23637 *) ac_try_echo=$ac_try;;
23638esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023640 (eval "$ac_compile") 2>conftest.er1
23641 ac_status=$?
23642 grep -v '^ *+' conftest.er1 >conftest.err
23643 rm -f conftest.er1
23644 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023646 (exit $ac_status); } && {
23647 test -z "$ac_c_werror_flag" ||
23648 test ! -s conftest.err
23649 } && test -s conftest.$ac_objext; then
23650 ac_cv_have_decl_isnan=yes
23651else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023652 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023653sed 's/^/| /' conftest.$ac_ext >&5
23654
23655 ac_cv_have_decl_isnan=no
23656fi
23657
23658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23659fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023660{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23661echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23662if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023663
23664cat >>confdefs.h <<_ACEOF
23665#define HAVE_DECL_ISNAN 1
23666_ACEOF
23667
23668
23669else
23670 cat >>confdefs.h <<_ACEOF
23671#define HAVE_DECL_ISNAN 0
23672_ACEOF
23673
23674
23675fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023676{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23677echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023678if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023679 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023680else
23681 cat >conftest.$ac_ext <<_ACEOF
23682/* confdefs.h. */
23683_ACEOF
23684cat confdefs.h >>conftest.$ac_ext
23685cat >>conftest.$ac_ext <<_ACEOF
23686/* end confdefs.h. */
23687#include <math.h>
23688
23689int
23690main ()
23691{
23692#ifndef isfinite
23693 (void) isfinite;
23694#endif
23695
23696 ;
23697 return 0;
23698}
23699_ACEOF
23700rm -f conftest.$ac_objext
23701if { (ac_try="$ac_compile"
23702case "(($ac_try" in
23703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23704 *) ac_try_echo=$ac_try;;
23705esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023707 (eval "$ac_compile") 2>conftest.er1
23708 ac_status=$?
23709 grep -v '^ *+' conftest.er1 >conftest.err
23710 rm -f conftest.er1
23711 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023713 (exit $ac_status); } && {
23714 test -z "$ac_c_werror_flag" ||
23715 test ! -s conftest.err
23716 } && test -s conftest.$ac_objext; then
23717 ac_cv_have_decl_isfinite=yes
23718else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023719 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023720sed 's/^/| /' conftest.$ac_ext >&5
23721
23722 ac_cv_have_decl_isfinite=no
23723fi
23724
23725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23726fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023727{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23728echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23729if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023730
23731cat >>confdefs.h <<_ACEOF
23732#define HAVE_DECL_ISFINITE 1
23733_ACEOF
23734
23735
23736else
23737 cat >>confdefs.h <<_ACEOF
23738#define HAVE_DECL_ISFINITE 0
23739_ACEOF
23740
23741
23742fi
23743
23744
Christian Heimes99170a52007-12-19 02:07:34 +000023745
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023746LIBS=$LIBS_SAVE
23747
Mark Dickinsona614f042009-11-28 12:48:43 +000023748# For multiprocessing module, check that sem_open
23749# actually works. For FreeBSD versions <= 7.2,
23750# the kernel module that provides POSIX semaphores
23751# isn't loaded by default, so an attempt to call
23752# sem_open results in a 'Signal 12' error.
23753{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
23754echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
23755if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
23756 echo $ECHO_N "(cached) $ECHO_C" >&6
23757else
23758 if test "$cross_compiling" = yes; then
23759 ac_cv_posix_semaphores_enabled=yes
23760else
23761 cat >conftest.$ac_ext <<_ACEOF
23762/* confdefs.h. */
23763_ACEOF
23764cat confdefs.h >>conftest.$ac_ext
23765cat >>conftest.$ac_ext <<_ACEOF
23766/* end confdefs.h. */
23767
23768#include <unistd.h>
23769#include <fcntl.h>
23770#include <stdio.h>
23771#include <semaphore.h>
23772#include <sys/stat.h>
23773
23774int main(void) {
23775 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23776 if (a == SEM_FAILED) {
23777 perror("sem_open");
23778 return 1;
23779 }
23780 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000023781 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000023782 return 0;
23783}
23784
23785_ACEOF
23786rm -f conftest$ac_exeext
23787if { (ac_try="$ac_link"
23788case "(($ac_try" in
23789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23790 *) ac_try_echo=$ac_try;;
23791esac
23792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23793 (eval "$ac_link") 2>&5
23794 ac_status=$?
23795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23796 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23797 { (case "(($ac_try" in
23798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23799 *) ac_try_echo=$ac_try;;
23800esac
23801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23802 (eval "$ac_try") 2>&5
23803 ac_status=$?
23804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23805 (exit $ac_status); }; }; then
23806 ac_cv_posix_semaphores_enabled=yes
23807else
23808 echo "$as_me: program exited with status $ac_status" >&5
23809echo "$as_me: failed program was:" >&5
23810sed 's/^/| /' conftest.$ac_ext >&5
23811
23812( exit $ac_status )
23813ac_cv_posix_semaphores_enabled=no
23814fi
23815rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23816fi
23817
23818
23819
23820fi
23821
23822{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
23823echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
23824if test $ac_cv_posix_semaphores_enabled = no
23825then
23826
23827cat >>confdefs.h <<\_ACEOF
23828#define POSIX_SEMAPHORES_NOT_ENABLED 1
23829_ACEOF
23830
23831fi
23832
Mark Dickinson10683072009-04-18 21:18:19 +000023833# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023834{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23835echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023836if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023837 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023838else
23839 if test "$cross_compiling" = yes; then
23840 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000023841else
23842 cat >conftest.$ac_ext <<_ACEOF
23843/* confdefs.h. */
23844_ACEOF
23845cat confdefs.h >>conftest.$ac_ext
23846cat >>conftest.$ac_ext <<_ACEOF
23847/* end confdefs.h. */
23848
23849#include <unistd.h>
23850#include <fcntl.h>
23851#include <stdio.h>
23852#include <semaphore.h>
23853#include <sys/stat.h>
23854
23855int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000023856 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000023857 int count;
23858 int res;
23859 if(a==SEM_FAILED){
23860 perror("sem_open");
23861 return 1;
23862
23863 }
23864 res = sem_getvalue(a, &count);
23865 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000023866 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000023867 return res==-1 ? 1 : 0;
23868}
23869
Mark Dickinson10683072009-04-18 21:18:19 +000023870_ACEOF
23871rm -f conftest$ac_exeext
23872if { (ac_try="$ac_link"
23873case "(($ac_try" in
23874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23875 *) ac_try_echo=$ac_try;;
23876esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023878 (eval "$ac_link") 2>&5
23879 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023881 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23882 { (case "(($ac_try" in
23883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23884 *) ac_try_echo=$ac_try;;
23885esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023887 (eval "$ac_try") 2>&5
23888 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023890 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023891 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000023892else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023893 echo "$as_me: program exited with status $ac_status" >&5
23894echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023895sed 's/^/| /' conftest.$ac_ext >&5
23896
23897( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023898ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023899fi
23900rm -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 +000023901fi
23902
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023903
23904
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023905fi
23906
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023907{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23908echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023909if test $ac_cv_broken_sem_getvalue = yes
23910then
23911
23912cat >>confdefs.h <<\_ACEOF
23913#define HAVE_BROKEN_SEM_GETVALUE 1
23914_ACEOF
23915
23916fi
23917
Mark Dickinsonbd792642009-03-18 20:06:12 +000023918# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023919{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23920echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023921# Check whether --enable-big-digits was given.
23922if test "${enable_big_digits+set}" = set; then
23923 enableval=$enable_big_digits; case $enable_big_digits in
23924yes)
23925 enable_big_digits=30 ;;
23926no)
23927 enable_big_digits=15 ;;
2392815|30)
23929 ;;
23930*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023931 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23932echo "$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 +000023933 { (exit 1); exit 1; }; } ;;
23934esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023935{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23936echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023937
23938cat >>confdefs.h <<_ACEOF
23939#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23940_ACEOF
23941
23942
23943else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023944 { echo "$as_me:$LINENO: result: no value specified" >&5
23945echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023946fi
23947
23948
Guido van Rossumef2255b2000-03-10 22:30:29 +000023949# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023950if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023951 { echo "$as_me:$LINENO: checking for wchar.h" >&5
23952echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023953if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023954 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023955fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023956{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23957echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023958else
Martin v. Löwis11437992002-04-12 09:54:03 +000023959 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023960{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23961echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023962cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023963/* confdefs.h. */
23964_ACEOF
23965cat confdefs.h >>conftest.$ac_ext
23966cat >>conftest.$ac_ext <<_ACEOF
23967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023968$ac_includes_default
23969#include <wchar.h>
23970_ACEOF
23971rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023972if { (ac_try="$ac_compile"
23973case "(($ac_try" in
23974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23975 *) ac_try_echo=$ac_try;;
23976esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023978 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023980 grep -v '^ *+' conftest.er1 >conftest.err
23981 rm -f conftest.er1
23982 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023984 (exit $ac_status); } && {
23985 test -z "$ac_c_werror_flag" ||
23986 test ! -s conftest.err
23987 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023988 ac_header_compiler=yes
23989else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023991sed 's/^/| /' conftest.$ac_ext >&5
23992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023993 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023994fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023995
23996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023997{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23998echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023999
24000# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024001{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24002echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024003cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024004/* confdefs.h. */
24005_ACEOF
24006cat confdefs.h >>conftest.$ac_ext
24007cat >>conftest.$ac_ext <<_ACEOF
24008/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024009#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024010_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024011if { (ac_try="$ac_cpp conftest.$ac_ext"
24012case "(($ac_try" in
24013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24014 *) ac_try_echo=$ac_try;;
24015esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024017 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024018 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024019 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024020 rm -f conftest.er1
24021 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024023 (exit $ac_status); } >/dev/null && {
24024 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24025 test ! -s conftest.err
24026 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024027 ac_header_preproc=yes
24028else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024030sed 's/^/| /' conftest.$ac_ext >&5
24031
Martin v. Löwis11437992002-04-12 09:54:03 +000024032 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024034
Martin v. Löwis11437992002-04-12 09:54:03 +000024035rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024036{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24037echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024038
24039# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024040case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24041 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024042 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24043echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24044 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24045echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024046 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024047 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024048 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024049 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24050echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24051 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24052echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24053 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24054echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24055 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24056echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24057 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24058echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24059 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24060echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024061 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024062## -------------------------------------- ##
24063## Report this to http://bugs.python.org/ ##
24064## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024065_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024066 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024067 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024068esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024069{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24070echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024071if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024072 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024073else
24074 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024075fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024076{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24077echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024078
24079fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024080if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024081
24082
24083cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024084#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024085_ACEOF
24086
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024087 wchar_h="yes"
24088
Guido van Rossumef2255b2000-03-10 22:30:29 +000024089else
Martin v. Löwis11437992002-04-12 09:54:03 +000024090 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024091
24092fi
24093
Michael W. Hudson54241132001-12-07 15:38:26 +000024094
Martin v. Löwis11437992002-04-12 09:54:03 +000024095
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024096# determine wchar_t size
24097if test "$wchar_h" = yes
24098then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024099 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24100echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24101if test "${ac_cv_type_wchar_t+set}" = set; then
24102 echo $ECHO_N "(cached) $ECHO_C" >&6
24103else
24104 cat >conftest.$ac_ext <<_ACEOF
24105/* confdefs.h. */
24106_ACEOF
24107cat confdefs.h >>conftest.$ac_ext
24108cat >>conftest.$ac_ext <<_ACEOF
24109/* end confdefs.h. */
24110#include <wchar.h>
24111
24112typedef wchar_t ac__type_new_;
24113int
24114main ()
24115{
24116if ((ac__type_new_ *) 0)
24117 return 0;
24118if (sizeof (ac__type_new_))
24119 return 0;
24120 ;
24121 return 0;
24122}
24123_ACEOF
24124rm -f conftest.$ac_objext
24125if { (ac_try="$ac_compile"
24126case "(($ac_try" in
24127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24128 *) ac_try_echo=$ac_try;;
24129esac
24130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24131 (eval "$ac_compile") 2>conftest.er1
24132 ac_status=$?
24133 grep -v '^ *+' conftest.er1 >conftest.err
24134 rm -f conftest.er1
24135 cat conftest.err >&5
24136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24137 (exit $ac_status); } && {
24138 test -z "$ac_c_werror_flag" ||
24139 test ! -s conftest.err
24140 } && test -s conftest.$ac_objext; then
24141 ac_cv_type_wchar_t=yes
24142else
24143 echo "$as_me: failed program was:" >&5
24144sed 's/^/| /' conftest.$ac_ext >&5
24145
24146 ac_cv_type_wchar_t=no
24147fi
24148
24149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24150fi
24151{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24152echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24153
24154# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024155# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24156# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24157# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024158{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24159echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024160if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024161 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024162else
Martin v. Löwis11437992002-04-12 09:54:03 +000024163 if test "$cross_compiling" = yes; then
24164 # Depending upon the size, compute the lo and hi bounds.
24165cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024166/* confdefs.h. */
24167_ACEOF
24168cat confdefs.h >>conftest.$ac_ext
24169cat >>conftest.$ac_ext <<_ACEOF
24170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024171#include <wchar.h>
24172
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024173 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024174int
24175main ()
24176{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024177static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024178test_array [0] = 0
24179
24180 ;
24181 return 0;
24182}
24183_ACEOF
24184rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024185if { (ac_try="$ac_compile"
24186case "(($ac_try" in
24187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24188 *) ac_try_echo=$ac_try;;
24189esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024191 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024193 grep -v '^ *+' conftest.er1 >conftest.err
24194 rm -f conftest.er1
24195 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024197 (exit $ac_status); } && {
24198 test -z "$ac_c_werror_flag" ||
24199 test ! -s conftest.err
24200 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024201 ac_lo=0 ac_mid=0
24202 while :; do
24203 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024204/* confdefs.h. */
24205_ACEOF
24206cat confdefs.h >>conftest.$ac_ext
24207cat >>conftest.$ac_ext <<_ACEOF
24208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024209#include <wchar.h>
24210
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024211 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024212int
24213main ()
24214{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024215static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024216test_array [0] = 0
24217
24218 ;
24219 return 0;
24220}
24221_ACEOF
24222rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024223if { (ac_try="$ac_compile"
24224case "(($ac_try" in
24225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24226 *) ac_try_echo=$ac_try;;
24227esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024229 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024230 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024231 grep -v '^ *+' conftest.er1 >conftest.err
24232 rm -f conftest.er1
24233 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024235 (exit $ac_status); } && {
24236 test -z "$ac_c_werror_flag" ||
24237 test ! -s conftest.err
24238 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024239 ac_hi=$ac_mid; break
24240else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024241 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024242sed 's/^/| /' conftest.$ac_ext >&5
24243
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024244 ac_lo=`expr $ac_mid + 1`
24245 if test $ac_lo -le $ac_mid; then
24246 ac_lo= ac_hi=
24247 break
24248 fi
24249 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024251
24252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024253 done
24254else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024255 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024256sed 's/^/| /' conftest.$ac_ext >&5
24257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024258 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024259/* confdefs.h. */
24260_ACEOF
24261cat confdefs.h >>conftest.$ac_ext
24262cat >>conftest.$ac_ext <<_ACEOF
24263/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024264#include <wchar.h>
24265
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024266 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024267int
24268main ()
24269{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024270static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024271test_array [0] = 0
24272
24273 ;
24274 return 0;
24275}
24276_ACEOF
24277rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024278if { (ac_try="$ac_compile"
24279case "(($ac_try" in
24280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24281 *) ac_try_echo=$ac_try;;
24282esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024284 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024285 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024286 grep -v '^ *+' conftest.er1 >conftest.err
24287 rm -f conftest.er1
24288 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024290 (exit $ac_status); } && {
24291 test -z "$ac_c_werror_flag" ||
24292 test ! -s conftest.err
24293 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024294 ac_hi=-1 ac_mid=-1
24295 while :; do
24296 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024297/* confdefs.h. */
24298_ACEOF
24299cat confdefs.h >>conftest.$ac_ext
24300cat >>conftest.$ac_ext <<_ACEOF
24301/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024302#include <wchar.h>
24303
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024304 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024305int
24306main ()
24307{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024308static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024309test_array [0] = 0
24310
24311 ;
24312 return 0;
24313}
24314_ACEOF
24315rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024316if { (ac_try="$ac_compile"
24317case "(($ac_try" in
24318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24319 *) ac_try_echo=$ac_try;;
24320esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024322 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024323 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024324 grep -v '^ *+' conftest.er1 >conftest.err
24325 rm -f conftest.er1
24326 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024328 (exit $ac_status); } && {
24329 test -z "$ac_c_werror_flag" ||
24330 test ! -s conftest.err
24331 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024332 ac_lo=$ac_mid; break
24333else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024335sed 's/^/| /' conftest.$ac_ext >&5
24336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024337 ac_hi=`expr '(' $ac_mid ')' - 1`
24338 if test $ac_mid -le $ac_hi; then
24339 ac_lo= ac_hi=
24340 break
24341 fi
24342 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024344
24345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024346 done
24347else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024349sed 's/^/| /' conftest.$ac_ext >&5
24350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024351 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024353
24354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024356
24357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024358# Binary search between lo and hi bounds.
24359while test "x$ac_lo" != "x$ac_hi"; do
24360 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024362/* confdefs.h. */
24363_ACEOF
24364cat confdefs.h >>conftest.$ac_ext
24365cat >>conftest.$ac_ext <<_ACEOF
24366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024367#include <wchar.h>
24368
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024369 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024370int
24371main ()
24372{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024373static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024374test_array [0] = 0
24375
24376 ;
24377 return 0;
24378}
24379_ACEOF
24380rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024381if { (ac_try="$ac_compile"
24382case "(($ac_try" in
24383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24384 *) ac_try_echo=$ac_try;;
24385esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024387 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024389 grep -v '^ *+' conftest.er1 >conftest.err
24390 rm -f conftest.er1
24391 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024393 (exit $ac_status); } && {
24394 test -z "$ac_c_werror_flag" ||
24395 test ! -s conftest.err
24396 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024397 ac_hi=$ac_mid
24398else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024400sed 's/^/| /' conftest.$ac_ext >&5
24401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024402 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024404
24405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024406done
24407case $ac_lo in
24408?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024409'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024410 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024411See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024412echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024413See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024414 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024415 else
24416 ac_cv_sizeof_wchar_t=0
24417 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024418esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024419else
Martin v. Löwis11437992002-04-12 09:54:03 +000024420 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024421/* confdefs.h. */
24422_ACEOF
24423cat confdefs.h >>conftest.$ac_ext
24424cat >>conftest.$ac_ext <<_ACEOF
24425/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024426#include <wchar.h>
24427
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024428 typedef wchar_t ac__type_sizeof_;
24429static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24430static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024431#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024432#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024433int
24434main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024435{
Martin v. Löwis11437992002-04-12 09:54:03 +000024436
24437 FILE *f = fopen ("conftest.val", "w");
24438 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024439 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024440 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024441 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024442 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024443 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024444 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024445 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024446 }
24447 else
24448 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024449 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024450 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024451 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024452 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024453 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024454 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024455
24456 ;
24457 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024458}
Martin v. Löwis11437992002-04-12 09:54:03 +000024459_ACEOF
24460rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024461if { (ac_try="$ac_link"
24462case "(($ac_try" in
24463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24464 *) ac_try_echo=$ac_try;;
24465esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024467 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024468 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024470 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024471 { (case "(($ac_try" in
24472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24473 *) ac_try_echo=$ac_try;;
24474esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024476 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024477 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024479 (exit $ac_status); }; }; then
24480 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024481else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024482 echo "$as_me: program exited with status $ac_status" >&5
24483echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024484sed 's/^/| /' conftest.$ac_ext >&5
24485
Martin v. Löwis11437992002-04-12 09:54:03 +000024486( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024487if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024488 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024489See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024490echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024491See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024492 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024493 else
24494 ac_cv_sizeof_wchar_t=0
24495 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024497rm -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 +000024498fi
24499rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024500fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024501{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24502echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024503
24504
24505
Martin v. Löwis11437992002-04-12 09:54:03 +000024506cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024507#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024508_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024509
Michael W. Hudson54241132001-12-07 15:38:26 +000024510
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024511fi
24512
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024513{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24514echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024515have_ucs4_tcl=no
24516cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024517/* confdefs.h. */
24518_ACEOF
24519cat confdefs.h >>conftest.$ac_ext
24520cat >>conftest.$ac_ext <<_ACEOF
24521/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024522
24523#include <tcl.h>
24524#if TCL_UTF_MAX != 6
24525# error "NOT UCS4_TCL"
24526#endif
24527int
24528main ()
24529{
24530
24531 ;
24532 return 0;
24533}
24534_ACEOF
24535rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024536if { (ac_try="$ac_compile"
24537case "(($ac_try" in
24538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24539 *) ac_try_echo=$ac_try;;
24540esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024542 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024544 grep -v '^ *+' conftest.er1 >conftest.err
24545 rm -f conftest.er1
24546 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024548 (exit $ac_status); } && {
24549 test -z "$ac_c_werror_flag" ||
24550 test ! -s conftest.err
24551 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024552
24553
24554cat >>confdefs.h <<\_ACEOF
24555#define HAVE_UCS4_TCL 1
24556_ACEOF
24557
24558 have_ucs4_tcl=yes
24559
24560else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024561 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024562sed 's/^/| /' conftest.$ac_ext >&5
24563
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024564
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024566
24567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024568{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24569echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024570
Skip Montanaro6dead952003-09-25 14:50:04 +000024571# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024572if test "$wchar_h" = yes
24573then
24574 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024575 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24576echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024577 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024578 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024579else
24580
24581 if test "$cross_compiling" = yes; then
24582 ac_cv_wchar_t_signed=yes
24583else
24584 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. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024590
24591 #include <wchar.h>
24592 int main()
24593 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024594 /* Success: exit code 0 */
24595 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024596 }
24597
24598_ACEOF
24599rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024600if { (ac_try="$ac_link"
24601case "(($ac_try" in
24602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24603 *) ac_try_echo=$ac_try;;
24604esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024606 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024607 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024609 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024610 { (case "(($ac_try" in
24611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24612 *) ac_try_echo=$ac_try;;
24613esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024615 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024616 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024618 (exit $ac_status); }; }; then
24619 ac_cv_wchar_t_signed=yes
24620else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024621 echo "$as_me: program exited with status $ac_status" >&5
24622echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024623sed 's/^/| /' conftest.$ac_ext >&5
24624
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024625( exit $ac_status )
24626ac_cv_wchar_t_signed=no
24627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024628rm -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 +000024629fi
24630
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024631
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024632fi
24633
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024634 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24635echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024636fi
24637
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024638{ echo "$as_me:$LINENO: checking what type to use for str" >&5
24639echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000024640
24641# Check whether --with-wide-unicode was given.
24642if test "${with_wide_unicode+set}" = set; then
24643 withval=$with_wide_unicode;
24644if test "$withval" != no
24645then unicode_size="4"
24646else unicode_size="2"
24647fi
24648
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024649else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024650
Georg Brandl52d168a2008-01-07 18:10:24 +000024651case "$have_ucs4_tcl" in
24652 yes) unicode_size="4" ;;
24653 *) unicode_size="2" ;;
24654esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024655
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024656fi
24657
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024658
24659
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024660
Georg Brandl52d168a2008-01-07 18:10:24 +000024661case "$unicode_size" in
24662 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024663#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024664_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000024665 ;;
24666 *) cat >>confdefs.h <<\_ACEOF
24667#define Py_UNICODE_SIZE 2
24668_ACEOF
24669 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024670esac
24671
Michael W. Hudson54241132001-12-07 15:38:26 +000024672
Martin v. Löwis11437992002-04-12 09:54:03 +000024673
24674
Georg Brandl52d168a2008-01-07 18:10:24 +000024675# wchar_t is only usable if it maps to an unsigned type
24676if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024677 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000024678then
24679 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024680
Martin v. Löwis11437992002-04-12 09:54:03 +000024681cat >>confdefs.h <<\_ACEOF
24682#define HAVE_USABLE_WCHAR_T 1
24683_ACEOF
24684
Georg Brandl52d168a2008-01-07 18:10:24 +000024685 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024686#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024687_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024688
Georg Brandl52d168a2008-01-07 18:10:24 +000024689elif test "$ac_cv_sizeof_short" = "$unicode_size"
24690then
24691 PY_UNICODE_TYPE="unsigned short"
24692 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024693#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024694_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024695
Georg Brandl52d168a2008-01-07 18:10:24 +000024696elif test "$ac_cv_sizeof_long" = "$unicode_size"
24697then
24698 PY_UNICODE_TYPE="unsigned long"
24699 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024700#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024701_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024702
Georg Brandl52d168a2008-01-07 18:10:24 +000024703else
24704 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024705fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024706{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24707echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024708
24709# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024710{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24711echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024712if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024713 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024714else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024715 # See if sys/param.h defines the BYTE_ORDER macro.
24716cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024717/* confdefs.h. */
24718_ACEOF
24719cat confdefs.h >>conftest.$ac_ext
24720cat >>conftest.$ac_ext <<_ACEOF
24721/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024722#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024723#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024724
Martin v. Löwis11437992002-04-12 09:54:03 +000024725int
24726main ()
24727{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024728#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24729 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24730 bogus endian macros
24731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024732
24733 ;
24734 return 0;
24735}
24736_ACEOF
24737rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024738if { (ac_try="$ac_compile"
24739case "(($ac_try" in
24740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24741 *) ac_try_echo=$ac_try;;
24742esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024744 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024746 grep -v '^ *+' conftest.er1 >conftest.err
24747 rm -f conftest.er1
24748 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024750 (exit $ac_status); } && {
24751 test -z "$ac_c_werror_flag" ||
24752 test ! -s conftest.err
24753 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024754 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024755cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024756/* confdefs.h. */
24757_ACEOF
24758cat confdefs.h >>conftest.$ac_ext
24759cat >>conftest.$ac_ext <<_ACEOF
24760/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024761#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024762#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024763
Martin v. Löwis11437992002-04-12 09:54:03 +000024764int
24765main ()
24766{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024767#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024768 not big endian
24769#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024770
24771 ;
24772 return 0;
24773}
24774_ACEOF
24775rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024776if { (ac_try="$ac_compile"
24777case "(($ac_try" in
24778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24779 *) ac_try_echo=$ac_try;;
24780esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024782 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024783 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024784 grep -v '^ *+' conftest.er1 >conftest.err
24785 rm -f conftest.er1
24786 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024788 (exit $ac_status); } && {
24789 test -z "$ac_c_werror_flag" ||
24790 test ! -s conftest.err
24791 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024792 ac_cv_c_bigendian=yes
24793else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024795sed 's/^/| /' conftest.$ac_ext >&5
24796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024797 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024799
24800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024801else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024802 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024803sed 's/^/| /' conftest.$ac_ext >&5
24804
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024805 # It does not; compile a test program.
24806if test "$cross_compiling" = yes; then
24807 # try to guess the endianness by grepping values into an object file
24808 ac_cv_c_bigendian=unknown
24809 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024810/* confdefs.h. */
24811_ACEOF
24812cat confdefs.h >>conftest.$ac_ext
24813cat >>conftest.$ac_ext <<_ACEOF
24814/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024815short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24816short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24817void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24818short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24819short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24820void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024821int
24822main ()
24823{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024824 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024825 ;
24826 return 0;
24827}
24828_ACEOF
24829rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024830if { (ac_try="$ac_compile"
24831case "(($ac_try" in
24832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24833 *) ac_try_echo=$ac_try;;
24834esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024836 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024838 grep -v '^ *+' conftest.er1 >conftest.err
24839 rm -f conftest.er1
24840 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024842 (exit $ac_status); } && {
24843 test -z "$ac_c_werror_flag" ||
24844 test ! -s conftest.err
24845 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024846 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024847 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024848fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024849if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24850 if test "$ac_cv_c_bigendian" = unknown; then
24851 ac_cv_c_bigendian=no
24852 else
24853 # finding both strings is unlikely to happen, but who knows?
24854 ac_cv_c_bigendian=unknown
24855 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024856fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024857else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024859sed 's/^/| /' conftest.$ac_ext >&5
24860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024861
Martin v. Löwis11437992002-04-12 09:54:03 +000024862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024863
24864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024865else
24866 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024867/* confdefs.h. */
24868_ACEOF
24869cat confdefs.h >>conftest.$ac_ext
24870cat >>conftest.$ac_ext <<_ACEOF
24871/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024872$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024873int
24874main ()
24875{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024876
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024877 /* Are we little or big endian? From Harbison&Steele. */
24878 union
24879 {
24880 long int l;
24881 char c[sizeof (long int)];
24882 } u;
24883 u.l = 1;
24884 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024885
24886 ;
24887 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024888}
Martin v. Löwis11437992002-04-12 09:54:03 +000024889_ACEOF
24890rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024891if { (ac_try="$ac_link"
24892case "(($ac_try" in
24893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24894 *) ac_try_echo=$ac_try;;
24895esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024897 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024898 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024900 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024901 { (case "(($ac_try" in
24902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24903 *) ac_try_echo=$ac_try;;
24904esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024906 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024907 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024909 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024910 ac_cv_c_bigendian=no
24911else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024912 echo "$as_me: program exited with status $ac_status" >&5
24913echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024914sed 's/^/| /' conftest.$ac_ext >&5
24915
Martin v. Löwis11437992002-04-12 09:54:03 +000024916( exit $ac_status )
24917ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024919rm -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 +000024920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024921
24922
Martin v. Löwis11437992002-04-12 09:54:03 +000024923fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024924
24925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24926fi
24927{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24928echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
24929case $ac_cv_c_bigendian in
24930 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024931
24932cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024933#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024934_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024935 ;;
24936 no)
24937 ;;
24938 *)
24939 { { echo "$as_me:$LINENO: error: unknown endianness
24940presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24941echo "$as_me: error: unknown endianness
24942presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024943 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024944esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024945
Michael W. Hudson54241132001-12-07 15:38:26 +000024946
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024947# Check whether right shifting a negative integer extends the sign bit
24948# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024949{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24950echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024951if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024952 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024953else
Martin v. Löwis11437992002-04-12 09:54:03 +000024954
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024955if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024956 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024957else
Martin v. Löwis11437992002-04-12 09:54:03 +000024958 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024959/* confdefs.h. */
24960_ACEOF
24961cat confdefs.h >>conftest.$ac_ext
24962cat >>conftest.$ac_ext <<_ACEOF
24963/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024964
24965int main()
24966{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024967 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024968}
24969
Martin v. Löwis11437992002-04-12 09:54:03 +000024970_ACEOF
24971rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024972if { (ac_try="$ac_link"
24973case "(($ac_try" in
24974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24975 *) ac_try_echo=$ac_try;;
24976esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024978 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024979 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024981 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024982 { (case "(($ac_try" in
24983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24984 *) ac_try_echo=$ac_try;;
24985esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024987 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024988 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024990 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024991 ac_cv_rshift_extends_sign=yes
24992else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024993 echo "$as_me: program exited with status $ac_status" >&5
24994echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024995sed 's/^/| /' conftest.$ac_ext >&5
24996
Martin v. Löwis11437992002-04-12 09:54:03 +000024997( exit $ac_status )
24998ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025000rm -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 +000025001fi
25002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025003
25004fi
25005
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025006{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25007echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025008if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025009then
Martin v. Löwis11437992002-04-12 09:54:03 +000025010
25011cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025012#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025013_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025014
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025015fi
25016
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025017# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025018{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25019echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025020if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025021 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025022else
Martin v. Löwis11437992002-04-12 09:54:03 +000025023
25024cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025025/* confdefs.h. */
25026_ACEOF
25027cat confdefs.h >>conftest.$ac_ext
25028cat >>conftest.$ac_ext <<_ACEOF
25029/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025030#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025031int
25032main ()
25033{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025034
25035 FILE *f = fopen("/dev/null", "r");
25036 flockfile(f);
25037 getc_unlocked(f);
25038 funlockfile(f);
25039
Martin v. Löwis11437992002-04-12 09:54:03 +000025040 ;
25041 return 0;
25042}
25043_ACEOF
25044rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025045if { (ac_try="$ac_link"
25046case "(($ac_try" in
25047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25048 *) ac_try_echo=$ac_try;;
25049esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025051 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025052 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025053 grep -v '^ *+' conftest.er1 >conftest.err
25054 rm -f conftest.er1
25055 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025057 (exit $ac_status); } && {
25058 test -z "$ac_c_werror_flag" ||
25059 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025060 } && test -s conftest$ac_exeext &&
25061 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025062 ac_cv_have_getc_unlocked=yes
25063else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025065sed 's/^/| /' conftest.$ac_ext >&5
25066
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025067 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025069
25070rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025071 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025072fi
25073
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025074{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25075echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025076if test "$ac_cv_have_getc_unlocked" = yes
25077then
Martin v. Löwis11437992002-04-12 09:54:03 +000025078
25079cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025080#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025081_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025082
25083fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025084
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025085# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025086# save the value of LIBS so we don't actually link Python with readline
25087LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025088
Gregory P. Smith18820942008-09-07 06:24:49 +000025089# On some systems we need to link readline to a termcap compatible
25090# library. NOTE: Keep the precedence of listed libraries synchronised
25091# with setup.py.
25092py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025093{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25094echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025095for py_libtermcap in "" ncursesw ncurses curses termcap; do
25096 if test -z "$py_libtermcap"; then
25097 READLINE_LIBS="-lreadline"
25098 else
25099 READLINE_LIBS="-lreadline -l$py_libtermcap"
25100 fi
25101 LIBS="$READLINE_LIBS $LIBS_no_readline"
25102 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025103/* confdefs.h. */
25104_ACEOF
25105cat confdefs.h >>conftest.$ac_ext
25106cat >>conftest.$ac_ext <<_ACEOF
25107/* end confdefs.h. */
25108
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025109/* Override any GCC internal prototype to avoid an error.
25110 Use char because int might match the return type of a GCC
25111 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025112#ifdef __cplusplus
25113extern "C"
25114#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025115char readline ();
25116int
25117main ()
25118{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025119return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025120 ;
25121 return 0;
25122}
25123_ACEOF
25124rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025125if { (ac_try="$ac_link"
25126case "(($ac_try" in
25127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25128 *) ac_try_echo=$ac_try;;
25129esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025131 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025132 ac_status=$?
25133 grep -v '^ *+' conftest.er1 >conftest.err
25134 rm -f conftest.er1
25135 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025137 (exit $ac_status); } && {
25138 test -z "$ac_c_werror_flag" ||
25139 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025140 } && test -s conftest$ac_exeext &&
25141 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025142 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025143else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025144 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025145sed 's/^/| /' conftest.$ac_ext >&5
25146
Gregory P. Smith18820942008-09-07 06:24:49 +000025147
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025149
25150rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025151 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025152 if test $py_cv_lib_readline = yes; then
25153 break
25154 fi
25155done
25156# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25157#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025158if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025159 { echo "$as_me:$LINENO: result: none" >&5
25160echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025161else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025162 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25163echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025164
25165cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025166#define HAVE_LIBREADLINE 1
25167_ACEOF
25168
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025169fi
25170
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025171# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025172{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25173echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025174if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025175 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025176else
25177 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025178LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025179cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025180/* confdefs.h. */
25181_ACEOF
25182cat confdefs.h >>conftest.$ac_ext
25183cat >>conftest.$ac_ext <<_ACEOF
25184/* end confdefs.h. */
25185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025186/* Override any GCC internal prototype to avoid an error.
25187 Use char because int might match the return type of a GCC
25188 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025189#ifdef __cplusplus
25190extern "C"
25191#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025192char rl_callback_handler_install ();
25193int
25194main ()
25195{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025196return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025197 ;
25198 return 0;
25199}
25200_ACEOF
25201rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025202if { (ac_try="$ac_link"
25203case "(($ac_try" in
25204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25205 *) ac_try_echo=$ac_try;;
25206esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025208 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025210 grep -v '^ *+' conftest.er1 >conftest.err
25211 rm -f conftest.er1
25212 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025214 (exit $ac_status); } && {
25215 test -z "$ac_c_werror_flag" ||
25216 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025217 } && test -s conftest$ac_exeext &&
25218 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025219 ac_cv_lib_readline_rl_callback_handler_install=yes
25220else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025221 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025222sed 's/^/| /' conftest.$ac_ext >&5
25223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025224 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025226
25227rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025228 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025229LIBS=$ac_check_lib_save_LIBS
25230fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025231{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25232echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25233if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025234
25235cat >>confdefs.h <<\_ACEOF
25236#define HAVE_RL_CALLBACK 1
25237_ACEOF
25238
25239fi
25240
25241
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025242# check for readline 2.2
25243cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025244/* confdefs.h. */
25245_ACEOF
25246cat confdefs.h >>conftest.$ac_ext
25247cat >>conftest.$ac_ext <<_ACEOF
25248/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025249#include <readline/readline.h>
25250_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025251if { (ac_try="$ac_cpp conftest.$ac_ext"
25252case "(($ac_try" in
25253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25254 *) ac_try_echo=$ac_try;;
25255esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025257 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025258 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025259 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025260 rm -f conftest.er1
25261 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025263 (exit $ac_status); } >/dev/null && {
25264 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25265 test ! -s conftest.err
25266 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025267 have_readline=yes
25268else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025269 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025270sed 's/^/| /' conftest.$ac_ext >&5
25271
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025272 have_readline=no
25273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025274
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025275rm -f conftest.err conftest.$ac_ext
25276if test $have_readline = yes
25277then
25278 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025279/* confdefs.h. */
25280_ACEOF
25281cat confdefs.h >>conftest.$ac_ext
25282cat >>conftest.$ac_ext <<_ACEOF
25283/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025284#include <readline/readline.h>
25285
25286_ACEOF
25287if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025288 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025289
25290cat >>confdefs.h <<\_ACEOF
25291#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25292_ACEOF
25293
25294fi
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000025295rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025296
Antoine Pitroud5131772009-10-26 19:22:14 +000025297 cat >conftest.$ac_ext <<_ACEOF
25298/* confdefs.h. */
25299_ACEOF
25300cat confdefs.h >>conftest.$ac_ext
25301cat >>conftest.$ac_ext <<_ACEOF
25302/* end confdefs.h. */
25303#include <readline/readline.h>
25304
25305_ACEOF
25306if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25307 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25308
25309cat >>confdefs.h <<\_ACEOF
25310#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25311_ACEOF
25312
25313fi
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000025314rm -f -r conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000025315
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025316fi
25317
Martin v. Löwis0daad592001-09-30 21:09:59 +000025318# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025319{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25320echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025321if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025323else
Martin v. Löwis11437992002-04-12 09:54:03 +000025324 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025325LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025327/* confdefs.h. */
25328_ACEOF
25329cat confdefs.h >>conftest.$ac_ext
25330cat >>conftest.$ac_ext <<_ACEOF
25331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025333/* Override any GCC internal prototype to avoid an error.
25334 Use char because int might match the return type of a GCC
25335 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025336#ifdef __cplusplus
25337extern "C"
25338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025339char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025340int
25341main ()
25342{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025343return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025344 ;
25345 return 0;
25346}
25347_ACEOF
25348rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025349if { (ac_try="$ac_link"
25350case "(($ac_try" in
25351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25352 *) ac_try_echo=$ac_try;;
25353esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025355 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025357 grep -v '^ *+' conftest.er1 >conftest.err
25358 rm -f conftest.er1
25359 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025361 (exit $ac_status); } && {
25362 test -z "$ac_c_werror_flag" ||
25363 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025364 } && test -s conftest$ac_exeext &&
25365 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025366 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025367else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025369sed 's/^/| /' conftest.$ac_ext >&5
25370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025371 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025373
25374rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025375 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025376LIBS=$ac_check_lib_save_LIBS
25377fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025378{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25379echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25380if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025381
Martin v. Löwis11437992002-04-12 09:54:03 +000025382cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025383#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025384_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025385
Martin v. Löwis0daad592001-09-30 21:09:59 +000025386fi
25387
Michael W. Hudson54241132001-12-07 15:38:26 +000025388
Thomas Wouters89d996e2007-09-08 17:39:28 +000025389# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025390{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25391echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025392if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025393 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025394else
25395 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025396LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025397cat >conftest.$ac_ext <<_ACEOF
25398/* confdefs.h. */
25399_ACEOF
25400cat confdefs.h >>conftest.$ac_ext
25401cat >>conftest.$ac_ext <<_ACEOF
25402/* end confdefs.h. */
25403
25404/* Override any GCC internal prototype to avoid an error.
25405 Use char because int might match the return type of a GCC
25406 builtin and then its argument prototype would still apply. */
25407#ifdef __cplusplus
25408extern "C"
25409#endif
25410char rl_completion_display_matches_hook ();
25411int
25412main ()
25413{
25414return rl_completion_display_matches_hook ();
25415 ;
25416 return 0;
25417}
25418_ACEOF
25419rm -f conftest.$ac_objext conftest$ac_exeext
25420if { (ac_try="$ac_link"
25421case "(($ac_try" in
25422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25423 *) ac_try_echo=$ac_try;;
25424esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025426 (eval "$ac_link") 2>conftest.er1
25427 ac_status=$?
25428 grep -v '^ *+' conftest.er1 >conftest.err
25429 rm -f conftest.er1
25430 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025432 (exit $ac_status); } && {
25433 test -z "$ac_c_werror_flag" ||
25434 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025435 } && test -s conftest$ac_exeext &&
25436 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025437 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25438else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025439 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025440sed 's/^/| /' conftest.$ac_ext >&5
25441
25442 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25443fi
25444
25445rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25446 conftest$ac_exeext conftest.$ac_ext
25447LIBS=$ac_check_lib_save_LIBS
25448fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025449{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25450echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25451if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025452
25453cat >>confdefs.h <<\_ACEOF
25454#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25455_ACEOF
25456
25457fi
25458
25459
Martin v. Löwis0daad592001-09-30 21:09:59 +000025460# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025461{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25462echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025463if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025464 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025465else
Martin v. Löwis11437992002-04-12 09:54:03 +000025466 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025467LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025468cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025469/* confdefs.h. */
25470_ACEOF
25471cat confdefs.h >>conftest.$ac_ext
25472cat >>conftest.$ac_ext <<_ACEOF
25473/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025475/* Override any GCC internal prototype to avoid an error.
25476 Use char because int might match the return type of a GCC
25477 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025478#ifdef __cplusplus
25479extern "C"
25480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025481char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025482int
25483main ()
25484{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025485return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025486 ;
25487 return 0;
25488}
25489_ACEOF
25490rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025491if { (ac_try="$ac_link"
25492case "(($ac_try" in
25493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25494 *) ac_try_echo=$ac_try;;
25495esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025497 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025499 grep -v '^ *+' conftest.er1 >conftest.err
25500 rm -f conftest.er1
25501 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025503 (exit $ac_status); } && {
25504 test -z "$ac_c_werror_flag" ||
25505 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025506 } && test -s conftest$ac_exeext &&
25507 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025508 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025509else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025511sed 's/^/| /' conftest.$ac_ext >&5
25512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025513 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025515
25516rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025517 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025518LIBS=$ac_check_lib_save_LIBS
25519fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025520{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25521echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25522if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025523
Martin v. Löwis11437992002-04-12 09:54:03 +000025524cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025525#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025526_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025527
Guido van Rossum353ae582001-07-10 16:45:32 +000025528fi
25529
Jack Jansendd19cf82001-12-06 22:36:17 +000025530
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025531# also in readline 4.2
25532cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025533/* confdefs.h. */
25534_ACEOF
25535cat confdefs.h >>conftest.$ac_ext
25536cat >>conftest.$ac_ext <<_ACEOF
25537/* end confdefs.h. */
25538#include <readline/readline.h>
25539_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025540if { (ac_try="$ac_cpp conftest.$ac_ext"
25541case "(($ac_try" in
25542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25543 *) ac_try_echo=$ac_try;;
25544esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025546 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025547 ac_status=$?
25548 grep -v '^ *+' conftest.er1 >conftest.err
25549 rm -f conftest.er1
25550 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025552 (exit $ac_status); } >/dev/null && {
25553 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25554 test ! -s conftest.err
25555 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025556 have_readline=yes
25557else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025558 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025559sed 's/^/| /' conftest.$ac_ext >&5
25560
25561 have_readline=no
25562fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025563
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025564rm -f conftest.err conftest.$ac_ext
25565if test $have_readline = yes
25566then
25567 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025568/* confdefs.h. */
25569_ACEOF
25570cat confdefs.h >>conftest.$ac_ext
25571cat >>conftest.$ac_ext <<_ACEOF
25572/* end confdefs.h. */
25573#include <readline/readline.h>
25574
25575_ACEOF
25576if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25577 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25578
25579cat >>confdefs.h <<\_ACEOF
25580#define HAVE_RL_CATCH_SIGNAL 1
25581_ACEOF
25582
25583fi
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000025584rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025585
25586fi
25587
Martin v. Löwis82bca632006-02-10 20:49:30 +000025588# End of readline checks: restore LIBS
25589LIBS=$LIBS_no_readline
25590
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025591{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25592echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025593if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025594 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025595else
Martin v. Löwis11437992002-04-12 09:54:03 +000025596
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025597if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025598 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025599else
Martin v. Löwis11437992002-04-12 09:54:03 +000025600 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025601/* confdefs.h. */
25602_ACEOF
25603cat confdefs.h >>conftest.$ac_ext
25604cat >>conftest.$ac_ext <<_ACEOF
25605/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025606
25607int main()
25608{
25609 int val1 = nice(1);
25610 if (val1 != -1 && val1 == nice(2))
25611 exit(0);
25612 exit(1);
25613}
25614
Martin v. Löwis11437992002-04-12 09:54:03 +000025615_ACEOF
25616rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025617if { (ac_try="$ac_link"
25618case "(($ac_try" in
25619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25620 *) ac_try_echo=$ac_try;;
25621esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025623 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025624 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025626 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025627 { (case "(($ac_try" in
25628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25629 *) ac_try_echo=$ac_try;;
25630esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025632 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025633 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025635 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025636 ac_cv_broken_nice=yes
25637else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025638 echo "$as_me: program exited with status $ac_status" >&5
25639echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025640sed 's/^/| /' conftest.$ac_ext >&5
25641
Martin v. Löwis11437992002-04-12 09:54:03 +000025642( exit $ac_status )
25643ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025645rm -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 +000025646fi
25647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025648
25649fi
25650
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025651{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25652echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025653if test "$ac_cv_broken_nice" = yes
25654then
Martin v. Löwis11437992002-04-12 09:54:03 +000025655
25656cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025657#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025658_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025659
25660fi
25661
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025662{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25663echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025664if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025665 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025666else
25667 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025668 ac_cv_broken_poll=no
25669else
25670 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025671/* confdefs.h. */
25672_ACEOF
25673cat confdefs.h >>conftest.$ac_ext
25674cat >>conftest.$ac_ext <<_ACEOF
25675/* end confdefs.h. */
25676
25677#include <poll.h>
25678
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025679int main()
25680{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025681 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025682 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025683
25684 close (42);
25685
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025686 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025687 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025688 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025689 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025690 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025691 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025692 return 1;
25693}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025694
25695_ACEOF
25696rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025697if { (ac_try="$ac_link"
25698case "(($ac_try" in
25699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25700 *) ac_try_echo=$ac_try;;
25701esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025703 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025704 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025706 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025707 { (case "(($ac_try" in
25708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25709 *) ac_try_echo=$ac_try;;
25710esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025712 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025713 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025715 (exit $ac_status); }; }; then
25716 ac_cv_broken_poll=yes
25717else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025718 echo "$as_me: program exited with status $ac_status" >&5
25719echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025720sed 's/^/| /' conftest.$ac_ext >&5
25721
25722( exit $ac_status )
25723ac_cv_broken_poll=no
25724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025725rm -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 +000025726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025727
25728
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025729fi
25730
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025731{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25732echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025733if test "$ac_cv_broken_poll" = yes
25734then
25735
25736cat >>confdefs.h <<\_ACEOF
25737#define HAVE_BROKEN_POLL 1
25738_ACEOF
25739
25740fi
25741
Brett Cannon43802422005-02-10 20:48:03 +000025742# 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 +000025743# (which is not required by ISO C or UNIX spec) and/or if we support
25744# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025745{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25746echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025747if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025748 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025749else
25750 cat >conftest.$ac_ext <<_ACEOF
25751/* confdefs.h. */
25752_ACEOF
25753cat confdefs.h >>conftest.$ac_ext
25754cat >>conftest.$ac_ext <<_ACEOF
25755/* end confdefs.h. */
25756#include <sys/types.h>
25757#include <$ac_cv_struct_tm>
25758
25759
25760int
25761main ()
25762{
25763static struct tm ac_aggr;
25764if (ac_aggr.tm_zone)
25765return 0;
25766 ;
25767 return 0;
25768}
25769_ACEOF
25770rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025771if { (ac_try="$ac_compile"
25772case "(($ac_try" in
25773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25774 *) ac_try_echo=$ac_try;;
25775esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025777 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025778 ac_status=$?
25779 grep -v '^ *+' conftest.er1 >conftest.err
25780 rm -f conftest.er1
25781 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025783 (exit $ac_status); } && {
25784 test -z "$ac_c_werror_flag" ||
25785 test ! -s conftest.err
25786 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025787 ac_cv_member_struct_tm_tm_zone=yes
25788else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025789 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025790sed 's/^/| /' conftest.$ac_ext >&5
25791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025792 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025793/* confdefs.h. */
25794_ACEOF
25795cat confdefs.h >>conftest.$ac_ext
25796cat >>conftest.$ac_ext <<_ACEOF
25797/* end confdefs.h. */
25798#include <sys/types.h>
25799#include <$ac_cv_struct_tm>
25800
25801
25802int
25803main ()
25804{
25805static struct tm ac_aggr;
25806if (sizeof ac_aggr.tm_zone)
25807return 0;
25808 ;
25809 return 0;
25810}
25811_ACEOF
25812rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025813if { (ac_try="$ac_compile"
25814case "(($ac_try" in
25815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25816 *) ac_try_echo=$ac_try;;
25817esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025819 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025820 ac_status=$?
25821 grep -v '^ *+' conftest.er1 >conftest.err
25822 rm -f conftest.er1
25823 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025825 (exit $ac_status); } && {
25826 test -z "$ac_c_werror_flag" ||
25827 test ! -s conftest.err
25828 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025829 ac_cv_member_struct_tm_tm_zone=yes
25830else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025831 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025832sed 's/^/| /' conftest.$ac_ext >&5
25833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025834 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025836
25837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025839
25840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025841fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025842{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25843echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25844if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025845
25846cat >>confdefs.h <<_ACEOF
25847#define HAVE_STRUCT_TM_TM_ZONE 1
25848_ACEOF
25849
25850
25851fi
25852
25853if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25854
25855cat >>confdefs.h <<\_ACEOF
25856#define HAVE_TM_ZONE 1
25857_ACEOF
25858
25859else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025860 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25861echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025862if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025863 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025864else
25865 cat >conftest.$ac_ext <<_ACEOF
25866/* confdefs.h. */
25867_ACEOF
25868cat confdefs.h >>conftest.$ac_ext
25869cat >>conftest.$ac_ext <<_ACEOF
25870/* end confdefs.h. */
25871#include <time.h>
25872
25873int
25874main ()
25875{
25876#ifndef tzname
25877 (void) tzname;
25878#endif
25879
25880 ;
25881 return 0;
25882}
25883_ACEOF
25884rm -f conftest.$ac_objext
25885if { (ac_try="$ac_compile"
25886case "(($ac_try" in
25887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25888 *) ac_try_echo=$ac_try;;
25889esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025891 (eval "$ac_compile") 2>conftest.er1
25892 ac_status=$?
25893 grep -v '^ *+' conftest.er1 >conftest.err
25894 rm -f conftest.er1
25895 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025897 (exit $ac_status); } && {
25898 test -z "$ac_c_werror_flag" ||
25899 test ! -s conftest.err
25900 } && test -s conftest.$ac_objext; then
25901 ac_cv_have_decl_tzname=yes
25902else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025903 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025904sed 's/^/| /' conftest.$ac_ext >&5
25905
25906 ac_cv_have_decl_tzname=no
25907fi
25908
25909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25910fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025911{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25912echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25913if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025914
25915cat >>confdefs.h <<_ACEOF
25916#define HAVE_DECL_TZNAME 1
25917_ACEOF
25918
25919
25920else
25921 cat >>confdefs.h <<_ACEOF
25922#define HAVE_DECL_TZNAME 0
25923_ACEOF
25924
25925
25926fi
25927
25928
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025929 { echo "$as_me:$LINENO: checking for tzname" >&5
25930echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025931if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025932 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025933else
25934 cat >conftest.$ac_ext <<_ACEOF
25935/* confdefs.h. */
25936_ACEOF
25937cat confdefs.h >>conftest.$ac_ext
25938cat >>conftest.$ac_ext <<_ACEOF
25939/* end confdefs.h. */
25940#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025941#if !HAVE_DECL_TZNAME
25942extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025943#endif
25944
25945int
25946main ()
25947{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025948return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025949 ;
25950 return 0;
25951}
25952_ACEOF
25953rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025954if { (ac_try="$ac_link"
25955case "(($ac_try" in
25956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25957 *) ac_try_echo=$ac_try;;
25958esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025960 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025961 ac_status=$?
25962 grep -v '^ *+' conftest.er1 >conftest.err
25963 rm -f conftest.er1
25964 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025966 (exit $ac_status); } && {
25967 test -z "$ac_c_werror_flag" ||
25968 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025969 } && test -s conftest$ac_exeext &&
25970 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025971 ac_cv_var_tzname=yes
25972else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025973 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025974sed 's/^/| /' conftest.$ac_ext >&5
25975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025976 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025978
25979rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025980 conftest$ac_exeext conftest.$ac_ext
25981fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025982{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25983echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025984 if test $ac_cv_var_tzname = yes; then
25985
25986cat >>confdefs.h <<\_ACEOF
25987#define HAVE_TZNAME 1
25988_ACEOF
25989
25990 fi
25991fi
25992
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025993
Martin v. Löwis1d459062005-03-14 21:23:33 +000025994# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025995{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25996echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025997if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025998 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025999else
26000
26001if test "$cross_compiling" = yes; then
26002 ac_cv_working_tzset=no
26003else
26004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026005/* confdefs.h. */
26006_ACEOF
26007cat confdefs.h >>conftest.$ac_ext
26008cat >>conftest.$ac_ext <<_ACEOF
26009/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026010
26011#include <stdlib.h>
26012#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026013#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026014
26015#if HAVE_TZNAME
26016extern char *tzname[];
26017#endif
26018
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026019int main()
26020{
Brett Cannon18367812003-09-19 00:59:16 +000026021 /* Note that we need to ensure that not only does tzset(3)
26022 do 'something' with localtime, but it works as documented
26023 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026024 This includes making sure that tzname is set properly if
26025 tm->tm_zone does not exist since it is the alternative way
26026 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026027
26028 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026029 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026030 */
26031
Martin v. Löwis1d459062005-03-14 21:23:33 +000026032 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026033 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26034
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026035 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026036 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026037 if (localtime(&groundhogday)->tm_hour != 0)
26038 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026039#if HAVE_TZNAME
26040 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26041 if (strcmp(tzname[0], "UTC") ||
26042 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26043 exit(1);
26044#endif
Brett Cannon18367812003-09-19 00:59:16 +000026045
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026046 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026047 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026048 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026049 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026050#if HAVE_TZNAME
26051 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26052 exit(1);
26053#endif
Brett Cannon18367812003-09-19 00:59:16 +000026054
26055 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26056 tzset();
26057 if (localtime(&groundhogday)->tm_hour != 11)
26058 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026059#if HAVE_TZNAME
26060 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26061 exit(1);
26062#endif
26063
26064#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026065 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26066 exit(1);
26067 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26068 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026069#endif
Brett Cannon18367812003-09-19 00:59:16 +000026070
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026071 exit(0);
26072}
26073
26074_ACEOF
26075rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026076if { (ac_try="$ac_link"
26077case "(($ac_try" in
26078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26079 *) ac_try_echo=$ac_try;;
26080esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026082 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026083 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026085 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026086 { (case "(($ac_try" in
26087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26088 *) ac_try_echo=$ac_try;;
26089esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026091 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026092 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026094 (exit $ac_status); }; }; then
26095 ac_cv_working_tzset=yes
26096else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026097 echo "$as_me: program exited with status $ac_status" >&5
26098echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026099sed 's/^/| /' conftest.$ac_ext >&5
26100
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026101( exit $ac_status )
26102ac_cv_working_tzset=no
26103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026104rm -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 +000026105fi
26106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026107
26108fi
26109
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026110{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26111echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026112if test "$ac_cv_working_tzset" = yes
26113then
26114
26115cat >>confdefs.h <<\_ACEOF
26116#define HAVE_WORKING_TZSET 1
26117_ACEOF
26118
26119fi
26120
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026121# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026122{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26123echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026124if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026125 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026126else
26127 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026128/* confdefs.h. */
26129_ACEOF
26130cat confdefs.h >>conftest.$ac_ext
26131cat >>conftest.$ac_ext <<_ACEOF
26132/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026133#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026134int
26135main ()
26136{
26137
26138struct stat st;
26139st.st_mtim.tv_nsec = 1;
26140
26141 ;
26142 return 0;
26143}
26144_ACEOF
26145rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026146if { (ac_try="$ac_compile"
26147case "(($ac_try" in
26148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26149 *) ac_try_echo=$ac_try;;
26150esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026152 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026153 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026154 grep -v '^ *+' conftest.er1 >conftest.err
26155 rm -f conftest.er1
26156 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026158 (exit $ac_status); } && {
26159 test -z "$ac_c_werror_flag" ||
26160 test ! -s conftest.err
26161 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026162 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026163else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026165sed 's/^/| /' conftest.$ac_ext >&5
26166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026167 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026168fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26171fi
26172
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026173{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26174echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026175if test "$ac_cv_stat_tv_nsec" = yes
26176then
26177
26178cat >>confdefs.h <<\_ACEOF
26179#define HAVE_STAT_TV_NSEC 1
26180_ACEOF
26181
26182fi
26183
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026184# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026185{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26186echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026187if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026188 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026189else
26190 cat >conftest.$ac_ext <<_ACEOF
26191/* confdefs.h. */
26192_ACEOF
26193cat confdefs.h >>conftest.$ac_ext
26194cat >>conftest.$ac_ext <<_ACEOF
26195/* end confdefs.h. */
26196#include <sys/stat.h>
26197int
26198main ()
26199{
26200
26201struct stat st;
26202st.st_mtimespec.tv_nsec = 1;
26203
26204 ;
26205 return 0;
26206}
26207_ACEOF
26208rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026209if { (ac_try="$ac_compile"
26210case "(($ac_try" in
26211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26212 *) ac_try_echo=$ac_try;;
26213esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026215 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026216 ac_status=$?
26217 grep -v '^ *+' conftest.er1 >conftest.err
26218 rm -f conftest.er1
26219 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026221 (exit $ac_status); } && {
26222 test -z "$ac_c_werror_flag" ||
26223 test ! -s conftest.err
26224 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026225 ac_cv_stat_tv_nsec2=yes
26226else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026227 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026228sed 's/^/| /' conftest.$ac_ext >&5
26229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026230 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026231fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26234fi
26235
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026236{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26237echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026238if test "$ac_cv_stat_tv_nsec2" = yes
26239then
26240
26241cat >>confdefs.h <<\_ACEOF
26242#define HAVE_STAT_TV_NSEC2 1
26243_ACEOF
26244
26245fi
26246
Jack Jansen666b1e72001-10-31 12:11:48 +000026247# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026248{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26249echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026250if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026251 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026252else
Martin v. Löwis11437992002-04-12 09:54:03 +000026253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026254/* confdefs.h. */
26255_ACEOF
26256cat confdefs.h >>conftest.$ac_ext
26257cat >>conftest.$ac_ext <<_ACEOF
26258/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026259#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026260int
26261main ()
26262{
Jack Jansen666b1e72001-10-31 12:11:48 +000026263
26264 int rtn;
26265 rtn = mvwdelch(0,0,0);
26266
Martin v. Löwis11437992002-04-12 09:54:03 +000026267 ;
26268 return 0;
26269}
26270_ACEOF
26271rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026272if { (ac_try="$ac_compile"
26273case "(($ac_try" in
26274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26275 *) ac_try_echo=$ac_try;;
26276esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026278 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026279 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026280 grep -v '^ *+' conftest.er1 >conftest.err
26281 rm -f conftest.er1
26282 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026284 (exit $ac_status); } && {
26285 test -z "$ac_c_werror_flag" ||
26286 test ! -s conftest.err
26287 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026288 ac_cv_mvwdelch_is_expression=yes
26289else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026291sed 's/^/| /' conftest.$ac_ext >&5
26292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026293 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026294fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26297fi
26298
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026299{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26300echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026301
26302if test "$ac_cv_mvwdelch_is_expression" = yes
26303then
Martin v. Löwis11437992002-04-12 09:54:03 +000026304
26305cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026306#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026307_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026308
26309fi
26310
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026311{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26312echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026313if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026314 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026315else
Martin v. Löwis11437992002-04-12 09:54:03 +000026316 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026317/* confdefs.h. */
26318_ACEOF
26319cat confdefs.h >>conftest.$ac_ext
26320cat >>conftest.$ac_ext <<_ACEOF
26321/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026322#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026323int
26324main ()
26325{
Jack Jansen666b1e72001-10-31 12:11:48 +000026326
26327 WINDOW *w;
26328 w->_flags = 0;
26329
Martin v. Löwis11437992002-04-12 09:54:03 +000026330 ;
26331 return 0;
26332}
26333_ACEOF
26334rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026335if { (ac_try="$ac_compile"
26336case "(($ac_try" in
26337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26338 *) ac_try_echo=$ac_try;;
26339esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026341 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026343 grep -v '^ *+' conftest.er1 >conftest.err
26344 rm -f conftest.er1
26345 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026347 (exit $ac_status); } && {
26348 test -z "$ac_c_werror_flag" ||
26349 test ! -s conftest.err
26350 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026351 ac_cv_window_has_flags=yes
26352else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026354sed 's/^/| /' conftest.$ac_ext >&5
26355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026356 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026357fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26360fi
26361
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026362{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26363echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026364
Jack Jansen666b1e72001-10-31 12:11:48 +000026365
26366if test "$ac_cv_window_has_flags" = yes
26367then
Martin v. Löwis11437992002-04-12 09:54:03 +000026368
26369cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026370#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026371_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026372
26373fi
26374
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026375{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26376echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026377cat >conftest.$ac_ext <<_ACEOF
26378/* confdefs.h. */
26379_ACEOF
26380cat confdefs.h >>conftest.$ac_ext
26381cat >>conftest.$ac_ext <<_ACEOF
26382/* end confdefs.h. */
26383#include <curses.h>
26384int
26385main ()
26386{
26387void *x=is_term_resized
26388 ;
26389 return 0;
26390}
26391_ACEOF
26392rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026393if { (ac_try="$ac_compile"
26394case "(($ac_try" in
26395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26396 *) ac_try_echo=$ac_try;;
26397esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026399 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026400 ac_status=$?
26401 grep -v '^ *+' conftest.er1 >conftest.err
26402 rm -f conftest.er1
26403 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026405 (exit $ac_status); } && {
26406 test -z "$ac_c_werror_flag" ||
26407 test ! -s conftest.err
26408 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026409
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026410cat >>confdefs.h <<\_ACEOF
26411#define HAVE_CURSES_IS_TERM_RESIZED 1
26412_ACEOF
26413
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026414 { echo "$as_me:$LINENO: result: yes" >&5
26415echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026416else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026417 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026418sed 's/^/| /' conftest.$ac_ext >&5
26419
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026420 { echo "$as_me:$LINENO: result: no" >&5
26421echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026422
26423fi
26424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26426
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026427{ echo "$as_me:$LINENO: checking for resize_term" >&5
26428echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026429cat >conftest.$ac_ext <<_ACEOF
26430/* confdefs.h. */
26431_ACEOF
26432cat confdefs.h >>conftest.$ac_ext
26433cat >>conftest.$ac_ext <<_ACEOF
26434/* end confdefs.h. */
26435#include <curses.h>
26436int
26437main ()
26438{
26439void *x=resize_term
26440 ;
26441 return 0;
26442}
26443_ACEOF
26444rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026445if { (ac_try="$ac_compile"
26446case "(($ac_try" in
26447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26448 *) ac_try_echo=$ac_try;;
26449esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026451 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026452 ac_status=$?
26453 grep -v '^ *+' conftest.er1 >conftest.err
26454 rm -f conftest.er1
26455 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026457 (exit $ac_status); } && {
26458 test -z "$ac_c_werror_flag" ||
26459 test ! -s conftest.err
26460 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026461
26462cat >>confdefs.h <<\_ACEOF
26463#define HAVE_CURSES_RESIZE_TERM 1
26464_ACEOF
26465
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026466 { echo "$as_me:$LINENO: result: yes" >&5
26467echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026468else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026469 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026470sed 's/^/| /' conftest.$ac_ext >&5
26471
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026472 { echo "$as_me:$LINENO: result: no" >&5
26473echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026474
26475fi
26476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26478
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026479{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26480echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026481cat >conftest.$ac_ext <<_ACEOF
26482/* confdefs.h. */
26483_ACEOF
26484cat confdefs.h >>conftest.$ac_ext
26485cat >>conftest.$ac_ext <<_ACEOF
26486/* end confdefs.h. */
26487#include <curses.h>
26488int
26489main ()
26490{
26491void *x=resizeterm
26492 ;
26493 return 0;
26494}
26495_ACEOF
26496rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026497if { (ac_try="$ac_compile"
26498case "(($ac_try" in
26499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26500 *) ac_try_echo=$ac_try;;
26501esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026503 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026504 ac_status=$?
26505 grep -v '^ *+' conftest.er1 >conftest.err
26506 rm -f conftest.er1
26507 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026509 (exit $ac_status); } && {
26510 test -z "$ac_c_werror_flag" ||
26511 test ! -s conftest.err
26512 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026513
26514cat >>confdefs.h <<\_ACEOF
26515#define HAVE_CURSES_RESIZETERM 1
26516_ACEOF
26517
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026518 { echo "$as_me:$LINENO: result: yes" >&5
26519echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026520else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026521 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026522sed 's/^/| /' conftest.$ac_ext >&5
26523
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026524 { echo "$as_me:$LINENO: result: no" >&5
26525echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026526
26527fi
26528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26530
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026531{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26532echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026533
26534if test -r /dev/ptmx
26535then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026536 { echo "$as_me:$LINENO: result: yes" >&5
26537echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026538
26539cat >>confdefs.h <<\_ACEOF
26540#define HAVE_DEV_PTMX 1
26541_ACEOF
26542
Thomas Wouters89f507f2006-12-13 04:49:30 +000026543else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026544 { echo "$as_me:$LINENO: result: no" >&5
26545echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026546fi
26547
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026548{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26549echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026550
26551if test -r /dev/ptc
26552then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026553 { echo "$as_me:$LINENO: result: yes" >&5
26554echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026555
26556cat >>confdefs.h <<\_ACEOF
26557#define HAVE_DEV_PTC 1
26558_ACEOF
26559
Thomas Wouters89f507f2006-12-13 04:49:30 +000026560else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026561 { echo "$as_me:$LINENO: result: no" >&5
26562echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026563fi
26564
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026565if test "$have_long_long" = yes
26566then
26567 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
26568echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
26569 if test "${ac_cv_have_long_long_format+set}" = set; then
26570 echo $ECHO_N "(cached) $ECHO_C" >&6
26571else
26572 if test "$cross_compiling" = yes; then
26573 ac_cv_have_long_long_format=no
26574else
26575 cat >conftest.$ac_ext <<_ACEOF
26576/* confdefs.h. */
26577_ACEOF
26578cat confdefs.h >>conftest.$ac_ext
26579cat >>conftest.$ac_ext <<_ACEOF
26580/* end confdefs.h. */
26581
26582 #include <stdio.h>
26583 #include <stddef.h>
26584 #include <string.h>
26585
26586 #ifdef HAVE_SYS_TYPES_H
26587 #include <sys/types.h>
26588 #endif
26589
26590 int main()
26591 {
26592 char buffer[256];
26593
26594 if (sprintf(buffer, "%lld", (long long)123) < 0)
26595 return 1;
26596 if (strcmp(buffer, "123"))
26597 return 1;
26598
26599 if (sprintf(buffer, "%lld", (long long)-123) < 0)
26600 return 1;
26601 if (strcmp(buffer, "-123"))
26602 return 1;
26603
26604 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
26605 return 1;
26606 if (strcmp(buffer, "123"))
26607 return 1;
26608
26609 return 0;
26610 }
26611
26612_ACEOF
26613rm -f conftest$ac_exeext
26614if { (ac_try="$ac_link"
26615case "(($ac_try" in
26616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26617 *) ac_try_echo=$ac_try;;
26618esac
26619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26620 (eval "$ac_link") 2>&5
26621 ac_status=$?
26622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26623 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26624 { (case "(($ac_try" in
26625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26626 *) ac_try_echo=$ac_try;;
26627esac
26628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26629 (eval "$ac_try") 2>&5
26630 ac_status=$?
26631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26632 (exit $ac_status); }; }; then
26633 ac_cv_have_long_long_format=yes
26634else
26635 echo "$as_me: program exited with status $ac_status" >&5
26636echo "$as_me: failed program was:" >&5
26637sed 's/^/| /' conftest.$ac_ext >&5
26638
26639( exit $ac_status )
26640ac_cv_have_long_long_format=no
26641fi
26642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26643fi
26644
26645
26646
26647fi
26648
26649 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
26650echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
26651fi
26652
26653if test $ac_cv_have_long_long_format = yes
26654then
26655
26656cat >>confdefs.h <<\_ACEOF
26657#define PY_FORMAT_LONG_LONG "ll"
26658_ACEOF
26659
26660fi
26661
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000026662if test $ac_sys_system = Darwin
26663then
26664 LIBS="$LIBS -framework CoreFoundation"
26665fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026666
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026667{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26668echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026669if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026670 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026671else
26672 if test "$cross_compiling" = yes; then
Benjamin Peterson8f326b22009-12-13 02:10:36 +000026673 ac_cv_have_size_t_format="cross -- assuming yes"
26674
Thomas Wouters477c8d52006-05-27 19:21:47 +000026675else
26676 cat >conftest.$ac_ext <<_ACEOF
26677/* confdefs.h. */
26678_ACEOF
26679cat confdefs.h >>conftest.$ac_ext
26680cat >>conftest.$ac_ext <<_ACEOF
26681/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026682
Thomas Wouters477c8d52006-05-27 19:21:47 +000026683#include <stdio.h>
26684#include <stddef.h>
26685#include <string.h>
26686
Christian Heimes2c181612007-12-17 20:04:13 +000026687#ifdef HAVE_SYS_TYPES_H
26688#include <sys/types.h>
26689#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000026690
26691#ifdef HAVE_SSIZE_T
26692typedef ssize_t Py_ssize_t;
26693#elif SIZEOF_VOID_P == SIZEOF_LONG
26694typedef long Py_ssize_t;
26695#else
26696typedef int Py_ssize_t;
26697#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000026698
Christian Heimes2c181612007-12-17 20:04:13 +000026699int main()
26700{
26701 char buffer[256];
26702
Thomas Wouters477c8d52006-05-27 19:21:47 +000026703 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26704 return 1;
26705
Thomas Wouters89f507f2006-12-13 04:49:30 +000026706 if (strcmp(buffer, "123"))
26707 return 1;
26708
26709 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26710 return 1;
26711
26712 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000026713 return 1;
26714
26715 return 0;
26716}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026717
Thomas Wouters477c8d52006-05-27 19:21:47 +000026718_ACEOF
26719rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026720if { (ac_try="$ac_link"
26721case "(($ac_try" in
26722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26723 *) ac_try_echo=$ac_try;;
26724esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026726 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026727 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026729 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026730 { (case "(($ac_try" in
26731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26732 *) ac_try_echo=$ac_try;;
26733esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026735 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026736 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026738 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026739 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026740else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026741 echo "$as_me: program exited with status $ac_status" >&5
26742echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026743sed 's/^/| /' conftest.$ac_ext >&5
26744
26745( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026746ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026747fi
26748rm -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 +000026749fi
26750
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026751
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026752fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026753{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26754echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000026755if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026756
26757cat >>confdefs.h <<\_ACEOF
26758#define PY_FORMAT_SIZE_T "z"
26759_ACEOF
26760
26761fi
26762
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026763{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26764echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026765if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026766 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026767else
Martin v. Löwis11437992002-04-12 09:54:03 +000026768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026769/* confdefs.h. */
26770_ACEOF
26771cat confdefs.h >>conftest.$ac_ext
26772cat >>conftest.$ac_ext <<_ACEOF
26773/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026774
26775#ifdef HAVE_SYS_TYPES_H
26776#include <sys/types.h>
26777#endif
26778#ifdef HAVE_SYS_SOCKET_H
26779#include <sys/socket.h>
26780#endif
26781
26782
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026783typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026784int
26785main ()
26786{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026787if ((ac__type_new_ *) 0)
26788 return 0;
26789if (sizeof (ac__type_new_))
26790 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026791 ;
26792 return 0;
26793}
26794_ACEOF
26795rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026796if { (ac_try="$ac_compile"
26797case "(($ac_try" in
26798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26799 *) ac_try_echo=$ac_try;;
26800esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026802 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026804 grep -v '^ *+' conftest.er1 >conftest.err
26805 rm -f conftest.er1
26806 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026808 (exit $ac_status); } && {
26809 test -z "$ac_c_werror_flag" ||
26810 test ! -s conftest.err
26811 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026812 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026813else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026815sed 's/^/| /' conftest.$ac_ext >&5
26816
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026817 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026819
26820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026821fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026822{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26823echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26824if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026825 :
26826else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026827
Martin v. Löwis01c04012002-11-11 14:58:44 +000026828cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026829#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026830_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026831
26832fi
26833
Michael W. Hudson54241132001-12-07 15:38:26 +000026834
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026835{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
26836echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026837if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026838 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026839else
26840 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000026841 ac_cv_broken_mbstowcs=no
26842else
26843 cat >conftest.$ac_ext <<_ACEOF
26844/* confdefs.h. */
26845_ACEOF
26846cat confdefs.h >>conftest.$ac_ext
26847cat >>conftest.$ac_ext <<_ACEOF
26848/* end confdefs.h. */
26849
26850#include<stdlib.h>
26851int main() {
26852 size_t len = -1;
26853 const char *str = "text";
26854 len = mbstowcs(NULL, str, 0);
26855 return (len != 4);
26856}
26857
26858_ACEOF
26859rm -f conftest$ac_exeext
26860if { (ac_try="$ac_link"
26861case "(($ac_try" in
26862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26863 *) ac_try_echo=$ac_try;;
26864esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026866 (eval "$ac_link") 2>&5
26867 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026869 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26870 { (case "(($ac_try" in
26871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26872 *) ac_try_echo=$ac_try;;
26873esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026875 (eval "$ac_try") 2>&5
26876 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026878 (exit $ac_status); }; }; then
26879 ac_cv_broken_mbstowcs=no
26880else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026881 echo "$as_me: program exited with status $ac_status" >&5
26882echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026883sed 's/^/| /' conftest.$ac_ext >&5
26884
26885( exit $ac_status )
26886ac_cv_broken_mbstowcs=yes
26887fi
26888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26889fi
26890
26891
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026892fi
26893
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026894{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
26895echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000026896if test "$ac_cv_broken_mbstowcs" = yes
26897then
26898
26899cat >>confdefs.h <<\_ACEOF
26900#define HAVE_BROKEN_MBSTOWCS 1
26901_ACEOF
26902
26903fi
26904
Antoine Pitroub52ec782009-01-25 16:34:23 +000026905# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026906{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
26907echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026908
26909# Check whether --with-computed-gotos was given.
26910if test "${with_computed_gotos+set}" = set; then
26911 withval=$with_computed_gotos;
26912if test "$withval" != no
26913then
26914
26915cat >>confdefs.h <<\_ACEOF
26916#define USE_COMPUTED_GOTOS 1
26917_ACEOF
26918
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026919 { echo "$as_me:$LINENO: result: yes" >&5
26920echo "${ECHO_T}yes" >&6; }
26921else { echo "$as_me:$LINENO: result: no" >&5
26922echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026923fi
26924else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026925 { echo "$as_me:$LINENO: result: no" >&5
26926echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026927fi
26928
26929
26930
Michael W. Hudson54241132001-12-07 15:38:26 +000026931
26932
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026933for h in `(cd $srcdir;echo Python/thread_*.h)`
26934do
26935 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26936done
26937
Michael W. Hudson54241132001-12-07 15:38:26 +000026938
Neal Norwitzd24499d2005-12-18 21:36:39 +000026939SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026940{ echo "$as_me:$LINENO: checking for build directories" >&5
26941echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026942for dir in $SRCDIRS; do
26943 if test ! -d $dir; then
26944 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026945 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026946done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026947{ echo "$as_me:$LINENO: result: done" >&5
26948echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026949
Guido van Rossum627b2d71993-12-24 10:39:16 +000026950# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000026951ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026952
Martin v. Löwis11437992002-04-12 09:54:03 +000026953cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026954# This file is a shell script that caches the results of configure
26955# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026956# scripts and configure runs, see configure's option --config-cache.
26957# It is not useful on other systems. If it contains results you don't
26958# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026959#
Martin v. Löwis11437992002-04-12 09:54:03 +000026960# config.status only pays attention to the cache file if you give it
26961# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026962#
Skip Montanaro6dead952003-09-25 14:50:04 +000026963# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026964# loading this file, other *unset* `ac_cv_foo' will be assigned the
26965# following values.
26966
26967_ACEOF
26968
Guido van Rossumf78abae1997-01-21 22:02:36 +000026969# The following way of writing the cache mishandles newlines in values,
26970# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026971# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026972# Ultrix sh set writes to stderr and can't be redirected directly,
26973# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026974(
26975 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26976 eval ac_val=\$$ac_var
26977 case $ac_val in #(
26978 *${as_nl}*)
26979 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026980 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26981echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026982 esac
26983 case $ac_var in #(
26984 _ | IFS | as_nl) ;; #(
26985 *) $as_unset $ac_var ;;
26986 esac ;;
26987 esac
26988 done
26989
Martin v. Löwis11437992002-04-12 09:54:03 +000026990 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026991 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26992 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026993 # `set' does not quote correctly, so add quotes (double-quote
26994 # substitution turns \\\\ into \\, and sed turns \\ into \).
26995 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026996 "s/'/'\\\\''/g;
26997 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026998 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026999 *)
27000 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027001 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027002 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027003 esac |
27004 sort
27005) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027006 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027007 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027008 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027009 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027010 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27011 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027012 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27013 :end' >>confcache
27014if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27015 if test -w "$cache_file"; then
27016 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027017 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27018echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027019 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027020 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027021 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27022echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027023 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027024fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027025rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027026
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027027test "x$prefix" = xNONE && prefix=$ac_default_prefix
27028# Let make expand exec_prefix.
27029test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027030
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027031DEFS=-DHAVE_CONFIG_H
27032
Skip Montanaro6dead952003-09-25 14:50:04 +000027033ac_libobjs=
27034ac_ltlibobjs=
27035for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27036 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027037 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027038 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027039 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27040 # will be set to the directory where LIBOBJS objects are built.
27041 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27042 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027043done
27044LIBOBJS=$ac_libobjs
27045
27046LTLIBOBJS=$ac_ltlibobjs
27047
27048
Martin v. Löwis11437992002-04-12 09:54:03 +000027049
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027050: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027051ac_clean_files_save=$ac_clean_files
27052ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027053{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27054echo "$as_me: creating $CONFIG_STATUS" >&6;}
27055cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027056#! $SHELL
27057# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027058# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027059# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027060# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027061
Martin v. Löwis11437992002-04-12 09:54:03 +000027062debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027063ac_cs_recheck=false
27064ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027065SHELL=\${CONFIG_SHELL-$SHELL}
27066_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027067
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027068cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027069## --------------------- ##
27070## M4sh Initialization. ##
27071## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027073# Be more Bourne compatible
27074DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027075if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27076 emulate sh
27077 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027078 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027079 # is contrary to our usage. Disable this feature.
27080 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027081 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027082else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027083 case `(set -o) 2>/dev/null` in
27084 *posix*) set -o posix ;;
27085esac
27086
Michael W. Hudson54241132001-12-07 15:38:26 +000027087fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000027088
27089
Michael W. Hudson54241132001-12-07 15:38:26 +000027090
Michael W. Hudson54241132001-12-07 15:38:26 +000027091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027092# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027093# Avoid depending upon Character Ranges.
27094as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27095as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27096as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27097as_cr_digits='0123456789'
27098as_cr_alnum=$as_cr_Letters$as_cr_digits
27099
27100# The user is always right.
27101if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027102 echo "#! /bin/sh" >conf$$.sh
27103 echo "exit 0" >>conf$$.sh
27104 chmod +x conf$$.sh
27105 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27106 PATH_SEPARATOR=';'
27107 else
27108 PATH_SEPARATOR=:
27109 fi
27110 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027111fi
27112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027113# Support unset when possible.
27114if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27115 as_unset=unset
27116else
27117 as_unset=false
27118fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027119
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027120
27121# IFS
27122# We need space, tab and new line, in precisely that order. Quoting is
27123# there to prevent editors from complaining about space-tab.
27124# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27125# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027126as_nl='
27127'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027128IFS=" "" $as_nl"
27129
27130# Find who we are. Look in the path if we contain no directory separator.
27131case $0 in
27132 *[\\/]* ) as_myself=$0 ;;
27133 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027134for as_dir in $PATH
27135do
27136 IFS=$as_save_IFS
27137 test -z "$as_dir" && as_dir=.
27138 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27139done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027140IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027142 ;;
27143esac
27144# We did not find ourselves, most probably we were run as `sh COMMAND'
27145# in which case we are not to be found in the path.
27146if test "x$as_myself" = x; then
27147 as_myself=$0
27148fi
27149if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027150 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027151 { (exit 1); exit 1; }
27152fi
27153
27154# Work around bugs in pre-3.0 UWIN ksh.
27155for as_var in ENV MAIL MAILPATH
27156do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27157done
27158PS1='$ '
27159PS2='> '
27160PS4='+ '
27161
27162# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027163for as_var in \
27164 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27165 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27166 LC_TELEPHONE LC_TIME
27167do
27168 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27169 eval $as_var=C; export $as_var
27170 else
27171 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27172 fi
27173done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027174
27175# Required to use basename.
27176if expr a : '\(a\)' >/dev/null 2>&1 &&
27177 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27178 as_expr=expr
27179else
27180 as_expr=false
27181fi
27182
27183if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27184 as_basename=basename
27185else
27186 as_basename=false
27187fi
27188
27189
27190# Name of the executable.
27191as_me=`$as_basename -- "$0" ||
27192$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27193 X"$0" : 'X\(//\)$' \| \
27194 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027195echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027196 sed '/^.*\/\([^/][^/]*\)\/*$/{
27197 s//\1/
27198 q
27199 }
27200 /^X\/\(\/\/\)$/{
27201 s//\1/
27202 q
27203 }
27204 /^X\/\(\/\).*/{
27205 s//\1/
27206 q
27207 }
27208 s/.*/./; q'`
27209
27210# CDPATH.
27211$as_unset CDPATH
27212
27213
27214
Martin v. Löwis11437992002-04-12 09:54:03 +000027215 as_lineno_1=$LINENO
27216 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027217 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027218 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027219
Martin v. Löwis11437992002-04-12 09:54:03 +000027220 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27221 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027222 # line-number line after each line using $LINENO; the second 'sed'
27223 # does the real work. The second script uses 'N' to pair each
27224 # line-number line with the line containing $LINENO, and appends
27225 # trailing '-' during substitution so that $LINENO is not a special
27226 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027227 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027228 # scripts with optimization help from Paolo Bonzini. Blame Lee
27229 # E. McMahon (1931-1989) for sed's syntax. :-)
27230 sed -n '
27231 p
27232 /[$]LINENO/=
27233 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027234 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027235 s/[$]LINENO.*/&-/
27236 t lineno
27237 b
27238 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027239 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027240 :loop
27241 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027242 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027243 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027244 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027245 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027246 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027247 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027248
Martin v. Löwis11437992002-04-12 09:54:03 +000027249 # Don't try to exec as it changes $[0], causing all sort of problems
27250 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027251 # original and so on. Autoconf is especially sensitive to this).
27252 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027253 # Exit status is that of the last command.
27254 exit
27255}
27256
27257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027258if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27259 as_dirname=dirname
27260else
27261 as_dirname=false
27262fi
27263
27264ECHO_C= ECHO_N= ECHO_T=
27265case `echo -n x` in
27266-n*)
27267 case `echo 'x\c'` in
27268 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27269 *) ECHO_C='\c';;
27270 esac;;
27271*)
27272 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027273esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027275if expr a : '\(a\)' >/dev/null 2>&1 &&
27276 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027277 as_expr=expr
27278else
27279 as_expr=false
27280fi
27281
27282rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027283if test -d conf$$.dir; then
27284 rm -f conf$$.dir/conf$$.file
27285else
27286 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027287 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027288fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027289echo >conf$$.file
27290if ln -s conf$$.file conf$$ 2>/dev/null; then
27291 as_ln_s='ln -s'
27292 # ... but there are two gotchas:
27293 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27294 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27295 # In both cases, we have to default to `cp -p'.
27296 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027297 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027298elif ln conf$$.file conf$$ 2>/dev/null; then
27299 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027300else
27301 as_ln_s='cp -p'
27302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027303rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27304rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027305
Skip Montanaro6dead952003-09-25 14:50:04 +000027306if mkdir -p . 2>/dev/null; then
27307 as_mkdir_p=:
27308else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027309 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027310 as_mkdir_p=false
27311fi
27312
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027313if test -x / >/dev/null 2>&1; then
27314 as_test_x='test -x'
27315else
27316 if ls -dL / >/dev/null 2>&1; then
27317 as_ls_L_option=L
27318 else
27319 as_ls_L_option=
27320 fi
27321 as_test_x='
27322 eval sh -c '\''
27323 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027324 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027325 else
27326 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027327 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027328 esac;
27329 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27330 ???[sx]*):;;*)false;;esac;fi
27331 '\'' sh
27332 '
27333fi
27334as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027335
27336# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027337as_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 +000027338
27339# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027340as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027341
27342
Martin v. Löwis11437992002-04-12 09:54:03 +000027343exec 6>&1
27344
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027345# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027346# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027347# values after options handling.
27348ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027349This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027350generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027351
27352 CONFIG_FILES = $CONFIG_FILES
27353 CONFIG_HEADERS = $CONFIG_HEADERS
27354 CONFIG_LINKS = $CONFIG_LINKS
27355 CONFIG_COMMANDS = $CONFIG_COMMANDS
27356 $ $0 $@
27357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027358on `(hostname || uname -n) 2>/dev/null | sed 1q`
27359"
27360
Martin v. Löwis11437992002-04-12 09:54:03 +000027361_ACEOF
27362
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027363cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027364# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027365config_files="$ac_config_files"
27366config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027368_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027369
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027370cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027371ac_cs_usage="\
27372\`$as_me' instantiates files from templates according to the
27373current configuration.
27374
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027375Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027376
27377 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027378 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027379 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027380 -d, --debug don't remove temporary files
27381 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027382 --file=FILE[:TEMPLATE]
27383 instantiate the configuration file FILE
27384 --header=FILE[:TEMPLATE]
27385 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027386
27387Configuration files:
27388$config_files
27389
27390Configuration headers:
27391$config_headers
27392
27393Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027395_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027396cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027397ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027398python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027399configured by $0, generated by GNU Autoconf 2.61,
27400 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027401
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027402Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027403This config.status script is free software; the Free Software Foundation
27404gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027405
27406ac_pwd='$ac_pwd'
27407srcdir='$srcdir'
27408INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027409_ACEOF
27410
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027411cat >>$CONFIG_STATUS <<\_ACEOF
27412# If no file are specified by the user, then we need to provide default
27413# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027414ac_need_defaults=:
27415while test $# != 0
27416do
27417 case $1 in
27418 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027419 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27420 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027421 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027422 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027423 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027424 ac_option=$1
27425 ac_optarg=$2
27426 ac_shift=shift
27427 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027428 esac
27429
Skip Montanaro6dead952003-09-25 14:50:04 +000027430 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027431 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027432 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27433 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027434 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027435 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027436 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027437 debug=: ;;
27438 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027439 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027440 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027441 ac_need_defaults=false;;
27442 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027443 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027444 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027445 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027446 --he | --h)
27447 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027448 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027449Try \`$0 --help' for more information." >&2
27450 { (exit 1); exit 1; }; };;
27451 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027452 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027453 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27454 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27455 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027456
27457 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027458 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027459Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027460 { (exit 1); exit 1; }; } ;;
27461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027462 *) ac_config_targets="$ac_config_targets $1"
27463 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027464
27465 esac
27466 shift
27467done
27468
Skip Montanaro6dead952003-09-25 14:50:04 +000027469ac_configure_extra_args=
27470
27471if $ac_cs_silent; then
27472 exec 6>/dev/null
27473 ac_configure_extra_args="$ac_configure_extra_args --silent"
27474fi
27475
27476_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027477cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027478if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027479 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27480 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027481 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027482 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027483fi
27484
Martin v. Löwis11437992002-04-12 09:54:03 +000027485_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027486cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027487exec 5>>config.log
27488{
27489 echo
27490 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27491## Running $as_me. ##
27492_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027493 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027494} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027496_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027497cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027498_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027499
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027500cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027501
27502# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027503for ac_config_target in $ac_config_targets
27504do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027505 case $ac_config_target in
27506 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27507 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27508 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027509 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27510 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027511 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27512 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027513 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027514
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027515 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27516echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027517 { (exit 1); exit 1; }; };;
27518 esac
27519done
27520
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027521
Martin v. Löwis11437992002-04-12 09:54:03 +000027522# If the user did not use the arguments to specify the items to instantiate,
27523# then the envvar interface is used. Set only those that are not.
27524# We use the long form for the default assignment because of an extremely
27525# bizarre bug on SunOS 4.1.3.
27526if $ac_need_defaults; then
27527 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27528 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27529fi
27530
Skip Montanaro6dead952003-09-25 14:50:04 +000027531# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027532# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027533# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027534# Hook for its removal unless debugging.
27535# Note that there is a small window in which the directory will not be cleaned:
27536# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027537$debug ||
27538{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027539 tmp=
27540 trap 'exit_status=$?
27541 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27542' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027543 trap '{ (exit 1); exit 1; }' 1 2 13 15
27544}
Martin v. Löwis11437992002-04-12 09:54:03 +000027545# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027546
Martin v. Löwis11437992002-04-12 09:54:03 +000027547{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027548 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027549 test -n "$tmp" && test -d "$tmp"
27550} ||
27551{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027552 tmp=./conf$$-$RANDOM
27553 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027554} ||
27555{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027556 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027557 { (exit 1); exit 1; }
27558}
27559
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027560#
27561# Set up the sed scripts for CONFIG_FILES section.
27562#
27563
27564# No need to generate the scripts if there are no CONFIG_FILES.
27565# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027566if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027567
27568_ACEOF
27569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027570
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027572ac_delim='%!_!# '
27573for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027574 cat >conf$$subs.sed <<_ACEOF
27575SHELL!$SHELL$ac_delim
27576PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27577PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27578PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27579PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27580PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27581PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27582exec_prefix!$exec_prefix$ac_delim
27583prefix!$prefix$ac_delim
27584program_transform_name!$program_transform_name$ac_delim
27585bindir!$bindir$ac_delim
27586sbindir!$sbindir$ac_delim
27587libexecdir!$libexecdir$ac_delim
27588datarootdir!$datarootdir$ac_delim
27589datadir!$datadir$ac_delim
27590sysconfdir!$sysconfdir$ac_delim
27591sharedstatedir!$sharedstatedir$ac_delim
27592localstatedir!$localstatedir$ac_delim
27593includedir!$includedir$ac_delim
27594oldincludedir!$oldincludedir$ac_delim
27595docdir!$docdir$ac_delim
27596infodir!$infodir$ac_delim
27597htmldir!$htmldir$ac_delim
27598dvidir!$dvidir$ac_delim
27599pdfdir!$pdfdir$ac_delim
27600psdir!$psdir$ac_delim
27601libdir!$libdir$ac_delim
27602localedir!$localedir$ac_delim
27603mandir!$mandir$ac_delim
27604DEFS!$DEFS$ac_delim
27605ECHO_C!$ECHO_C$ac_delim
27606ECHO_N!$ECHO_N$ac_delim
27607ECHO_T!$ECHO_T$ac_delim
27608LIBS!$LIBS$ac_delim
27609build_alias!$build_alias$ac_delim
27610host_alias!$host_alias$ac_delim
27611target_alias!$target_alias$ac_delim
27612VERSION!$VERSION$ac_delim
27613SOVERSION!$SOVERSION$ac_delim
27614CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27615UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27616ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000027617LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027618PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27619PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27620PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27621PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27622PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27623FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27624FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27625FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27626FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27627FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27628MACHDEP!$MACHDEP$ac_delim
27629SGI_ABI!$SGI_ABI$ac_delim
27630CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27631EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27632CC!$CC$ac_delim
27633CFLAGS!$CFLAGS$ac_delim
27634LDFLAGS!$LDFLAGS$ac_delim
27635CPPFLAGS!$CPPFLAGS$ac_delim
27636ac_ct_CC!$ac_ct_CC$ac_delim
27637EXEEXT!$EXEEXT$ac_delim
27638OBJEXT!$OBJEXT$ac_delim
27639CXX!$CXX$ac_delim
27640MAINCC!$MAINCC$ac_delim
27641CPP!$CPP$ac_delim
27642GREP!$GREP$ac_delim
27643EGREP!$EGREP$ac_delim
27644BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27645LIBRARY!$LIBRARY$ac_delim
27646LDLIBRARY!$LDLIBRARY$ac_delim
27647DLLLIBRARY!$DLLLIBRARY$ac_delim
27648BLDLIBRARY!$BLDLIBRARY$ac_delim
27649LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27650INSTSONAME!$INSTSONAME$ac_delim
27651RUNSHARED!$RUNSHARED$ac_delim
27652LINKCC!$LINKCC$ac_delim
27653GNULD!$GNULD$ac_delim
27654RANLIB!$RANLIB$ac_delim
27655AR!$AR$ac_delim
27656ARFLAGS!$ARFLAGS$ac_delim
27657SVNVERSION!$SVNVERSION$ac_delim
27658INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27659INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27660INSTALL_DATA!$INSTALL_DATA$ac_delim
27661LN!$LN$ac_delim
27662OPT!$OPT$ac_delim
27663BASECFLAGS!$BASECFLAGS$ac_delim
27664UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27665OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27666LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27667SO!$SO$ac_delim
27668LDSHARED!$LDSHARED$ac_delim
27669BLDSHARED!$BLDSHARED$ac_delim
27670CCSHARED!$CCSHARED$ac_delim
27671LINKFORSHARED!$LINKFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027672_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027673
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027674 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027675 break
27676 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027677 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27678echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027679 { (exit 1); exit 1; }; }
27680 else
27681 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027682 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027683done
27684
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027685ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27686if test -n "$ac_eof"; then
27687 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27688 ac_eof=`expr $ac_eof + 1`
27689fi
27690
27691cat >>$CONFIG_STATUS <<_ACEOF
27692cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27693/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027694_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027695sed '
27696s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27697s/^/s,@/; s/!/@,|#_!!_#|/
27698:n
27699t n
27700s/'"$ac_delim"'$/,g/; t
27701s/$/\\/; p
27702N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27703' >>$CONFIG_STATUS <conf$$subs.sed
27704rm -f conf$$subs.sed
27705cat >>$CONFIG_STATUS <<_ACEOF
27706CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027707_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027708
27709
27710ac_delim='%!_!# '
27711for ac_last_try in false false false false false :; do
27712 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000027713CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027714SHLIBS!$SHLIBS$ac_delim
27715USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27716SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27717USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27718LDLAST!$LDLAST$ac_delim
27719THREADOBJ!$THREADOBJ$ac_delim
27720DLINCLDIR!$DLINCLDIR$ac_delim
27721DYNLOADFILE!$DYNLOADFILE$ac_delim
27722MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27723TRUE!$TRUE$ac_delim
27724LIBOBJS!$LIBOBJS$ac_delim
27725HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27726HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27727HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27728HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27729HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27730LIBM!$LIBM$ac_delim
27731LIBC!$LIBC$ac_delim
27732THREADHEADERS!$THREADHEADERS$ac_delim
27733SRCDIRS!$SRCDIRS$ac_delim
27734LTLIBOBJS!$LTLIBOBJS$ac_delim
27735_ACEOF
27736
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000027737 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027738 break
27739 elif $ac_last_try; then
27740 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27741echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027742 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027743 else
27744 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27745 fi
27746done
27747
27748ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27749if test -n "$ac_eof"; then
27750 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27751 ac_eof=`expr $ac_eof + 1`
27752fi
27753
27754cat >>$CONFIG_STATUS <<_ACEOF
27755cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27756/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027757_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027758sed '
27759s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27760s/^/s,@/; s/!/@,|#_!!_#|/
27761:n
27762t n
27763s/'"$ac_delim"'$/,g/; t
27764s/$/\\/; p
27765N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27766' >>$CONFIG_STATUS <conf$$subs.sed
27767rm -f conf$$subs.sed
27768cat >>$CONFIG_STATUS <<_ACEOF
27769:end
27770s/|#_!!_#|//g
27771CEOF$ac_eof
27772_ACEOF
27773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027774
27775# VPATH may cause trouble with some makes, so we remove $(srcdir),
27776# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27777# trailing colons and then remove the whole line if VPATH becomes empty
27778# (actually we leave an empty line to preserve line numbers).
27779if test "x$srcdir" = x.; then
27780 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27781s/:*\$(srcdir):*/:/
27782s/:*\${srcdir}:*/:/
27783s/:*@srcdir@:*/:/
27784s/^\([^=]*=[ ]*\):*/\1/
27785s/:*$//
27786s/^[^=]*=[ ]*$//
27787}'
27788fi
27789
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027790cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027791fi # test -n "$CONFIG_FILES"
27792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027793
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027794for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027795do
27796 case $ac_tag in
27797 :[FHLC]) ac_mode=$ac_tag; continue;;
27798 esac
27799 case $ac_mode$ac_tag in
27800 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027801 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27802echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027803 { (exit 1); exit 1; }; };;
27804 :[FH]-) ac_tag=-:-;;
27805 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27806 esac
27807 ac_save_IFS=$IFS
27808 IFS=:
27809 set x $ac_tag
27810 IFS=$ac_save_IFS
27811 shift
27812 ac_file=$1
27813 shift
27814
27815 case $ac_mode in
27816 :L) ac_source=$1;;
27817 :[FH])
27818 ac_file_inputs=
27819 for ac_f
27820 do
27821 case $ac_f in
27822 -) ac_f="$tmp/stdin";;
27823 *) # Look for the file first in the build tree, then in the source tree
27824 # (if the path is not absolute). The absolute path cannot be DOS-style,
27825 # because $ac_f cannot contain `:'.
27826 test -f "$ac_f" ||
27827 case $ac_f in
27828 [\\/$]*) false;;
27829 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27830 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027831 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27832echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027833 { (exit 1); exit 1; }; };;
27834 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027835 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027836 done
27837
27838 # Let's still pretend it is `configure' which instantiates (i.e., don't
27839 # use $as_me), people would be surprised to read:
27840 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027841 configure_input="Generated from "`IFS=:
27842 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027843 if test x"$ac_file" != x-; then
27844 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027845 { echo "$as_me:$LINENO: creating $ac_file" >&5
27846echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027847 fi
27848
27849 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027850 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027851 esac
27852 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027853 esac
27854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027855 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027856$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027857 X"$ac_file" : 'X\(//\)[^/]' \| \
27858 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027859 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027860echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027861 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27862 s//\1/
27863 q
27864 }
27865 /^X\(\/\/\)[^/].*/{
27866 s//\1/
27867 q
27868 }
27869 /^X\(\/\/\)$/{
27870 s//\1/
27871 q
27872 }
27873 /^X\(\/\).*/{
27874 s//\1/
27875 q
27876 }
27877 s/.*/./; q'`
27878 { as_dir="$ac_dir"
27879 case $as_dir in #(
27880 -*) as_dir=./$as_dir;;
27881 esac
27882 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027883 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027884 while :; do
27885 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027886 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027887 *) as_qdir=$as_dir;;
27888 esac
27889 as_dirs="'$as_qdir' $as_dirs"
27890 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027891$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027892 X"$as_dir" : 'X\(//\)[^/]' \| \
27893 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027894 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027895echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027896 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27897 s//\1/
27898 q
27899 }
27900 /^X\(\/\/\)[^/].*/{
27901 s//\1/
27902 q
27903 }
27904 /^X\(\/\/\)$/{
27905 s//\1/
27906 q
27907 }
27908 /^X\(\/\).*/{
27909 s//\1/
27910 q
27911 }
27912 s/.*/./; q'`
27913 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027914 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027915 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027916 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27917echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027918 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027919 ac_builddir=.
27920
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027921case "$ac_dir" in
27922.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27923*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027924 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027925 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027926 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027927 case $ac_top_builddir_sub in
27928 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27929 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27930 esac ;;
27931esac
27932ac_abs_top_builddir=$ac_pwd
27933ac_abs_builddir=$ac_pwd$ac_dir_suffix
27934# for backward compatibility:
27935ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027936
27937case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027938 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027939 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027940 ac_top_srcdir=$ac_top_builddir_sub
27941 ac_abs_top_srcdir=$ac_pwd ;;
27942 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027943 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027944 ac_top_srcdir=$srcdir
27945 ac_abs_top_srcdir=$srcdir ;;
27946 *) # Relative name.
27947 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27948 ac_top_srcdir=$ac_top_build_prefix$srcdir
27949 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027950esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027951ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027952
Martin v. Löwis11437992002-04-12 09:54:03 +000027953
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027954 case $ac_mode in
27955 :F)
27956 #
27957 # CONFIG_FILE
27958 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027959
27960 case $INSTALL in
27961 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027962 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027963 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000027964_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027965
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027966cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027967# If the template does not know about datarootdir, expand it.
27968# FIXME: This hack should be removed a few years after 2.60.
27969ac_datarootdir_hack=; ac_datarootdir_seen=
27970
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027971case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027972 p
27973 q
27974}
27975/@datadir@/p
27976/@docdir@/p
27977/@infodir@/p
27978/@localedir@/p
27979/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027980' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027981*datarootdir*) ac_datarootdir_seen=yes;;
27982*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027983 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27984echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027985_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027986cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027987 ac_datarootdir_hack='
27988 s&@datadir@&$datadir&g
27989 s&@docdir@&$docdir&g
27990 s&@infodir@&$infodir&g
27991 s&@localedir@&$localedir&g
27992 s&@mandir@&$mandir&g
27993 s&\\\${datarootdir}&$datarootdir&g' ;;
27994esac
27995_ACEOF
27996
27997# Neutralize VPATH when `$srcdir' = `.'.
27998# Shell code in configure.ac might set extrasub.
27999# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028000cat >>$CONFIG_STATUS <<_ACEOF
28001 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028002$extrasub
28003_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028004cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028005:t
28006/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028007s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028008s&@top_builddir@&$ac_top_builddir_sub&;t t
28009s&@srcdir@&$ac_srcdir&;t t
28010s&@abs_srcdir@&$ac_abs_srcdir&;t t
28011s&@top_srcdir@&$ac_top_srcdir&;t t
28012s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28013s&@builddir@&$ac_builddir&;t t
28014s&@abs_builddir@&$ac_abs_builddir&;t t
28015s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28016s&@INSTALL@&$ac_INSTALL&;t t
28017$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028018" $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 +000028019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028020test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28021 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28022 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028023 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028024which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028025echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028026which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000028027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028028 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028029 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028030 -) cat "$tmp/out"; rm -f "$tmp/out";;
28031 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28032 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028033 ;;
28034 :H)
28035 #
28036 # CONFIG_HEADER
28037 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028038_ACEOF
28039
28040# Transform confdefs.h into a sed script `conftest.defines', that
28041# substitutes the proper values into config.h.in to produce config.h.
28042rm -f conftest.defines conftest.tail
28043# First, append a space to every undef/define line, to ease matching.
28044echo 's/$/ /' >conftest.defines
28045# Then, protect against being on the right side of a sed subst, or in
28046# an unquoted here document, in config.status. If some macros were
28047# called several times there might be several #defines for the same
28048# symbol, which is useless. But do not sort them, since the last
28049# AC_DEFINE must be honored.
28050ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28051# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28052# NAME is the cpp macro being defined, VALUE is the value it is being given.
28053# PARAMS is the parameter list in the macro definition--in most cases, it's
28054# just an empty string.
28055ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28056ac_dB='\\)[ (].*,\\1define\\2'
28057ac_dC=' '
28058ac_dD=' ,'
28059
28060uniq confdefs.h |
28061 sed -n '
28062 t rset
28063 :rset
28064 s/^[ ]*#[ ]*define[ ][ ]*//
28065 t ok
28066 d
28067 :ok
28068 s/[\\&,]/\\&/g
28069 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28070 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28071 ' >>conftest.defines
28072
28073# Remove the space that was appended to ease matching.
28074# Then replace #undef with comments. This is necessary, for
28075# example, in the case of _POSIX_SOURCE, which is predefined and required
28076# on some systems where configure will not decide to define it.
28077# (The regexp can be short, since the line contains either #define or #undef.)
28078echo 's/ $//
28079s,^[ #]*u.*,/* & */,' >>conftest.defines
28080
28081# Break up conftest.defines:
28082ac_max_sed_lines=50
28083
28084# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28085# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28086# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28087# et cetera.
28088ac_in='$ac_file_inputs'
28089ac_out='"$tmp/out1"'
28090ac_nxt='"$tmp/out2"'
28091
28092while :
28093do
28094 # Write a here document:
28095 cat >>$CONFIG_STATUS <<_ACEOF
28096 # First, check the format of the line:
28097 cat >"\$tmp/defines.sed" <<\\CEOF
28098/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28099/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28100b
28101:def
28102_ACEOF
28103 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28104 echo 'CEOF
28105 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28106 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28107 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28108 grep . conftest.tail >/dev/null || break
28109 rm -f conftest.defines
28110 mv conftest.tail conftest.defines
28111done
28112rm -f conftest.defines conftest.tail
28113
28114echo "ac_result=$ac_in" >>$CONFIG_STATUS
28115cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028116 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028117 echo "/* $configure_input */" >"$tmp/config.h"
28118 cat "$ac_result" >>"$tmp/config.h"
28119 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28120 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28121echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028122 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028123 rm -f $ac_file
28124 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028125 fi
28126 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028127 echo "/* $configure_input */"
28128 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028129 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028130 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028131 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028133
28134 esac
28135
28136done # for ac_tag
28137
Guido van Rossum627b2d71993-12-24 10:39:16 +000028138
Martin v. Löwis11437992002-04-12 09:54:03 +000028139{ (exit 0); exit 0; }
28140_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028141chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028142ac_clean_files=$ac_clean_files_save
28143
28144
28145# configure is writing to config.log, and then calls config.status.
28146# config.status does its own redirection, appending to config.log.
28147# Unfortunately, on DOS this fails, as config.log is still kept open
28148# by configure, so config.status won't be able to write to it; its
28149# output is simply discarded. So we exec the FD to /dev/null,
28150# effectively closing config.log, so it can be properly (re)opened and
28151# appended to by config.status. When coming back to configure, we
28152# need to make the FD available again.
28153if test "$no_create" != yes; then
28154 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028155 ac_config_status_args=
28156 test "$silent" = yes &&
28157 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028158 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028159 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028160 exec 5>>config.log
28161 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28162 # would make configure fail if this is the last instruction.
28163 $ac_cs_success || { (exit 1); exit 1; }
28164fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028165
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028166
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028167echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028168if test ! -f Modules/Setup
28169then
28170 cp $srcdir/Modules/Setup.dist Modules/Setup
28171fi
28172
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028173echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028174if test ! -f Modules/Setup.local
28175then
28176 echo "# Edit this file for local setup changes" >Modules/Setup.local
28177fi
28178
28179echo "creating Makefile"
28180$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28181 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028182 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028183mv config.c Modules